• Terminal stuck in boldface after using Turbo Pascal

    From Paolo Amoroso@21:1/5 to All on Sun Oct 16 05:31:37 2022
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Sun Oct 16 06:06:31 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Udo Munk on Mon Oct 17 00:59:25 2022
    On 17/10/2022 12:06 am, Udo Munk wrote:
    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Sun Oct 16 06:30:52 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to paolo....@gmail.com on Sun Oct 16 10:16:34 2022
    paolo....@gmail.com schrieb am Sonntag, 16. Oktober 2022 um 15:30:53 UTC+2:
    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?

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Sun Oct 16 11:12:23 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From fridtjof.martin.weigel@gmail.com@21:1/5 to paolo....@gmail.com on Sun Oct 16 12:10:14 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to paolo....@gmail.com on Sun Oct 16 11:46:59 2022
    paolo....@gmail.com schrieb am Sonntag, 16. Oktober 2022 um 20:12:24 UTC+2:
    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

    Send a reset string to the terminal is set to N. Set to Y and escape sequence use what switches all attributes off.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randy McLaughlin@21:1/5 to fridtjof.ma...@gmail.com on Sun Oct 16 12:24:48 2022
    On Sunday, October 16, 2022 at 2:10:16 PM UTC-5, fridtjof.ma...@gmail.com wrote:
    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
    FYI call 5, ret is the slower longer way of saying jump 5.


    Randy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Plantema@21:1/5 to All on Mon Oct 17 12:25:24 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to All on Tue Oct 18 10:43:07 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to Paolo Amoroso on Tue Oct 18 12:18:46 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paolo Amoroso on Wed Oct 19 12:53:31 2022
    On 19/10/2022 6:18 am, Paolo Amoroso wrote:
    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.

    There are similar issues under MS-DOS when exiting a program. Merely
    resetting the video attribute byte is often not enough :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)