How do I find out...
How do I find out...
Hi,
How do I find out how many free bytes are left on my ZX81? I know there was a way to PEEK at two memory locations, but I can't remember which one.
Regards,
Shaun.
How do I find out how many free bytes are left on my ZX81? I know there was a way to PEEK at two memory locations, but I can't remember which one.
Regards,
Shaun.
Re: How do I find out...
Hi,
You had to use the (?) XuR button !
Or have a look to the end of "Président" software on the Ordi-5 #10...
http://zx81.ordi5.free.fr/djv/
I had to extract Zx81 Basic codes...
I will put the "Président" text file on the web as soon as.
You had to use the (?) XuR button !

Or have a look to the end of "Président" software on the Ordi-5 #10...
http://zx81.ordi5.free.fr/djv/
I had to extract Zx81 Basic codes...

I will put the "Président" text file on the web as soon as.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How do I find out...
Hi,
Have Fun !
Code: Select all
# RAMTOP=16388/16389
# DFILE =16396/16397
# VARS=16400/16401
# STKEND=16412/16413
# BASIC PRG OFFSET=16509
# CLS=2602
9996 PRINT " " AND USR 2602;PEEK 16388+256*PEEK 16389-PEEK 16413," RAM"
9997 PRINT PEEK 16412+256*PEEK 16413
9998 PRINT PEEK 16396+256*PEEK 16397-16509," PRG. LEN."
9999 PRINT PEEK 16388+256*PEEK 16389-PEEK 16400-256*PEEK 16401," STACKS"
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How do I find out...
Hi,
Thanks for the tip. For some reason, it's telling me that I have around 32,000 bytes free? I have a Memotech 16K RAM Pack which is second hand, and it's not a unit I've owned from new... therefore does this mean that it's been internally modified to boost the RAM?
Regards,
Shaun.
Thanks for the tip. For some reason, it's telling me that I have around 32,000 bytes free? I have a Memotech 16K RAM Pack which is second hand, and it's not a unit I've owned from new... therefore does this mean that it's been internally modified to boost the RAM?
Regards,
Shaun.
Re: How do I find out...
True !Shaun_B wrote:Hi,
Thanks for the tip. For some reason, it's telling me that I have around 32,000 bytes free? I have a Memotech 16K RAM Pack which is second hand, and it's not a unit I've owned from new... therefore does this mean that it's been internally modified to boost the RAM?
Regards,
Shaun.
Perhaps 16k+16k=32k (max memory offset) ?
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How do I find out...
Actually, I've been looking at the ZX81's memory map, and it appears that your programme example (for how many free bytes) is incorrect, as follows:
I actually have a 32K RAM PACK, but in order to access anything above the default RAM TOP, I need to tell the ZX81 to do so, as follows:
Regards,
Shaun.
Code: Select all
9999 PRINT PEEK 16388+256*PEEK 16389-PEEK 16412-256*PEEK 16413;" BYTES FREE"
Code: Select all
1 POKE 16388,255
2 POKE 16389,255
Shaun.
Re: How do I find out...
HI,
Init your Ram Pack and type-in this code !
(Sinclair 16k RamPack doc.)
Init your Ram Pack and type-in this code !
(Sinclair 16k RamPack doc.)
Code: Select all
1 POKE 18000,33
2 POKE 18001,11
3 POKE 18002,0
4 POKE 18003,57
5 POKE 18004,68
6 POKE 18005,77
7 POKE 18006,201
8 PRINT (USR (18000) – 16373)/1024; ''K''
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How do I find out...
The program immediately above will give you the total RAM present but not how much is free. It will return the same answer whether you've started anew or done the pokes after entering 15K of code.
Re: How do I find out...
print (peek 16386 + 256 * peek 16387) - (peek 16404 + 256 * peek 16405)
that should give you a rough approximation, its errsp minus eline
Andy
that should give you a rough approximation, its errsp minus eline
Andy
what's that Smell.... smells like fresh flux and solder fumes...
Re: How do I find out...
If you're wanting to do this on a ZX80 it's different. see here.