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)?
Yes, press ESC first, then Space to continue. Work sometimes, depends on the program.
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
But this way the text get's lost
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
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.
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.