Basic RAM limites.

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Basic RAM limites.

Post by XavSnap »

Hi,

I plan to add 64kb on my Zx81.
But, we can use the basic compiler to 64k...
The D_File hang before...
But, do your know the maximal address used in Basic ? (the top of basic rang!)
Xav.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Basic RAM limites.

Post by sirmorris »

If you can push the entire d-file above the 32k border in one go, I _think_ you can use it. My memories are a little rusty ... :oops:
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Basic RAM limites.

Post by siggi »

The D-File can be above 32K, if you don't have a /M1-circuit (to execute m/c above 32K) installed or have it disabled.
But it cannot go above 48K, because the memory logic would (during display and /M1 active) redirect access from the D-File to the 16K range and then the Zeddy would crash, because there are BASIC-lines, which then are executed as m/c.

So you could use 32K for a BASIC program + 16 K for variables (behind the D-file below 48K up to 64K).

But if you use MCODER to compile a BASIC program, it will insert the generated m/c at 16K (line 1). Due to the disabled /M1 circuit (to have the D-File above 32K) the compiled code still must be below 32K!

If you use a C-compiler (like z88dk), you can have a small (dummy-) BASIC-program with D-File below 32K and run the compiled C-program above 32K (but below 48K) and have data structures/heap/stack of the C-program (but no code) located above 48K (/M1 circuit activated).

HTH Siggi
Last edited by siggi on Mon Jan 18, 2010 3:36 pm, edited 1 time in total.
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Basic RAM limites.

Post by XavSnap »

Hi,
Thanks for replies.
I will try to use the Mageco drive to fill the memory !... above 32k !
I will let you known the result.
Have Fun.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Basic RAM limites.

Post by Shaun_B »

I think the answer can be found on the Memotech documentation found at www.zx81.de for using 64K and 32K on your system.

Regards,

Shaun.
Post Reply