1
0
mirror of https://github.com/fumiama/c64-snake.git synced 2026-06-23 20:50:52 +08:00

很多改进

This commit is contained in:
fumiama
2021-04-13 23:29:01 +08:00
parent 44c4e25be1
commit 43aa9250b1
7 changed files with 71 additions and 128 deletions

View File

@@ -5,10 +5,13 @@ printfield:
.scope
ldx #23 ; i代表行数不含边框
lda #<field ; 取地址低8位
clc
adc #1
sta _ptr
lda #>field ; 取地址高8位
sta _ptr + 1
ldy #0
jsr _print_blk_line
;ldy #0 ; 此时y一定为0
* lda #cblk
sta (_ptr), y ; 打印左边框
lda #39
@@ -19,12 +22,7 @@ printfield:
jsr _addptr
dex
bne -
lda #cblk
ldy #40
dec _ptr
* sta (_ptr), y ; 打印底边
dey
bne -
jsr _print_blk_line
rts
_addptr:
@@ -34,4 +32,13 @@ _addptr:
inc _ptr + 1
* sta _ptr
rts
_print_blk_line:
lda #cblk
ldy #40
dec _ptr
* sta (_ptr), y ; 打印底边
dey
bne -
rts
.scend