2005-03-26 17:03:30 +00:00
|
|
|
;
|
|
|
|
; Kevin Ruland
|
|
|
|
;
|
|
|
|
; unsigned char __fastcall__ revers (unsigned char onoff)
|
|
|
|
;
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
.export _revers
|
|
|
|
|
|
|
|
.include "apple2.inc"
|
|
|
|
|
|
|
|
_revers:
|
2004-03-11 21:54:22 +00:00
|
|
|
ldy INVFLG ; Stash old value
|
2000-05-28 13:40:48 +00:00
|
|
|
and #$FF ; Test for any bit
|
2004-03-11 21:54:22 +00:00
|
|
|
beq normal ; Nothing set
|
|
|
|
lda #~$3F ; Not Inverse
|
2005-03-26 17:03:30 +00:00
|
|
|
normal: eor #$FF ; Xor Normal
|
2004-03-11 21:54:22 +00:00
|
|
|
sta INVFLG
|
2000-05-28 13:40:48 +00:00
|
|
|
tya ; What was the old value?
|
2004-03-11 21:54:22 +00:00
|
|
|
eor #$FF ; Normal = $FF, Inverse = $3F
|
2005-03-26 17:03:30 +00:00
|
|
|
beq :+
|
2004-03-11 21:54:22 +00:00
|
|
|
lda #$01
|
2005-03-26 17:03:30 +00:00
|
|
|
: ldx #$00
|
2000-05-28 13:40:48 +00:00
|
|
|
rts
|