1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00
cc65/libsrc/cbm/cpeekrevers.s
2017-12-11 19:52:11 +01:00

36 lines
912 B
ArmAsm

;
; 2016-02-28, Groepaz
; 2017-06-15, Greg King
;
; unsigned char cpeekrevers (void);
;
.export _cpeekrevers
; Get a system-specific file.
; Note: The cbm610, and c128 targets need special
; versions that handle RAM banking and the 80-column VDC.
.if .def(__C16__)
.include "plus4.inc" ; both C16 and Plus4
.elseif .def(__C64__)
.include "c64.inc"
.elseif .def(__CBM510__)
.import CURS_X: zp, SCREEN_PTR: zp
.include "cbm510.inc"
.elseif .def(__PET__)
.include "pet.inc"
.elseif .def(__VIC20__)
.include "vic20.inc"
.endif
_cpeekrevers:
ldy CURS_X
lda (SCREEN_PTR),y ; get screen code
and #$80 ; get reverse bit
asl a
tax ; ldx #>$0000
rol a ; return boolean value
rts