]> git.sur5r.net Git - cc65/blob - libsrc/apple2/revers.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / apple2 / revers.s
1 ;
2 ; Ullrich von Bassewitz, 2005-03-28
3 ;
4 ; unsigned char __fastcall__ revers (unsigned char onoff)
5 ;
6
7         .export         _revers
8
9         .include        "apple2.inc"
10
11 _revers:
12         tax                     ; Test 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"
21 :       ldx     #$00
22         rts