8-Bit Software Online Conversion
:2.$.DTOA2 - Listing
5REM SINGLE DRIVE VERSION ADAPTED BY
C.J.RICHARDSON
10REM DFS to ADFS transfer listing II
- loaded as ADFTFR2
20REM adapted from Amcom to ADFS tran
sfer programs
30REM by H.L.Clarke and S.B.Yeo
40REM (C) 1991
50MODE 7+128:HIMEM=U%
55REPEAT:PRINT"1. Single drive. DFS s
ide 0 only"'"2. Single drive. DFS sides
0 and 2"'"3. Twin drive. DFS sides 1 and
3"'"4. Twin drive. Side 1 only":A$=GET$
:UNTILVALA$>0ANDVALA$<5
56IFA$="1"C%=0:G%=0:H%=0:V%=1
57IFA$="2"C%=1:G%=0:H%=2:V%=1
58IFA$="3"C%=1:G%=1:H%=2:V%=0
59IFA$="4"C%=1:G%=1:H%=1:V%=0
60B%=0:Q%=0
70READ centry,transfer,name,secread,l
ong,stload,subd,title,fparm,fbuff,ftrack
,fsec,secnums,fresult,faddr,pparms,putda
ta,putlength,pointer,putbyte,command,cst
ring
80?&7B15=3:?&7B16=&53:!faddr=fparm
90PRINT''"Printout of filenames of"'"
transferred files ?"
100INPUT yn$
110IF LEFT$(yn$,1)="Y" OR LEFT$(yn$,1)
="y" THEN Q%=2
120PRINT''"Insert capital letter to be
first"'"character of ADFS sub-directori
es":REPEAT:INPUT F$:Z%=ASC(F$):UNTIL Z%>
64 AND Z%<91
140REM
180PROCctad
190*MOUNT0
200FOR N%=B% TO (B%+C%):$cstring="CDIR
"+CHR$(Z%)+STR$(N%):CALL command:NEXT
210FOR D%=G%TOH%STEP 2
220PROCctdi
230?fparm=D%:CALL secread
240IF ?&7908=0 THEN B%=B%+1:GOTO 320
250FOR E%=1 TO ?&7B90
260PROCaddr
270CALL name
280NEXT
290PRINT CHR$(Q%):PRINT'''"Transferrin
g from drive ";STR$(D%):PRINT"Disc ";:CA
LL title:PRINT
300PROCtransfer(1,?&7B90)
310B%=B%+1
320VDU3
330NEXT D%
340PRINT':PRINTTAB(18)"***"'':INPUT"Tr
ansfer another DFS disc ",yn$
350IF LEFT$(yn$,1)="Y" OR LEFT$(yn$,1)
="y" THEN 140
360PRINT''"The ADFS disc will need som
e editing."'"Note that files are now in
ADFS"'"directories from ";CHR$(Z%);"0 to
";CHR$(Z%);STR$(B%-1);" inclusive."
370END
10000DEFPROCaddr
10010X%=&7900+(8*E%):Y%=X%DIV256
10020?&7B7A=E%
10030ENDPROC
10040DEFPROCA
10050PROCctad
10060*MOUNT0
10070$cstring="DIR "+CHR$(Z%)+STR$(B%):C
ALL command
10080ENDPROC
10090DEFPROCtransfer(X%,A%)
10100CALL subd
10120PROCA
10130IF ?&7BD0=0 THEN 10170
10140FOR F%=1 TO ?&7BD0
10145IF ?(&7BD0+F%)<32 THEN ?(&7BD0+F%)=
?(&7BD0+F%)+32
10150$cstring="CDIR "+CHR$(?(&7BD0+F%)):
CALL command
10160NEXT
10170FOR E%=X% TO A%
10180PROCaddr
10190PROCctdi
10200CALL centry:?ftrack=!&7B80 DIV 10:?
fsec=!&7B80 MOD 10
10210!fbuff=HIMEM:PRINT CHR$(?&7BFF);"."
;$&7BE8;STRING$((18-LEN($&7BE8))," ");
10220IF !&7B84>W% THEN PROClong:GOTO 102
60
10230R%=0:CALL stload:IF ?fresult<>0 THE
N PROCde:GOTO10290
10240PRINT"-> ";
10250PROCA:PROCsave
10260IF R%=1 THEN 10290
10270PRINT CHR$(Z%);STR$(B%);".";F$
10280IF ?&7BFF>&80 THEN $cstring="ACCESS
"+F$+" R":CALL command
10290NEXT E%
10300ENDPROC
10310DEFPROCsave
10320IF ?(&7B90+E%)=&24 THEN F$=$&7BE8 E
LSE F$=CHR$(?(&7B90+E%))+"."+$&7BE8
10330$cstring="SAVE "+F$+" "+STR$÷HIMEM+
" "+STR$÷(HIMEM+!&7B84)+" "+FNadr(&7BE2,
&C0)+" "+FNadr(&7BE0,&C):CALL command
10340ENDPROC
10350DEFPROClong
10360L%=!&7B84:!&7B84=W%:M%=0:T%=0
10370REM L%=total length of file yet unl
oaded, M% is marker for very long file (
>2*W%),T%=PTR
10380R%=0:CALL stload:IF ?fresult<>0 THE
N PROCde:GOTO 10530
10390PRINT"-> ";
10400PROCA:PROCsave
10410L%=L%-W%:IF L%>W% THEN M%=1 ELSE M%
=0
10420IF M%=1 THEN !&7B84=W% ELSE !&7B84=
L%
10430PROCctdi
10440!fbuff=HIMEM:R%=0:CALL long:IF ?fre
sult<>0 THEN PROCde:GOTO 10530
10450PROCA:T%=T%+W%:!pointer=T%
10460!putdata=HIMEM:!putlength=!&7B84
10470$&7B60=F$
10480R%=0:CALL putbyte:IF ?fresult<>0 TH
EN PROCde:GOTO 10530
10490REM
10500REM
10510REM
10520IF M%=1 THEN 10410
10530ENDPROC
10540DEFPROCde
10550R%=1
10560PRINTTAB(20)"not transferable"
10570ENDPROC
11000DEFPROCctdi:IFV%=0:OSCLI"DISC":ENDP
ROC ELSE VDU3:PRINT'" INSERT DFS PRESS A
KEY":VDUQ%:REPEATUNTILGET:OSCLI"DISC":E
NDPROC:REM OSCLI"DR.1"????
11010DEFPROCctad:IFV%=0:OSCLI"ADFS":ENDP
ROC ELSE VDU3:OSCLI"FX21":PRINT'" INSERT
ADFS PRESS A KEY":VDUQ%:REPEATUNTILGET:
OSCLI"ADFS":ENDPROC
15000DEFFNadr(I%,J%)
15010REM I% represents load address (&7B
E0) or execution address (&7BE2)
15020REM J% represents bits of &7BE6 whi
ch when set imply a second processor add
ress (&C for load, &C0 for execution)
15030IF (?&7BE6 AND J%)=0 THEN K%=0 ELSE
K%=&FFFF0000
15040A$=STR$÷((!I%AND&FFFF)+K%)
15050=A$
20000DATA &7600,&7635,&7688,&7697,&76E3,
&76F6,&778E,&77D4,&7B10,&7B11,&7B17,&7B1
8,&7B19,&7B1A,&7B1B,&7B2A,&7B2B,&7B2F,&7
B33,&77FD,&77F5,&78D0