]> git.sur5r.net Git - cc65/blob - libsrc/cbm610/cpeekrevers.s
cbm stuff from greggs pull request
[cc65] / libsrc / cbm610 / cpeekrevers.s
1 ;
2 ; 2016-02-28, Groepaz
3 ; 2017-06-19, Greg King
4 ;
5 ; unsigned char cpeekrevers (void);
6 ;
7
8         .export         _cpeekrevers
9
10         .import         plot
11         .import         CURS_X: zp, CharPtr: zp
12
13         .include        "cbm610.inc"
14
15
16 _cpeekrevers:
17         ldx     IndReg
18         ldy     #$0F
19         sty     IndReg
20
21         ldy     CURS_X
22         lda     (CharPtr),y     ; get char from system bank
23         stx     IndReg
24         ldx     #>$0000
25         and     #$80            ; get reverse bit
26         asl     a
27         tax                     ; ldx #>$0000
28         rol     a               ; return boolean value
29         rts