Louis,some time ago,got himself a 64K Rampack. On using it he found that he had no more memory than before. Very diligently he put together a Basic program to check every memory address in his Rampack,ran it..and waited for his ZX 81 to do its job. The ZX-81 is not what we would call a very fast machine in Basic and at the time I was left with the impression that Louis ended up going to bed without seeing the end of his program. Next morning he got on the phone and asked me to put together a Machine Language routine so he could check his 64K rampack without falling asleep in the process.
I had fun doing it but it was not really necessary. What was happening was that the ZX-81 was designed with no idea that more 16K of Ram would ever be used. When the machine is switched on it only checks how much memory is available up to a maximum of 16K,the last possible address being 32,767,and that being the case,sets Ramtop at 32768,and builds the stack down from there. It does not matter if you have more memory,because the computor will ignore it unless…we force it to recognize it by poking in the new Ramtop and entering ‘NEW’. This last step is very important as the command NEW not only will test every memory address up to Ramtop,clearing any existing program in the process,but it will also relocate the stack. After NEW if your Ramtop has changed then there is a malfunction at that new Ramtop address. Just “PRINT PEEK 16388+256*PEEK 16389” and you will have your Ramtop or the first not available address. Just keep in mind that,without a hardware modification,you can store data above 32K,but cannot access machine language stored there. Also the program cannot be so large that will push the display partly above 32K…