Author Topic: the ways to stop text output  (Read 1211 times)

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC6128
  • ****
  • Posts: 154
  • Country: ru
    • lidovski's www page
  • Liked: 128
  • Likes Given: 129
the ways to stop text output
« on: 19:01, 06 November 15 »
CP/M, MS-DOS, Commodore Basic, ... provide keys Control-S to stop text output and Control-Q to continue the output.  Is there a way to do similar things with AMSDOS (TXT_OUTPUT routine)?

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: the ways to stop text output
« Reply #1 on: 20:52, 06 November 15 »
Yes, press ESC first, then Space to continue. Work sometimes, depends on the program.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Nich

  • Supporter
  • 6128 Plus
  • *
  • Posts: 719
  • Country: gb
  • CPC Game Reviews webmaster
    • CPC Game Reviews
  • Liked: 588
  • Likes Given: 709
Re: the ways to stop text output
« Reply #2 on: 20:57, 06 November 15 »
CP/M, MS-DOS, Commodore Basic, ... provide keys Control-S to stop text output and Control-Q to continue the output.  Is there a way to do similar things with AMSDOS (TXT_OUTPUT routine)?
A couple of firmware commands to do this are:

CALL &BB57 - disable text output (TXT VDU DISABLE)
CALL &BB54 - enable text output (TXT VDU ENABLE)

This doesn't always work well, though. A more reliable method is:

POKE &BB5A,&C9 - disable text output
POKE &BB5A,&CF - enable text output

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: the ways to stop text output
« Reply #3 on: 21:05, 06 November 15 »
But this way the text get's lost
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline litwr

  • CPC6128
  • ****
  • Posts: 154
  • Country: ru
    • lidovski's www page
  • Liked: 128
  • Likes Given: 129
Re: the ways to stop text output
« Reply #4 on: 07:00, 07 November 15 »
It looks like that the only one way exists - to use the direct coding.  I use

Code: [Select]
loop call CAS_IN_CHAR
         call TXT_OUTPUT
         call KM_READ_CHAR
         jr nc,loop

         call KM_WAIT_CHAR
         jr loop
« Last Edit: 07:06, 07 November 15 by litwr »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.796
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: the ways to stop text output
« Reply #5 on: 13:11, 07 November 15 »
I have a BASIC program somewhere that halts I think when reading a File, it would be a combination of reading in the file, having a loop to check if the end of file has been found and something in the loop to stop the text from coming, though such a program would halt as TFM suggests if ESC was used to stop the flow on.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.796
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: the ways to stop text output
« Reply #6 on: 23:14, 08 November 15 »
Finally got around to tracking down that Text Viewer done in BASIC:


Code: [Select]

10 MODE 2
20 INPUT"Enter Name of file:",a$
30 OPENIN a$
40 WHILE NOT EOF
50 WHILE NOT INKEY(47):WEND
60 IF NOT INKEY(18)THEN 110
70 LINE INPUT#9,text$
80 PRINT SPC(4)text$
90 WEND
100 WHILE INKEY(18):WEND
110 CLOSEIN


This program outputs ASCII and you have to hold down Space to stop the output and leave it there. Holding down Space is a bit of a drag, so perhaps change line 50 to read:


Code: [Select]
50 IF NOT INKEY(47) THEN CALL &BB18

which should halt the text until any key is pressed. The program exits if Enter/Return is pressed though.
« Last Edit: 05:24, 09 November 15 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3