1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00
cc65/libsrc/cbm/cpeekcolor.s
2017-12-11 19:52:11 +01:00

29 lines
636 B
ArmAsm

;
; 2016-02-28, Groepaz
; 2017-06-22, Greg King
;
; unsigned char cpeekcolor (void);
;
.export _cpeekcolor
; Get a system-specific file.
; Note: The cbm510, cbm610, c128, and Pet targets need special
; versions that handle RAM banking, the 80-column VDC, and monochrome.
.if .def(__C16__)
.include "plus4.inc" ; both C16 and Plus4
.elseif .def(__C64__)
.include "c64.inc"
.elseif .def(__VIC20__)
.include "vic20.inc"
.endif
_cpeekcolor:
ldy CURS_X
lda (CRAM_PTR),y ; get color
and #$0F
ldx #>$0000
rts