1
0
mirror of https://github.com/fumiama/c64-snake.git synced 2026-06-10 21:24:11 +08:00

add score(初步)

This commit is contained in:
fumiama
2021-03-31 23:29:04 +08:00
parent 7415d0774d
commit 52ac9f147b
9 changed files with 180 additions and 49 deletions

31
print.asm Normal file
View File

@@ -0,0 +1,31 @@
.macro print
pha
tya
pha
lda #<_1 ; 取参数的低八位
ldy #>_1 ; 取参数的高八位
jsr printstr
pla
tay
pla
.macend
; PRINTSTR routine. Accumulator stores the low byte of the address,
; X register stores the high byte.
.scope
.data zp
.space _ptr 2
.text
printstr:
sta _ptr
sty _ptr+1
ldy #$00
_lp:
lda (_ptr),y
beq _done
jsr chrout
iny
bne _lp
_done:
rts
.scend