27 lines
1.2 KiB
PHP
27 lines
1.2 KiB
PHP
DELAY10 equ * ; 10ms delay @ 2.1 mhz
|
|
pshy ; save register y
|
|
ldy 0BB8h ; load loop counter into y register
|
|
DELAY10LOOP equ * ; loop counter sync address
|
|
dey ; decrement counter
|
|
bne DELAY10LOOP ; loop until zero in y
|
|
puly ; restore register y
|
|
rts ; return to caller
|
|
DELAY1K equ * ; 1000ms delay @ 2.1 mhz
|
|
pshy ; save register y
|
|
ldy 0Ah ; load 10d into register y
|
|
DELAY1KLP equ * ; loop counter sync address
|
|
bsr DELAY100 ; call 100 ms delay
|
|
dey ; decrement register y
|
|
bne DELAY1KLP ; continue
|
|
puly ; restore register y
|
|
rts ; return to caller
|
|
DELAY100 equ * ; 100 ms @ 2.1 mhz
|
|
pshx ; save register x
|
|
ldx 07530h ; load loop counter into register x
|
|
DELAY100LP equ * ; loop counter sync address
|
|
dex ; decrement register x
|
|
bne DELAY100LP ; continue
|
|
pulx ; restore register x
|
|
rts ; return to caller
|
|
|