2 ; Ullrich von Bassewitz, 10.08.1998
4 ; int DbgIsRAM (unsigned Addr);
8 .import popax, return0, return1
12 sta ptr1 ; Store the address
17 sei ; Disable interrupts
19 lda (ptr1),y ; Get old value
29 ; This seems to be RAM
32 sta (ptr1),y ; Restore old value
33 plp ; Restore old I flag
36 ; No RAM at this address
39 sta (ptr1),y ; Restore old value
40 plp ; Restore old I flag
43 ; Check one memory cell
47 cmp (ptr1),y ; Could we write it?
53 .byte $55, $AA, $33, $CC