[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IIgs - read 40/80 setting at runtime?
Toinet wrote:
> To get the value of the battery RAM, use the following code:
>
> 38 20 1F FE B0 16 18 FB C2 30 48 F4 19 00 A2 03 0C 22 00 00 E1 68 85
> FE 38 FB E2 30 60
>
> *-----------
>
> colMODE = $fe
>
> * Am I on a IIgs?
> sec
> jsr $fe1f
> bcs notIIGS
>
> * Yes, switch to full 16-bit native mode
> clc
> xce
> rep #$30
>
> * Read the battery RAM value
> pha
> pea $0019
> * _ReadBParam
> ldx #$0C03
> jsl $e10000
>
> * Store it in colMODE
>
> pla
> sta colMODE
>
> * Switch back to 8-bit emulation mode
> sec
> xce
> sep #$30
>
> notIIGS rts
>
> *----------- End of code
>
> antoine
>
Thanks, I'll look it over.
-uso.