Page 1 of 1

Scroll a program listing

Posted: Fri Apr 02, 2021 4:23 am
by patters
This is possibly a stupid question, but I got my start with a Spectrum and have only recently decided to investigate the ZX81. On a Spectrum if you LIST a program and it's longer than the screen it gets to the bottom and prompts Scroll?. If I do that on the ZX81 it seems to show 0/5 and then stop. How do I see the rest? I've tried CONT and SCROLL but those didn't seem to do it.

Re: Scroll a program listing

Posted: Fri Apr 02, 2021 5:37 am
by XavSnap
Hi patters,

No, it's NOT a stupide question or a stupide computer !
:oops:

Just a Basic particularity in the first Basic line…
Programmers used to put a double bytes 128;128 ($76;$76) at the end of the first line.

It was (is) recommended to preserve an ASM line or protect the Basic display in a machine code binary room.
LIST a REM line can hang or freeze the Basic Monitor.

In a pure Basic program, a CONT command generally read the next Basic page, but the couple of $76 mean "The listing is over, and the next part will be the D_file (screen) segment !"

The error report will be "0" = Ended without error !

You had to type "LIST X" where "X" will be the next listed line, above the previous line number…

LIST
1 REM
0/0
LIST 2
5/0 (screen full!)
CONT
Wont display the next page from the line 2...
a B/0 will occlure the process, you had to type the next line number (in all Basic programs) !!!
Use to LIST your program page per page, or LList to print the entire listing.

Try 2, 5, 10 to jump the patched basic line to list the all of the Basic contant.

The LList command is also affected by the double $76 patch.
The "editing cursor" move is affected too.

Re: Scroll a program listing

Posted: Fri Apr 02, 2021 7:38 am
by mrtinb
If a LIST shows lines up till 220, then use LIST 221 to display next page.

You repeat this process until the report is 0/0, and the job is done.

Re: Scroll a program listing

Posted: Fri Apr 02, 2021 7:43 am
by mrtinb
The Basic extension CBI supports continuous scroll, but it has other quirks, that bothers a little.