*= $2000 memsetup lda $d301 ; PORTB ora #$02 ; disable BASIC (XL/XE only) sta $d301 lda #$80 sta $6a ; RAMTOP sta $02e6 ; MEMTOP high lda #0 sta $02e5 ; MEMTOP low sta $022f ; SDMCTL (turn off screen) lda $14 ; RTCLOK+2 loop cmp $14 ; wait until next frame beq loop rts *= $02e2 ; INITAD .word memsetup