]> git.sur5r.net Git - cc65/blob - libsrc/apple2/revers.s
This commit was generated by cvs2svn to compensate for changes in r2,
[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     TEXTTYP         ; Stash old value
13         and     #$FF            ; Test for any bit
14         bne     reverse         ; Nothing set
15         lda     #$FF
16 reverse:        
17         ora     #$3F    
18         sta     TEXTTYP
19         tya                     ; What was the old value?
20         eor     #$FF            ; Normal = $FF, Reverse = $3F
21         beq     L2
22         lda     #01
23 L2:     
24         rts
25