8-Bit Software Online Conversion
Catalogue Saver - Listing
10REM
20MODE7
30PRINT" Catalogue Saver
40PRINT" by Stephen Edwards"
50PRINT
60PRINT" This program saves catalogue
s for emergency backups (DFS only)
"
70DIMspace% &200,block% 12
80*FX12,4
90ONERROR GOTO280
100REPEAT
110REM
120REPEAT:PRINT:PRINT''" 1 STORE CATAL
OG"''" 2 RETRIEVE CATALOGUE"''" ENTER CH
OICE ";:O%=GET-48:UNTILO%=1 OR O%=2:PRIN
T;O%
130PROCdrive
140ON O%GOSUB160,470
150UNTIL FALSE
160REM
170PRINT''" STORING CATALOGUE"
180T%=0
190 FOR S%=0 TO 1
200REM
210PROCtransfer(T%,S%,space%+S%*256,&5
3)
220NEXT
230PROCsize
240T%=Z% DIV 10
250S%=Z% MOD 10:PROCtransfer(T%,S%,spa
ce%,&4B)
260S%=S%+1:PROCtransfer(T%,S%,space%+2
56,&4B)
270RETURN
280VDU3,6:CLOSE#0:*FX4,0
290*FX12,0
300*FX229,0
310MODE 7
320REPORT:PRINT" at :"ERL
330END
340DEFPROCtransfer(track%,sector%,spac
e%,type%)
350block%?6=type%
360?block%=D%:block%!1=space%
370block%?5=3:block%?7=track%
380block%?8=sector%:block%?9=&21
390X%=block% MOD 256:Y%=block% DIV 256
400A%=&7F:CALL&FFF1
410ENDPROC
420DEFPROCsize
430Z%=?(space%+&107)+((?(space%+&106))
*256) MOD &1000
440IF (Z% MOD 10)=0 THEN ?(space%+&107
)=?(space%+&107)-2:Z%=Z%-2:PROCtransfer(
0,1,space%+256,&4B)
450ENDPROC
460DEFPROCdrive:PRINT''"ENTER DRIVE :"
;:REPEAT:D%=GET-48:UNTILD%>-1 AND D%<4:P
RINT T%;D%:ENDPROC
470REM
480PRINT"RETRIVE CATALOGUE"
490PRINT'"ENTER DISC SIZE 40/80 :";:RE
PEAT:L%=GET-48:UNTIL L%=4 OR L%=8:PRINT'
';L%;"0"
500PROCtransfer(L%*10-1,8,space%,&53)
510PROCtransfer(L%*10-1,9,space%+256,&
53)
520PROCtransfer(0,0,space%,&4B)
530PROCtransfer(0,1,space%+256,&4B)
540RETURN