2000-05-28 13:40:48 +00:00
|
|
|
;;
|
|
|
|
;; Kevin Ruland
|
|
|
|
;;
|
|
|
|
;; unsigned char __fastcall__ revers (unsigned char onoff)
|
|
|
|
;;
|
|
|
|
|
|
|
|
.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
|
|
|
|
normal:
|
|
|
|
eor #$FF ; Xor Normal
|
|
|
|
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
|
2000-05-28 13:40:48 +00:00
|
|
|
beq L2
|
2004-03-11 21:54:22 +00:00
|
|
|
lda #$01
|
2000-05-28 13:40:48 +00:00
|
|
|
L2:
|
|
|
|
rts
|
|
|
|
|