1
0
mirror of https://github.com/fumiama/c64-snake.git synced 2026-06-15 16:00:47 +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

17
printbyte.asm Normal file
View File

@@ -0,0 +1,17 @@
.data zp
.space _na 1 ; a的临时存放处
.text
printbyte:
sta _na
txa
pha
ldx #8 ; 打印8bit
* lda #$30 ; a = '0'
asl _na ; 左移一位溢出到c
adc #0 ; a = a + c + 0
jsr chrout ; putchar(a)
dex ; x--
bne - ; if(x != 0) goto 上个星号
pla
tax
rts