[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aux Memory access on Apple 2e?



Short and dirty code (thank you Gary Little, Exploring Apple GS/OS and ProDOS8, page 303, a must-have book)

LDA $BF00
CMP #$4C
BEQ onprodos
rts

onprodos:
lda $bf98
and #%00110000
cmp #%00110000
beq ihave128k
rts

ihave128k:
lda $bf10
sta $bf26
lda $bf11
sta $bf27

dec $bf31

jsr $bf00
dfb $c5
da online
rts

online
dfb 2
dfb $b0
da $0800 ; set that pointer

####

That's dirty code. It does not check whether the /RAM had not been removed previously. It does not remove the /RAM device unit from a list at $bf32 but that does the job.

Please get books ;-)

Antoine