This commit is contained in:
mrdudz
2022-07-24 04:59:45 +02:00
parent 193b7b9ee7
commit 10c2ce205b
3 changed files with 58 additions and 75 deletions

View File

@@ -1,41 +1,35 @@
.export _cpeekchar
.export _cpeekcharxy
.export _cpeekchar
.import _gotoxy
.import mul40
.importzp ptr4
.import mul40
.importzp ptr4
.include "atari.inc"
.include "atari.inc"
.segment "CODE"
_cpeekcharxy:
jsr _gotoxy ; Set cursor
.segment "CODE"
_cpeekchar:
lda ROWCRS
jsr mul40 ; destroys tmp4
clc
adc SAVMSC ; add start of screen memory
sta ptr4
txa
adc SAVMSC+1
sta ptr4+1
lda ROWCRS
jsr mul40 ; destroys tmp4
clc
adc SAVMSC ; add start of screen memory
sta ptr4
txa
adc SAVMSC+1
sta ptr4+1
ldy COLCRS
lda (ptr4),y ; get char
tax
ldy COLCRS
lda (ptr4),y ; get char
tax
;; convert to asc
;; convert to asc
;; ugly hack here to make tetris fx work :=P
lda #' '
cpx #0
;; FIXME: ugly hack here to make tetris fx work :=P
lda #' '
cpx #0
beq @l
lda #0
lda #0
@l:
ldx #0
rts
rts