mirror of
https://github.com/fumiama/c64-snake.git
synced 2026-06-22 12:11:05 +08:00
框架构建完成
This commit is contained in:
23
delay.asm
Normal file
23
delay.asm
Normal file
@@ -0,0 +1,23 @@
|
||||
; DELAY routine. Takes values from the Accumulator and pauses
|
||||
; for that many jiffies (1/60th of a second).
|
||||
.scope
|
||||
.data zp
|
||||
.space _tmp 1
|
||||
.space _target 1
|
||||
.text
|
||||
|
||||
delay: sta _tmp ; save argument (rdtim destroys it)
|
||||
jsr rdtim
|
||||
clc
|
||||
adc _tmp ; add current time to get target
|
||||
sta _target
|
||||
* jsr rdtim
|
||||
cmp _target
|
||||
php
|
||||
jsr getin
|
||||
beq +
|
||||
sta d
|
||||
* plp
|
||||
bmi -- ; Buzz until target reached
|
||||
rts
|
||||
.scend
|
||||
Reference in New Issue
Block a user