In WimBasic, in Vice, I try the following program to obtain a directory listing and save it in a file:
Code: Select all
10 OPEN2,8,1,"DIRLIST"
20 CMD2
30 EXEC">$"
40 PRINT#2
50 CLOSE2
When I try to write to a tapefile or to screen, it works as expected.
Writing to a file on a different device unit or to an emulated printer also fails.
Copying one diskfile to another, using GET# or INPUT# , works.
What causes this timeout, how can I fix it ?
Regards,
Wim.
Code: Select all
filename = "$"
LFS=1,8,0
LAE6E JSR $FFC0 ; open logical file
LDX #$01
JSR $FFC6 ; open channel for input
JSR $FFCF ; skip load address
JSR $FFCF
LAE70 JSR $FFCF ; skip link
JSR $FFCF
LDA $90 ; check status
BNE LAE80 ; EOF or error, exit
JSR LA4CC
JSR $FFCF
TAX
JSR $FFCF ;
;
; At this point a read timeout occurs (bit 1 in Zp$90).
;
JSR $DDCD ; print number in X:A
JSR $CB3F ; print a space
LAE78 JSR $FFCF
BEQ LAE70
JSR $FFD2
LDA $90 ; check for errors
BEQ LAE78 ; none, loop to next line
LAE80 JSR $FFCC
LAE83 LDA #$01
JMP $FFC3