2 ; Ullrich von Bassewitz, 2005-03-28
4 ; unsigned char __fastcall__ revers (unsigned char onoff)
13 beq normal ; If zero, "normal" must be set
14 ldx #$3F+1 ; Set "inverse"
15 normal: dex ; $00->$FF, $40->$3F
16 lda #$00 ; Preload return code for "normal"
17 ldy INVFLG ; Load current flag value
18 stx INVFLG ; Save new flag value
19 bmi :+ ; Jump if current value is $FF (normal)
20 lda #$01 ; Return "inverse"