Scroll a program listing

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
patters
Posts: 122
Joined: Thu Mar 11, 2021 12:34 pm

Scroll a program listing

Post 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.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Scroll a program listing

Post 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.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Scroll a program listing

Post 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.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Scroll a program listing

Post by mrtinb »

The Basic extension CBI supports continuous scroll, but it has other quirks, that bothers a little.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply