From: Christopher Phillips (shrydar_at_jaruth.com)
Date: 2005-04-25 07:22:08
Does anyone know how you would retry a job that never even reports an
error?
I occasionally get stuck forever in the 'ldy buffer0jq:bmi wait' loop
in doJob, below.
I've executed the code in 0x500 with a M-E command from the c64.
christopher
--
drivecode:
*= $0500
drivestart:
sei
cld
lda #0
sta port1b
readNextBlock
lda tk
beq sbNoRead
jsr ledOn
jsr readBlock
jsr ledOff
...
tk: .byt 18
se: .byt 1
; reads block pointed to by tk,se
readBlock:
lda #jobRead
ldx tk
ldy se
;jmp doJob
doJob: php ; returns nonzero Y on failure
stx buffer0tk
sty buffer0se
ldx #20 ; try counter
cli
.(
jobtry:
sta buffer0jq
wait ldy buffer0jq
bmi wait
cpy #$01
beq jobOK
dex
bne jobtry
jobOK: plp
rts
.)
ledOn: lda #$08
ora port2b
bne boo
ledOff: lda #$f7
and port2b
boo
sta port2b
rts
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.