Code: Select all
ldx !#hwstack ;set top of...
txs ;MPU stackThe memory map for the $00Cxxx block is I/O from $00C000 to $00C37F, undecoded from $00C380 to $00C3FF, and RAM from $00C400 to $00CFFF.
Code: Select all
lda #%00100100
pha ;do MPU...
plp ;test setup...After coming out of reset and thus with the MPU in emulation mode, it is implied that SP will be $01xx. Hence the above push-and-pull should work on the first pass. Shortly afterward, when the MPU has been switched to native mode and SP is set to $CFFF, it will still be pointing to RAM. So the above will work no matter what.
I did verify with my GAL test rig that the GAL in POC V1.4 is correctly decoding the memory map.
I actually have not used the syntax checker, so I was unaware there was a problem with SwapBin. I just let the assembler report syntax issues and fix them all at the same time.