8-Bit Software Online Conversion
Set Attributes - Listing
0MODE7
10REM Edit a file's catalogue entry
20REM (C)1997 SPROW
30DIM block% &12:REM control block
40DIM name% &10:REM Incase of other F
Ss
50osfi=&FFDD
60CLS:PRINT"OSFILE R/W file's catalog
ue entry":PRINT
70INPUT"Name of file (inc.dir): "name
$
80?(block%+0)=name% MOD256
90?(block%+1)=name% DIV256
100$name%=name$:?(name%+LEN(name$))=13
110A%=5:X%=block% MOD256:Y%=block% DIV
256:A%=USR(osfi)AND&FF:REM A=type
120IFA%=0 THENPRINT:PRINT"File not fou
nd":END
130PRINT"Load addr=&";÷!(block%+2)
140PRINT"Exec addr=&";÷!(block%+6)
150PRINT"Length=&";÷!(block%+10)
160PRINT"Attributes=&";÷!(block%+14);"
and is a ";
170IFA%=1 THENPRINT"file"
180IFA%=2 THENPRINT"dir"
190PRINT:ONERRORPRINT:REPORT:PRINT:END
200INPUT"Load addr=&"load$
210load%=EVAL("&"+load$)
220INPUT"Exec addr=&"exec$
230exec%=EVAL("&"+exec$)
240PRINT"Length=&";÷!(block%+10)
250INPUT"Attributes=&"attr$
260attr%=EVAL("&"+attr$)
270ONERROROFF
280!(block%+2)=load%
290!(block%+6)=exec%
300!(block%+14)=attr%
310A%=1:X%=block% MOD256:Y%=block% DIV
256:CALLosfi