CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: litwr on 18:01, 06 November 15

Title: the ways to stop text output
Post by: litwr on 18: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)?
Title: Re: the ways to stop text output
Post by: TFM on 19:52, 06 November 15
Yes, press ESC first, then Space to continue. Work sometimes, depends on the program.
Title: Re: the ways to stop text output
Post by: Nich on 19:57, 06 November 15
Quote from: litwr on 18: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)?
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
Title: Re: the ways to stop text output
Post by: TFM on 20:05, 06 November 15
But this way the text get's lost
Title: Re: the ways to stop text output
Post by: litwr on 06:00, 07 November 15
It looks like that the only one way exists - to use the direct coding.  I use


loop call CAS_IN_CHAR
         call TXT_OUTPUT
         call KM_READ_CHAR
         jr nc,loop

         call KM_WAIT_CHAR
         jr loop
Title: Re: the ways to stop text output
Post by: AMSDOS on 12: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.
Title: Re: the ways to stop text output
Post by: AMSDOS on 22:14, 08 November 15
Finally got around to tracking down that Text Viewer done in BASIC:




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:


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.
Powered by SMFPacks Menu Editor Mod