Loading 1K programs

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Loading 1K programs

Post by thewiz »

I was about to ask a question on why I could only load a program of about 898 bytes into a 1K zx81 but after a bit of checking, found that by using 'RAND USR VAL "xxxxx"', BASIC needs about 50 bytes more to handle it then just "RAND USR xxxxx".

I can now load a maximum of 949 bytes.

The first 9 bytes are not in the .p file and the machine stack is about 16 bytes which leaves about 50 bytes still unaccounted for.

Just tried using "PRINT USR xxxxx" and can now load 953 bytes.
Memotech rules
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: Loading 1K programs

Post by BrunoFlorindo »

Every little bit helps. :D Thanks for the tip!
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: Loading 1K programs

Post by yerzmyey »

I thought ZX81 1K can load/run 1024 bytes.
So how is that really?
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Re: Loading 1K programs

Post by thewiz »

Hi again yerzmyey,

The ZX81 does have 1024 bytes but the ROM needs about 50 bytes to load a program. Once loaded those 50 bytes can be used to store data. Unfortunately the space taken up by system variables is only partially usable as the screen generating ROM code uses some of them.
Memotech rules
Post Reply