1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00
cc65/libsrc/atmos/cpeekc.s
Greg King ae7a38f3de Added peek functions to the conio library.
The functions return the character, or its attributes, that is at the current screen location of conio's cursor.  The values can be used directly by the output functions to reproduce that screen character.
2021-12-11 18:47:33 -05:00

22 lines
407 B
ArmAsm

;
; 2016-02-28, Groepaz
; 2017-06-19, Greg King
;
; char cpeekc (void);
;
; Atmos version
;
.export _cpeekc
.import setscrptr
.importzp ptr2
_cpeekc:
jsr setscrptr ; Set ptr2 and .Y to the cursor's address
lda (ptr2),y ; Get char
and #<~$80 ; Remove revers() bit
ldx #>$0000
rts