05-02-2021, 11:40 AM
(07-09-2020, 08:51 PM)Week of the agents Wrote: Learn how to use RAM banks in ZX Spectrum 128k. Then compile data blocks as different taps and make a loader. I'm using ZXBlockEditor for gluing blocks in one tap. But now I use assembler.
I am having issues on the RAM banks. I try to use bank 4 but when I switch it to 4 the program crashes.
Code:
sub FASTCALL setmemorypage4()
ASM
LD A,(0x5b5c)
AND 0xf8
OR 4 ; Bank 4
LD BC,0x7ffd
DI
LD (0x5b5c),A
OUT (C),A
EI
END ASM
end sub
I have another one for setmemorypage0() which I call after working on page 4 but never gets to that point.
I do think its a mem clash but hard to track down.
thanks