2005-03-26 17:03:30 +00:00
|
|
|
;
|
2005-03-28 16:01:08 +00:00
|
|
|
; Ullrich von Bassewitz, 2005-03-28
|
2005-03-26 17:03:30 +00:00
|
|
|
;
|
|
|
|
; unsigned char __fastcall__ revers (unsigned char onoff)
|
|
|
|
;
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-03-28 17:27:04 +00:00
|
|
|
.export _revers
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-03-28 17:27:04 +00:00
|
|
|
.include "apple2.inc"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
_revers:
|
2005-03-28 17:27:04 +00:00
|
|
|
tax ; Test onoff
|
|
|
|
beq normal ; If zero, "normal" must be set
|
|
|
|
ldx #$3F+1 ; Set "inverse"
|
|
|
|
normal: dex ; $00->$FF, $40->$3F
|
|
|
|
lda #$00 ; Preload return code for "normal"
|
|
|
|
ldy INVFLG ; Load current flag value
|
|
|
|
stx INVFLG ; Save new flag value
|
|
|
|
bmi :+ ; Jump if current value is $FF (normal)
|
|
|
|
lda #$01 ; Return "inverse"
|
|
|
|
: ldx #$00
|
|
|
|
rts
|