Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Terminal stuck in boldface after using Turbo Pascal

180 views
Skip to first unread message

Paolo Amoroso

unread,
Oct 16, 2022, 8:31:38 AM10/16/22
to
When I use Turbo Pascal on CP/M in a terminal emulator, text in the terminal gets stuck with boldface turned on.

It's enough to launch Turbo Pascal and execute any command (e.g. Compiler Options), or exit Turbo Pascal, to turn on boldface and leave it stuck both in the IDE (e.g. editing a source file) or in CCP running other programs: everything is in boldface, such as code in a source file edited in Turbo Pascal or CCP itself and the output of transient programs.

A workaround is to resize the terminal emulator window, which forces the reinitialization of the terminal.

Here are the details of my setup.

I use CP/M-80 3.0 on a Z80-MBC2[1] homebrew Z80 computer with Turbo Pascal 3.01A, and CP/M-86 1.1 on a V20-MBC[2] homebrew Nec V20 computer with Turbo Pascal 3.00B. I connect the devices to a Chromebox via serial USB and control them in a Minicom terminal emulator session under Crostini Linux, the Linux container of chromeOS.

On CP/M-80 and CP/M-86 I ran the Turbo Pascal installation utility and set the terminal to ANSI. In Minicom I tried ANSI and VT102 emulation but the issue still occurs. It occurs also with different Linux terminal emulators from which Minicom is run, Terminal (the default Crostini Linux terminal program) and Zutty[3], and Minicom in color or monochrome.

Any fixes or insight?


[1] https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer
[2] https://hackaday.io/project/170924-v20-mbc-a-v20-8088-8080-cpu-homebrew-computer
[3] https://tomscii.sig7.se/zutty/

Udo Munk

unread,
Oct 16, 2022, 9:06:33 AM10/16/22
to
This is because not properly patched turbo.com. If you just select VT-100 from the configuration
menu you'll get such behaviour. Instead of that one needs to go though the manual patching
procedure for unknow terminals, and set up everything self.
You can find a properly patched Turbo Pascal 3.01A disk image in the z80pack repository.

Paolo Amoroso

unread,
Oct 16, 2022, 9:30:53 AM10/16/22
to
Thanks Udo. If I understand correctly, manual patching for unknown terminals requires entering all the escape sequences for ANSI or VT-100, right? So why did Turbo Pascal provide a preconfigured ANSI entry that doesn't work?

dxforth

unread,
Oct 16, 2022, 9:59:27 AM10/16/22
to
Some TP utilities folks might find useful:

DTADMP11.ZIP - Dumps TINST.DTA files
TPINST16.ZIP - Terminal installer for TP executables

https://drive.google.com/drive/folders/1kh2WcPUc3hQpLcz7TQ-YQiowrozvxfGw

Udo Munk

unread,
Oct 16, 2022, 1:16:35 PM10/16/22
to
Yes, you need to go through the whole terminal configuration and enter all sequences self.
The preconfigured VT-100 does work, but they didn't care about clearing all terminal attributes
when quiting the program. That often leaves bold attribute on, which is annoying.

Paolo Amoroso

unread,
Oct 16, 2022, 2:12:24 PM10/16/22
to
Okay then, I'll reconfigure the terminal.

As a starting point I checked the default settings of Turbo Pascal's current ANSI terminal definition, but I can't find anything wrong with it. Here's a screenshot of all the escape codes TINST lets me change on CP/M-86: https://imgur.com/a/vVhss4o

Udo Munk

unread,
Oct 16, 2022, 2:47:00 PM10/16/22
to
Send a reset string to the terminal is set to N. Set to Y and escape sequence use what switches all attributes off.

fridtjof.ma...@gmail.com

unread,
Oct 16, 2022, 3:10:16 PM10/16/22
to
On Sunday, October 16, 2022 at 2:12:24 PM UTC-4, paolo....@gmail.com wrote:
> Okay then, I'll reconfigure the terminal.
>
> As a starting point I checked the default settings of Turbo Pascal's current ANSI terminal definition, but I can't find anything wrong with it. Here's a screenshot of all the escape codes TINST lets me change on CP/M-86: https://imgur.com/a/vVhss4o

Yes, the default TINST.COM from Borland leaves the terminal in hi-light (bold).

I use a little utility I named CLS.COM

0100: 0E 09 11 09 01 CD 05 00 C9
0109: 1B 03 1B 3C 1B 5B 3F 33 6C 1B 5B 48 1B 5B 32 4A 1B 5B 30 6D 24

From 100..108 is a little program:
MVI C,09
LXI D,0109
CALL 0005
RET

And 109..11D is data (a string terminated by '$').

This just displays one string to the console, and exits. The string does the following:
Switch to VT100 (if in TEK), Go to VT100 mode (if in VT52) , Go to 80 column mode,
Home cursor, Clear screen, Normal attributes.

You can enter this with DDT (S100, enter bytes. "." at end), ^C to get to prompt, then
"SAVE 1 CLS.COM"

Fred Weigel

Randy McLaughlin

unread,
Oct 16, 2022, 3:24:49 PM10/16/22
to
FYI call 5, ret is the slower longer way of saying jump 5.


Randy

Alex Plantema

unread,
Oct 17, 2022, 6:25:25 AM10/17/22
to
Op zo 16-10-2022 om 20:12 schreef Paolo Amoroso:
> Okay then, I'll reconfigure the terminal.
>
> As a starting point I checked the default settings of Turbo Pascal's current ANSI terminal definition, but I can't find anything wrong with it. Here's a screenshot of all the escape codes TINST lets me change on CP/M-86: https://imgur.com/a/vVhss4o

Try exchanging the codes for start and end highlighting.

--
Alex.

Paolo Amoroso

unread,
Oct 18, 2022, 1:43:09 PM10/18/22
to
> Send a reset string to the terminal is set to N. Set to Y and escape sequence use what switches all attributes off.

I run TINST, selected the ANSI entry, and modified it to change the terminal reset string to:

$1b $63 $1b $5b $32 $4a

which contains the escape codes:

ESC c ESC [ 2 J
Reset Clear screen

Now text attributes are properly handled and the terminal is no longer stuck in boldface after using Turbo Pascal.

Thanks Udo and all for the suggestions and feedback.

Paolo Amoroso

unread,
Oct 18, 2022, 3:18:47 PM10/18/22
to
On Tuesday, October 18, 2022 at 7:43:09 PM UTC+2, Paolo Amoroso wrote:
> ESC c ESC [ 2 J

In case you're wondering ESC c is not enough as the terminal is only reset but not cleared.

dxforth

unread,
Oct 18, 2022, 9:53:35 PM10/18/22
to
There are similar issues under MS-DOS when exiting a program. Merely
resetting the video attribute byte is often not enough :)


0 new messages