added fixed files for c64/c16/plus4/vic20/pet
This commit is contained in:
39
libsrc/plus4/cpeekchar.s
Normal file
39
libsrc/plus4/cpeekchar.s
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
.export _cpeekchar
|
||||
.export _cpeekcharxy
|
||||
|
||||
.import _gotoxy
|
||||
|
||||
.include "plus4.inc"
|
||||
|
||||
.segment "CODE"
|
||||
|
||||
_cpeekcharxy:
|
||||
|
||||
jsr _gotoxy ; Set cursor
|
||||
|
||||
_cpeekchar:
|
||||
|
||||
ldy CURS_X
|
||||
lda (SCREEN_PTR),y ; get char
|
||||
ldx #0
|
||||
|
||||
and #$7f
|
||||
|
||||
; 0 - $1f +$40
|
||||
; $20 - $3f
|
||||
; $40 - $7e +$80
|
||||
|
||||
cmp #$1f
|
||||
bcs @sk1
|
||||
;; clc
|
||||
adc #$40
|
||||
rts
|
||||
|
||||
@sk1:
|
||||
cmp #$40
|
||||
bcc @end
|
||||
clc
|
||||
adc #$80
|
||||
@end:
|
||||
rts
|
||||
21
libsrc/plus4/cpeekcol.s
Normal file
21
libsrc/plus4/cpeekcol.s
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
.export _cpeekcol
|
||||
.export _cpeekcolxy
|
||||
|
||||
.import _gotoxy
|
||||
|
||||
.include "plus4.inc"
|
||||
|
||||
.segment "CODE"
|
||||
|
||||
_cpeekcolxy:
|
||||
|
||||
jsr _gotoxy ; Set cursor
|
||||
|
||||
_cpeekcol:
|
||||
|
||||
ldy CURS_X
|
||||
lda (CRAM_PTR),y ; get color
|
||||
;and #$0f is this ok?
|
||||
ldx #0
|
||||
rts
|
||||
Reference in New Issue
Block a user