How to make listing visable after pokes in line 1

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
RS232
Posts: 90
Joined: Fri Apr 05, 2019 8:57 pm

How to make listing visable after pokes in line 1

Post by RS232 »

I thought i would raise this, as this has long been a frustration. Anyone found a good solution or a memory location you do not have to "clear" for?
It got me thinking. Could it just be you need to poke readable characters instead of leaving a non printable character at the end and start of a REM ?

Thanks in advance
Last edited by RS232 on Fri Jun 14, 2024 1:49 pm, edited 1 time in total.
User avatar
1024MAK
Posts: 5527
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: How to make listing visable after pokes in line 1

Post by 1024MAK »

Erm, what about

Code: Select all

LIST 2
Assuming your program is long enough such that you can select a line later in the program, LIST <line number> at this later line, then earlier lines will not be listed.

It is possible to move RAMTOP by poking a new value in. The trouble is you then have to do a NEW for the system to take notice. The RAM between RAMTOP and the actual end of working RAM is then free for machine code or data. The snag being that this area is not saved or loaded by the standard SAVE and LOAD commands.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
RS232
Posts: 90
Joined: Fri Apr 05, 2019 8:57 pm

Re: How to make listing visable after pokes in line 1

Post by RS232 »

I didn't explain well enough , the problem is that line 1, makes all my listing disapear unless i list lines direct.
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: How to make listing visable after pokes in line 1

Post by XavSnap »

Hi,

You typed a listing with a 1 REM XXX, and the LIST command can't display the other lines...
:oops:

I thinks you entered the bad REM length, and the BASIC point to the bad "NEXT LINE" memory offset !
REM_Struc.JPG
The REM line length is located at 16511/16512.
The "End Line Tag" at 16514+LENGTH -2 bytes.(The "REM" token ($EA) & the End of line ($76)!)

If the LENGTH point to another memory offset, the ROM will crash or ignore the next lines.
PRINT PEEK (16512+( PEEK 16512*256+PEEK 16511))
MUST be 128 , the End Of Line memory offset!
Next_Line = PRINT PEEK (16513+( PEEK 16512*256+PEEK 16511))
If not, you had to peek all around memory values, and set the right length

You can hide the REM using POKE 16514,118 & POKE 16515,118...
To add a "End of line"+"End of BASIC" Listing.
But a LIST 2 will display the next lines... As Mark said.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 2004
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: How to make listing visable after pokes in line 1

Post by mrtinb »

RS232 wrote: Wed Jun 12, 2024 7:28 pm I didn't explain well enough , the problem is that line 1, makes all my listing disapear unless i list lines direct.
Well that's one of the quirks of ZX81. You could make a machine code program that avoids bytes in the range $70 - $7F.

You could also store your machine code as a variable.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: How to make listing visable after pokes in line 1

Post by XavSnap »

:lol:

Thanks Spock !
I'm Hikaru Sulu & Mark is Pavel Chekov...

:ugeek:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
Paul
Posts: 1602
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: How to make listing visable after pokes in line 1

Post by Paul »

Isn't mark McCoy? He gives so many healing tips ;)
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
RS232
Posts: 90
Joined: Fri Apr 05, 2019 8:57 pm

Re: How to make listing visable after pokes in line 1

Post by RS232 »

Awesome reply. Thank you!
XavSnap wrote: Thu Jun 13, 2024 3:03 am Hi,

You typed a listing with a 1 REM XXX, and the LIST command can't display the other lines...
:oops:

I thinks you entered the bad REM length, and the BASIC point to the bad "NEXT LINE" memory offset !

REM_Struc.JPG

The REM line length is located at 16511/16512.
The "End Line Tag" at 16514+LENGTH -2 bytes.(The "REM" token ($EA) & the End of line ($76)!)

If the LENGTH point to another memory offset, the ROM will crash or ignore the next lines.
PRINT PEEK (16512+( PEEK 16512*256+PEEK 16511))
MUST be 128 , the End Of Line memory offset!
Next_Line = PRINT PEEK (16513+( PEEK 16512*256+PEEK 16511))
If not, you had to peek all around memory values, and set the right length

You can hide the REM using POKE 16514,118 & POKE 16515,118...
To add a "End of line"+"End of BASIC" Listing.
But a LIST 2 will display the next lines... As Mark said.
User avatar
RS232
Posts: 90
Joined: Fri Apr 05, 2019 8:57 pm

Re: How to make listing visable after pokes in line 1

Post by RS232 »

Thanks.
mrtinb wrote: Thu Jun 13, 2024 7:57 am
RS232 wrote: Wed Jun 12, 2024 7:28 pm I didn't explain well enough , the problem is that line 1, makes all my listing disapear unless i list lines direct.
Well that's one of the quirks of ZX81. You could make a machine code program that avoids bytes in the range $70 - $7F.

You could also store your machine code as a variable.
User avatar
GCHarder
Posts: 477
Joined: Sat Dec 14, 2013 7:46 pm

Re: How to make listing visable after pokes in line 1

Post by GCHarder »

You could try something like this...

10 POKE 16419,10

This sets the automatic line listing to 10, now LIST should start at 10, I think.

Maybe not what your asking though.

Greg
Post Reply