Reading a disk using DSKCON
Posted: Tue Jan 08, 2019 6:17 pm
Hello,
I have two programs, one made using the Basic SREAD to get the sector data and another POKEing the DSKCON variables from $ea to $ef
Well, the one using SREAD works flawlessly, but the other reads the sectors from track zero, but when sector is changed to any ther value
it reads again sectors from track 0.
These are the listings.
There must be something wrong in the second program, but I am unable to see it.
Any advice will be very welcome
thanks
pere
I have two programs, one made using the Basic SREAD to get the sector data and another POKEing the DSKCON variables from $ea to $ef
Well, the one using SREAD works flawlessly, but the other reads the sectors from track zero, but when sector is changed to any ther value
it reads again sectors from track 0.
These are the listings.
Code: Select all
100 REM DISC READER
110 PCLEAR1:CLEAR800,32767
120 FORT=0TO39:FORS=1TO18
130 IFT=20THENT=21
140 SREAD 1,T,S,A$,B$
150 PRINT:PRINT"*** ";T" - ";S;"***"
160 PRINTA$;B$
170 IFINKEY$=""THEN170
180 NEXT:NEXT:CLOSE
Code: Select all
100 REM DISC READER
110 PCLEAR1:CLEAR200,32767
120 POKE&HEB,1:'DRIVE 1
130 FORT=0TO39:FORS=1TO18
135 IFT=20THENT=21:'SKIP DIRECTORY
140 POKE&HEC,T
150 POKE&HED,S
160 POKE&HEE,&H08:POKE&HEF,0
170 POKE&HEA,2:'READ SECTOR
180 EXEC(PEEK(&HC004)*256+PEEK(&HC005))
185 PRINT:PRINT"*** ";T" - ";S;"***"
190 FORI=0TO255:PRINTCHR$(PEEK(&H800+I));:NEXT
210 NEXT:NEXT:CLOSE
Any advice will be very welcome
thanks
pere