Page 1 of 2

List Remedy

Posted: Mon Dec 30, 2013 6:46 pm
by GCHarder
Here's a type-in I did from Your Computer 8305. It's a nice Basic Listing program. It comes in very handy when comparing a printed listing from a magazine to what you've typed in, to see if they match. The only problem is line numbers for 0 to 999 aren't padded with spaces, so there's not an exact match until line number 1000 and up is reached. Maybe someone can fix that, I've looked into it but don't see any easy solution.

Regards;

Greg

Re: List Remedy

Posted: Sun Jun 01, 2014 10:14 am
by poglad
This is a very nifty little routine, actually! I'm impressed.

As for your leading-space problem, it's actually very easily solved:

POKE 16528,229
POKE 16529,205
POKE 16530,165
POKE 16531,10
POKE 16532,225
POKE 16533,35

Entering these before using it for the first time, you'll now find the line numbers indented perfectly with leading spaces. 8-)

Re: List Remedy

Posted: Mon Jun 02, 2014 6:17 pm
by GCHarder
Thanks for the fix poglad. I knew there had to be something in the ROM to do that!

I'm uploading a copy of the fixed version, I've also added a "Relocator" with it, which should've been included in the original listing.

Regards;

Greg

Re: List Remedy

Posted: Wed Mar 13, 2024 2:29 am
by stroebeljc
I know this thread is a decade old, but I found it interesting and also found issues with the tool. I've attached an update that allows the display of lines greater than 255 bytes, isn't fooled by 7Eh's in REM statements, and works in either fast or slow mode.
I've also included the source.

Re: List Remedy

Posted: Wed Mar 13, 2024 5:51 pm
by stroebeljc
A few final tweaks before moving on to something else. ;)
The project is also available on GitHub.

Re: List Remedy

Posted: Sun Nov 03, 2024 11:55 pm
by David G
Nice The original "List Remedy.p" works with RAND USR 16516. Has anyone been able to get "List Remedy v4.p" to work?


From Your Computer magazine, March 1983 page 135
List Remedy

-----
ZX-81
-----

Robert Pearlman
Winchmore Hill,
London.

The List routine provided by Sinclair in the ZX-81 ROM is inadequate for the serious programmer for several reasons: a long program must be listed in small sections using many List statements, which is time-consuming and leads to mistakes; the end of a very long line cannot be listed; after a Newline character in a line, which is common in machine-code programs, the rest of the line and the rest of the program are sometimes not listed. Finally, after a Chr$ 126, a common character in machine-code programs, the next five bytes are not listed.

These faults are remedied by my List routine. When executed, a screenful of text is scrolled up the screen and displayed. A small black square then appears in the bottom left of the screen indicating that the program is waiting for a key to be pressed, either Break to abort the listing, or any other key to continue.

The machine-code routine occupies 160 bytes and may be located anywhere in RAM because it uses no absolute addressing, a good place being in RAMtop or in a Rem statement. It can be entered using any of the hexadecimal loaders that have been in previous issues of Your Computer. It is executed by Rand Usr followed by the start address.

Re: List Remedy

Posted: Mon Nov 04, 2024 1:17 am
by XavSnap
Found on an old tape: (release 1 ?)
https://www.sinclairzxworld.com/viewtop ... 032#p40032
9ListRemedy.p
(1.63 KiB) Downloaded 164 times

Not available on this link: https://www.sinclairzxworld.com/viewtop ... =11&t=3896

Re: List Remedy

Posted: Mon Nov 04, 2024 10:28 am
by David G
Nice find!
XavSnap wrote: Mon Nov 04, 2024 1:17 amFound on an old tape: (release 1 ?)
https://www.sinclairzxworld.com/viewtop ... 032#p40032

9ListRemedy.p

Not available on this tread: https://www.sinclairzxworld.com/viewtop ... =11&t=3896
I will add the original type-in to the topic "[Zx81:Type-Ins] "Your Computer" campaign" and also link back to this

Re: List Remedy

Posted: Mon Nov 04, 2024 10:45 am
by David G
stroebeljc wrote: Wed Mar 13, 2024 5:51 pm List Remedy v4
This evening I got the idea to look the ASM file for List Remedy v4 to see what the entry point is

It turns out to be:

Code: Select all

RAND USR 16541
V4 works! Nice feature upgrades ... next I will have fun figuring out how List Remedy works, what methods it uses

Re: List Remedy

Posted: Mon Nov 04, 2024 5:52 pm
by XavSnap
Hi David,

It's a claver program use to scan the BASIC memory segment.

All chars are retrieved in each line, and displayed on the screen.
The same process than the text to P tokens translater.
If the screen is full, the program stop to wait a key.

The process for "LIST line" stop on a display error.
But this code able to display the listing the ASM REM like a LLIST, without $76;$76 [end of BASIC bloc] end.

It's used to display a LLIST function on the screen and avoid the famous LIST display crash on the illegals ASM codes in a REM line.

Is there anyone able to do a REM able to freeze or rebout a BASIC program ? (Witout a $76;$76 code!)
1 REM HELLO WORLD
2 REM END
POKE 16513,0 (SPACE)
RUN
C/1
POKE 16513,228 (SLOW)
POKE 16513,229 (FAST)
RUN
0/2
LIST is ok...

POKE 16513,232 (CONT)
RUN
wait a break to exit.
POKE 16513,240 (LIST)
RUN
2/1
Without $76;$76 in the REM line...
(...)