fix cpeekc/cpeekcolor/cpeekrevers for atari 800
This commit is contained in:
35
libsrc/atari/cpeekc.s
Normal file
35
libsrc/atari/cpeekc.s
Normal file
@@ -0,0 +1,35 @@
|
||||
;
|
||||
; 2016-02-28, Groepaz
|
||||
; 2017-06-21, Greg King
|
||||
;
|
||||
; char cpeekc (void);
|
||||
;
|
||||
|
||||
.export _cpeekc
|
||||
|
||||
.include "atari.inc"
|
||||
|
||||
|
||||
_cpeekc:
|
||||
lda OLDCHR ; get char under cursor
|
||||
and #<~$80 ; remove reverse bit
|
||||
|
||||
;; convert internal screen code to AtSCII
|
||||
|
||||
tay
|
||||
and #%01100000
|
||||
asl a
|
||||
asl a
|
||||
rol a
|
||||
rol a
|
||||
tax
|
||||
tya
|
||||
eor intats,x
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
.rodata
|
||||
intats: .byte %00100000 ; -> %001xxxxx
|
||||
.byte %01100000 ; -> %010xxxxx
|
||||
.byte %01000000 ; -> %000xxxxx
|
||||
.byte %00000000 ; -> %011xxxxx
|
||||
Reference in New Issue
Block a user