]> git.sur5r.net Git - cc65/blob - libsrc/cbm/cpeekrevers.s
cbm stuff from greggs pull request
[cc65] / libsrc / cbm / cpeekrevers.s
1 ;
2 ; 2016-02-28, Groepaz
3 ; 2017-06-15, Greg King
4 ;
5 ; unsigned char cpeekrevers (void);
6 ;
7
8         .export         _cpeekrevers
9
10 ; Get a system-specific file.
11 ; Note:  The cbm610, and c128 targets need special
12 ; versions that handle RAM banking and the 80-column VDC.
13
14 .if     .def(__C16__)
15         .include        "plus4.inc"     ; both C16 and Plus4
16 .elseif .def(__C64__)
17         .include        "c64.inc"
18 .elseif .def(__CBM510__)
19         .import         CURS_X: zp, SCREEN_PTR: zp
20         .include        "cbm510.inc"
21 .elseif .def(__PET__)
22         .include        "pet.inc"
23 .elseif .def(__VIC20__)
24         .include        "vic20.inc"
25 .endif
26
27
28 _cpeekrevers:
29         ldy     CURS_X
30         lda     (SCREEN_PTR),y  ; get screen code
31         and     #$80            ; get reverse bit
32         asl     a
33         tax                     ; ldx #>$0000
34         rol     a               ; return boolean value
35         rts