mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-16 11:30:55 +00:00
wipes: fix up a few
This commit is contained in:
parent
1050b92d22
commit
0057ec3230
@ -90,7 +90,7 @@ loop:
|
||||
lda ($fe),y
|
||||
bpl copy
|
||||
lda #$10
|
||||
; jsr iWaitForKeyWithTimeout
|
||||
jsr WaitForKeyWithTimeout
|
||||
bmi cexit
|
||||
bpl next ; always branches
|
||||
copy:
|
||||
|
@ -41,15 +41,15 @@ WaitForKeyWithTimeout:
|
||||
; out: A clobbered (not always 0 if key is pressed, but also not the key pressed)
|
||||
; X/Y preserved
|
||||
sec
|
||||
@wait1: pha
|
||||
@wait2: sbc #1
|
||||
bne @wait2
|
||||
wait1: pha
|
||||
wait2: sbc #1
|
||||
bne wait2
|
||||
pla
|
||||
bit KBD
|
||||
bmi @exit
|
||||
bmi wfk_exit
|
||||
sbc #1
|
||||
bne @wait1
|
||||
@exit: rts
|
||||
bne wait1
|
||||
wfk_exit: rts
|
||||
|
||||
; based on routine by John Brooks
|
||||
; posted on comp.sys.apple2 on 2018-07-11
|
||||
|
@ -30,7 +30,7 @@ h1=*+1
|
||||
bne loop1
|
||||
|
||||
lda #$10
|
||||
; jsr iWaitForKeyWithTimeout
|
||||
jsr WaitForKeyWithTimeout
|
||||
bmi lrexit
|
||||
|
||||
inc h1
|
||||
@ -53,7 +53,7 @@ h2=*+1
|
||||
bne loop2
|
||||
|
||||
lda #$10
|
||||
; jsr iWaitForKeyWithTimeout
|
||||
jsr WaitForKeyWithTimeout
|
||||
bmi lrexit
|
||||
|
||||
inc h2
|
||||
|
@ -62,5 +62,6 @@ test_graphic:
|
||||
|
||||
.include "../zx02_optim.s"
|
||||
|
||||
.include "../vblank.s"
|
||||
;.include "../vblank.s"
|
||||
|
||||
;.include "../wait_for_key.s"
|
||||
|
14
graphics/hgr/wipes/wait_for_key.s
Normal file
14
graphics/hgr/wipes/wait_for_key.s
Normal file
@ -0,0 +1,14 @@
|
||||
WaitForKeyWithTimeout:
|
||||
; in: A = timeout length (like standard $FCA8 wait routine)
|
||||
; out: A clobbered (not always 0 if key is pressed, but also not the key pressed)
|
||||
; X/Y preserved
|
||||
sec
|
||||
wait1: pha
|
||||
wait2: sbc #1
|
||||
bne wait2
|
||||
pla
|
||||
bit KBD
|
||||
bmi wfk_exit
|
||||
sbc #1
|
||||
bne wait1
|
||||
wfk_exit: rts
|
Loading…
x
Reference in New Issue
Block a user