Memory - charlierobson/ZXpand-Vitamins GitHub Wiki
ZXpand has 32k of RAM. Is this available to BASIC straight away?
Yes and No. ZXpand can be used in a number of different memory configurations and there are also some zeddy hardware restrictions at play.
ZXpand can be configured to give two different memory maps. 'Low' which is RAM from 8192 -> 40959 inclusive, and 'High' which is RAM from 16384 to 49151 inclusive. Detecting this at boot and setting up BASIC accordingly would require more ROM space than is available.
The funky hardware of the zeddy introduces a potential problem with the display file on machines with > 16K. If the d-file straddles the 32k memory address boundary the machine will crash. There's nothing anyone can do about that. There are some tricksy ways around it though.
So how can the full 32k be used by BASIC?
Direct data storage is always available within the configured range. Its bytes are yours for the filling. You can use LOAD, SAVE, PEEK and POKE with impunity.
For use with very large BASIC programs or variable data you need to inform BASIC that the memory is available. To do this you need to set RAMTOP. If you don't know what this is you shouldn't be messing with it ;) But if you insist you can set RAMTOP like so:
CONFIG "M=H"
CONFIG "R=49152"
The machine will reset and BASIC can now accept large variables. Try:
10 DIM A(6000)
RUN
For further information have a look at the corresponding bit of the Memotech Memopak 32k manual.