]> git.sur5r.net Git - cc65/blob - libsrc/apple2/revers.s
Add new maintainer
[cc65] / libsrc / apple2 / revers.s
1         ;;
2         ;; Kevin Ruland
3         ;;
4         ;; unsigned char __fastcall__ revers (unsigned char onoff)
5         ;;
6
7         .export         _revers
8
9         .include        "apple2.inc"
10
11 _revers:
12         ldy     INVFLG          ; Stash old value
13         and     #$FF            ; Test for any bit
14         beq     normal          ; Nothing set
15         lda     #~$3F           ; Not Inverse
16 normal: 
17         eor     #$FF            ; Xor Normal
18         sta     INVFLG
19         tya                     ; What was the old value?
20         eor     #$FF            ; Normal = $FF, Inverse = $3F
21         beq     L2
22         lda     #$01
23 L2:     
24         rts
25