8-Bit Software Online Conversion
:2.S.CusDNFS - Listing
10REM > CustomDNFS 1.20
20REM (C)1997-98 J.G.Harston
30REM Allows customising of NFS3.60 a
nd DFS1.20 in
40REM DNFS3.00 rom or 8k NFS3.60 rom
50:
60MODE&87:PRINTSPC5"Customise DNFS fo
r BBC B/B+"'SPC5;STRING$(27,"=")
70VDU 28,0,24,39,2:DIMmem%&4000:file$
="DNFS3-00":REM %.^.ROMImages
80PRINT'"File to load: '"file$"'":REP
EATINPUT":"A$:IFLEFT$(A$,1)="*":OSCLIA$
90UNTILLEFT$(A$,1)<>"*":IFA$<>"":file
$=A$
100PRINT"Loading...";:OSCLI"LOAD "+fil
e$+" "+STR$÷mem%
110IFmem%!13<>&54454E:PRINT'"File '"fi
le$"' is not a DNFS image.":END
120CLS:VDU26:PROCupdate:psn%=0:REPEATU
NTILFNchange
130A$="*Save DNFS3-01 "+STR$÷mem%+"+"
140IFmem%!9=&2C534644:A$=A$+"4000" ELS
E A$=A$+"2000"
150PRINTA$:END
160:
170DEFFNd(A%,N%)=RIGHT$("00000000"+STR
$A%,N%)
180DEFFNh(A%,N%)=RIGHT$("00000000"+STR
$÷A%,N%)
190DEFFNstn(A%):=FNd(A%DIV256,3)+"."+F
Nd(A%AND&FF,3)
200DEFFNdot(A$):I%=INSTR(A$,"."):IFI%=
0:=VALA$ ELSE =256*VALLEFT$(A$,I%-1)+VAL
MID$(A$,I%+1)
210:
220DEFFNtype(A%):LOCALA$:IFA%=0:="* Re
served *"
230IF(A%AND&FF00)=&FF00:A$="SJ " ELSE
IF(A%AND&FF00)=&0100:A$="Torch " ELSE IF
(A%AND&FF00)=&0200:A$="Reuters " ELSE IF
(A%AND&FF00)=&1000:A$="JGH " ELSE IFA%<2
56:A$="Acorn "
240IFA%=1:=A$+"BBC"
250IFA%=2:=A$+"Atom"
260IFA%=3:=A$+"System 3/4"
270IFA%=4:=A$+"System 5"
280IFA%=5:=A$+"Master 128"
290IFA%=6:=A$+"Electron"
300IFA%=7:=A$+"Archimedes"
310IFA%=8:=A$+"*Reserved*"
320IFA%=9:=A$+"Communic'r"
330IFA%=10:=A$+"Master ET"
340IFA%=11:=A$+"Filestore"
350IFA%=12:=A$+"M-Compact"
360IFA%=13:=A$+"PC Ecolink"
370IFA%=14:=A$+"RISCiX"
380IFA%=&1040:=A$+"Spectrum"
390IFA%=&1041:=A$+"Amstrad CPC"
400IFA%=&FFF8:=A$+"GP Server"
410IFA%=&FFF9:=A$+"80386 UNIX"
420IFA%=&FFFA:=A$+"SCSI Card"
430IFA%=&FFFB:=A$+"IBM Interface"
440IFA%=&FFFC:=A$+"Nascom 2"
450IFA%=&FFFD:=A$+"RM 480Z"
460IFA%=&FFFE:=A$+"File Server"
470IFA%=&FFFF:=A$+"Z80 CP/M"
480=A$+"?"
490:
500DEFPROCupdate:PRINTTAB(0,3);
510PRINT"Machine type: &";FNh(mem%!&2
1,4);" - ";FNtype(mem%!&21 AND &FFFF);SP
C(39-POS)''
520PRINT"NFS version: ";÷mem%?&24;"
.";÷mem%?&23''
530PRINT"Fileserver: ";FNstn(256*m
em%?&2EE+mem%?&2E7)''
540PRINT"Printer server: ";FNstn(256*m
em%?&2EE+mem%?&304)''
550PRINT"DFS version: ";:IFmem%!9=&
2C534644:PRINT$(mem%+&3A2C) ELSE PRINT"*
***"
560ENDPROC
570:
580DEFFNchange:PRINTTAB(0,psn%*3+4);
590IFpsn%=5:PRINT"Ok? ";:INPUT""A$:VDU
11:PRINTSPC39:psn%=0:=LEFT$(A$,1)="Y" OR
LEFT$(A$,1)="y"
600PRINT"Change to: ";:IFpsn%=4:VDU8,8
:PRINT" fix timeouts? ";
610INPUT""A$:VDU11:PRINTSPC39:psn%=psn
%+1:IFA$="":=0
620IFpsn%=1:A%=EVAL("&"+A$):mem%?&21=A
%:mem%?&22=A%DIV256
630IFpsn%=2:A%=FNdot(A$):mem%?&23=EVAL
("&"+STR$(A%AND&FF)):mem%?&24=A%DIV256
640IFpsn%=3:A%=FNdot(A$):mem%?&2E7=A%:
mem%?&2EE=A%DIV256
650IFpsn%=4:A%=FNdot(A$):mem%?&304=A%:
mem%?&2EE=A%DIV256
660IFpsn%=5:IFLEFT$(A$,1)="Y"ORLEFT$(A
$,1)="y":PROCFixDFS
670PROCupdate:=0
680:
690DEFPROCFixDFS:IF$(mem%+&3A2C)<>"DFS
1.20":ENDPROC
700mem%!&2C36=&A0BB0D20:REM Disk acces
s error calls fix
710$(mem%+&3ADD)="src> <dst>"+CHR$&BC+
"old> <new>"+CHR$&A8+"<dir>)"+CHR$&A8+"<
drv>)"+CHR$&BC+"title>"+CHR$&BC+"drv>"+C
HR$255:REM Shortened help text
720mem%!&3B0D=&03F010C9:mem%!&3B11=&AA
C74C:mem%!&3B14=&AB314C:REM Fix NotRdy
730mem%!&3B18=0:mem%!&3B1A=0:REM Six s
pare bytes
740$(mem%+&3A2C)="DFS 1.21":ENDPROC