Home » Personal collection » Acorn ADFS disks » Electron » PRES_E00_backup.ADF » Library/Basic/HardError

Library/Basic/HardError

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron » PRES_E00_backup.ADF
Filename: Library/Basic/HardError
Read OK:
File size: 0DE4 bytes
Load address: 0800
Exec address: 8023
File contents
    1REM V1.10
   10REM HardError - This removes a sector from the ADFS free space map
   11REM if possible, so it is neither free nor allocated and as such
   12REM inaccessible.  If it is not in the map, it is allocated and it
   13REM is up to you to free the space (delete the object).
   20:
   25MODE 7
   30PROCINIT
   35VDU14
   40:
   45PRINT'
   50PRINT"This program is intended for use in the"
   60PRINT"event of there being a disc error on a"
   70PRINT"Floppy  disc  when  it  is inconvenient"  
   80PRINT"to reformat the disc, ie when you need"
   90PRINT"to keep the data on the disc and avoid"
   95PRINT"the 'Disc error' message."
  100PRINT"This is done by removing the sector"
  105PRINT"from the ADFS free space map if"
  110PRINT"possible, so it is neither free nor"
  115PRINT"allocated and is as such inaccessible."
  120PRINT"If it is not in the map it is allocated"
  125PRINT"and it is up to you to free the space"
  130PRINT"by deleting the object which occupies"
  135PRINT"that space. If this is a directory the"
  140PRINT"structure of the disc will be corrupt"
  145PRINT"and you should back the disc up, saving"
  150PRINT"all the files you wish to keep and then"
  155PRINT"format the disc.  I assume that ADFS is"
  175PRINT"selected and that the error is on"
  180PRINT"the current drive.  If not, Escape."
  200PRINT
  210PRINT"Now please type in the disc address of"
  220PRINT"the error, either in decimal, or in Hex"
  230PRINT"preceded with '&', or press Escape."
  233PRINT'
  235VDU15
  240REPEATINPUT"Disc address ? "A$
  250Add%=EVAL(A$)
  260PRINT"The error is at "Add%" = &"~Add%
  270REPEATINPUT"Correct ? "A$
  280UNTIL INSTR("YyNn",LEFT$(A$,1))
  290UNTIL(ASCA$AND&5F)=ASC"Y"
  300:
  400PROCGetFS
  410:
  500PROCReserve(Add%,1)
  505IF F% GOTO 800
  510:
  600PROCPutFS
  610:
  620*Mount
  630:
  700END
  710:
  800PRINT"This sector is not in the map."
  810PRINT"Delete the object occupying the"
  820PRINT"space and try again."
  830END
11800:
11900:
12000DEF PROCINIT
12100@%=0
12300DIM ADD%(175),FLEN%(175)
12500DIM X% 20
12600DIM MAP% 512
12700Y%=X% DIV 256
12900ENDPROC
13000:
13100DEF PROCGetFS
13400REM Get the FSmap into ADD%(),FLEN%(),EOFSL%
13800PROCGetFSfromDisc
13900:
13910EOFSL%=(MAP%?&1FE)DIV3
14700FORI%=0 TO EOFSL%-1
14800ADD%(I%)=(!(MAP%+I%*3)AND&FFFFFF)
14900FLEN%(I%)=(!(MAP%+256+I%*3)AND&FFFFFF)
15000NEXT
15100ENDPROC
15200:
15300DEF PROCMAP
15400PRINT"Free Space Map"
15500PRINT"Address :  Length"
15600@%=6
15700FOR I%=0 TO EOFSL%-1
15800PRINT~ADD%(I%);"  :  ";~FLEN%(I%)
15900NEXT
16000ENDPROC
16100:
16200:
16300:
20300DEF PROCReserve(A%,L%)
20350F%=FALSE
20400IF L% ELSE ENDPROC
20500I%=-1
20600REPEAT I%=I%+1:UNTIL I%=EOFSL% OR ADD%(I%)+FLEN%(I%)>A%
20700IF I%=EOFSL% GOTO 21800
20800IF ADD%(I%)=A% GOTO 21600
20900IF ADD%(I%)>A% : GOTO 21800
21000IF ADD%(I%)+FLEN%(I%)=A%+L% : FLEN%(I%)=FLEN%(I%)-L% : ENDPROC
21050IF ADD%(I%)+FLEN%(I%)<A%+L% : GOTO 21800
21100FOR J%=EOFSL%-1 TO I%+1 STEP-1:ADD%(J%+1)=ADD%(J%):FLEN%(J%+1)=FLEN%(J%):NEXT
21200EOFSL%=EOFSL%+1
21300ADD%(I%+1)=A%+L%:FLEN%(I%+1)=ADD%(I%)+FLEN%(I%)-ADD%(I%+1)
21400FLEN%(I%)=A%-ADD%(I%) : ENDPROC
21500:
21600IF FLEN%(I%)>L% THEN ADD%(I%)=ADD%(I%)+L%:FLEN%(I%)=FLEN%(I%)-L%:ENDPROC
21700IF FLEN%(I%)=L% THEN FOR J%=I% TO EOFSL%-2:ADD%(J%)=ADD%(J%+1):FLEN%(J%)=FLEN%(J%+1):NEXT:EOFSL%=EOFSL%-1:ENDPROC
21800IF L%:F%=TRUE
21900ENDPROC
22000:
22100DEF PROCPutFS
22500A%=&72
22550IF EOFSL%>81:PRINT"***Map too full!":STOP
22600FOR I%=0 TO EOFSL%-1
22700MAP%!(I%*3)=ADD%(I%)
22800MAP%!(I%*3+256)=FLEN%(I%)
22900NEXT
23000:
23100MAP%?&1FE=EOFSL%*3
23200DIM Q% 30:P%=Q%:[OPT0
23300CLC:LDY#255:TYA
23400.L1 ADC MAP%-1,Y:DEY:BNE L1
23500TAX:DEY:TYA:CLC
23600.L2 ADC MAP%-1+256,Y:DEY:BNE L2
23700STX MAP%+255
23800STA MAP%+255+256
23900RTS:]
23905CALL Q%
23910REM and drop thru to...
23920DEF PROCPutFStoDisc
23930REM Put the new FSmap in MAP% onto the disc
24000?X%=0
24100A%=&72
24200X%!1=MAP%
24300X%!5=10
24400X%!9=2
24600CALL&FFF1
24700IF ?X% PRINT"Disc error "~?X%" while writing map - ended.":END
24900ENDPROC
25000:
25100:
28100:
28200DEF PROCGetFSfromDisc
28250REM Get the FSmap into MAP% as kept on the disc
28300A%=&72
28400?X%=0
28500X%!1=MAP%
28600X%!5=8
28700X%!9=2
28800CALL &FFF1
28900IF ?X% PRINT"Disc error "~?X%" while reading map - ended.":END
29000ENDPROC
� V1.10

D� HardError - This removes a sector from the ADFS free space map
B� if possible, so it is neither free nor allocated and as such
D� inaccessible.  If it is not in the map, it is allocated and it

9� is up to you to free the space (delete the object).
:
� 7
	�INIT
#�14
(:
-�'
2.�"This program is intended for use in the"
<-�"event of there being a disc error on a"
F0�"Floppy  disc  when  it  is inconvenient"  
P-�"to reformat the disc, ie when you need"
Z-�"to keep the data on the disc and avoid"
_ �"the 'Disc error' message."
d*�"This is done by removing the sector"
i&�"from the ADFS free space map if"
n*�"possible, so it is neither free nor"
s-�"allocated and is as such inaccessible."
x.�"If it is not in the map it is allocated"
},�"and it is up to you to free the space"
�,�"by deleting the object which occupies"
�-�"that space. If this is a directory the"
�,�"structure of the disc will be corrupt"
�.�"and you should back the disc up, saving"
�.�"all the files you wish to keep and then"
�.�"format the disc.  I assume that ADFS is"
�(�"selected and that the error is on"
�*�"the current drive.  If not, Escape."
��
�-�"Now please type in the disc address of"
�.�"the error, either in decimal, or in Hex"
�*�"preceded with '&', or press Escape."
��'
��15
���"Disc address ? "A$
�Add%=�(A$)
&�"The error is at "Add%" = &"~Add%
��"Correct ? "A$
� �"YyNn",�A$,1))
"�(�A$�&5F)=�"Y"
,:
�
�GetFS
�:
��Reserve(Add%,1)
�� F% � �T`C
�:
X
�PutFS
b:
l
*Mount
v:
��
�:
 %�"This sector is not in the map."
*&�"Delete the object occupying the"
4�"space and try again."
>�
.:
.|:
.�� �INIT
/D@%=0
0� ADD%(175),FLEN%(175)
0�� X% 20
18� MAP% 512
1�Y%=X% � 256
2d�
2�:
3,� �GetFS
4X.� Get the FSmap into ADD%(),FLEN%(),EOFSL%
5��GetFSfromDisc
6L:
6VEOFSL%=(MAP%?&1FE)�3
9l�I%=0 � EOFSL%-1
9�#ADD%(I%)=(!(MAP%+I%*3)�&FFFFFF)
:4(FLEN%(I%)=(!(MAP%+256+I%*3)�&FFFFFF)
:��
:��
;`:
;�
� �MAP
<(�"Free Space Map"
<��"Address :  Length"
<�@%=6
=T� I%=0 � EOFSL%-1
=�!�~ADD%(I%);"  :  ";~FLEN%(I%)
>�
>��
>�:
?H:
?�:
OL� �Reserve(A%,L%)
O~F%=�
O�� L% � �
P	I%=-1
Px1� I%=I%+1:� I%=EOFSL% � ADD%(I%)+FLEN%(I%)>A%
P�� I%=EOFSL% � �PhU
Q@� ADD%(I%)=A% � �@`T
Q�� ADD%(I%)>A% : � �PhU
R;� ADD%(I%)+FLEN%(I%)=A%+L% : FLEN%(I%)=FLEN%(I%)-L% : �
R:'� ADD%(I%)+FLEN%(I%)<A%+L% : � �PhU
RlH� J%=EOFSL%-1 � I%+1 �-1:ADD%(J%+1)=ADD%(J%):FLEN%(J%+1)=FLEN%(J%):�
R�EOFSL%=EOFSL%+1
S4>ADD%(I%+1)=A%+L%:FLEN%(I%+1)=ADD%(I%)+FLEN%(I%)-ADD%(I%+1)
S�FLEN%(I%)=A%-ADD%(I%) : �
S�:
T`B� FLEN%(I%)>L% � ADD%(I%)=ADD%(I%)+L%:FLEN%(I%)=FLEN%(I%)-L%:�
T�e� FLEN%(I%)=L% � � J%=I% � EOFSL%-2:ADD%(J%)=ADD%(J%+1):FLEN%(J%)=FLEN%(J%+1):�:EOFSL%=EOFSL%-1:�
U(
� L%:F%=�
U��
U�:
VT� �PutFS
W�
A%=&72
X%� EOFSL%>81:�"***Map too full!":�
XH� I%=0 � EOFSL%-1
X�MAP%!(I%*3)=ADD%(I%)
YMAP%!(I%*3+256)=FLEN%(I%)
Yt�
Y�:
Z<MAP%?&1FE=EOFSL%*3
Z�� Q% 30:P%=Q%:[OPT0
[CLC:LDY#255:TYA
[h.L1 ADC MAP%-1,Y:DEY:BNE L1
[�TAX:DEY:TYA:CLC
\0#.L2 ADC MAP%-1+256,Y:DEY:BNE L2
\�STX MAP%+255
\�STA MAP%+255+256
]\	RTS:]
]a� Q%
]f� and drop thru to...
]p� �PutFStoDisc
]z-� Put the new FSmap in MAP% onto the disc
]�	?X%=0
^$
A%=&72
^�
X%!1=MAP%
^�X%!5=10
_P
X%!9=2
`
�&FFF1
`|;� ?X% �"Disc error "~?X%" while writing map - ended.":�
aD�
a�:
b:
m�:
n(� �GetFSfromDisc
nZ1� Get the FSmap into MAP% as kept on the disc
n�
A%=&72
n�	?X%=0
oT
X%!1=MAP%
o�
X%!5=8
p
X%!9=2
p�� &FFF1
p�;� ?X% �"Disc error "~?X%" while reading map - ended.":�
qH�
�
00000000  0d 00 01 0b f4 20 56 31  2e 31 30 0d 00 0a 44 f4  |..... V1.10...D.|
00000010  20 48 61 72 64 45 72 72  6f 72 20 2d 20 54 68 69  | HardError - Thi|
00000020  73 20 72 65 6d 6f 76 65  73 20 61 20 73 65 63 74  |s removes a sect|
00000030  6f 72 20 66 72 6f 6d 20  74 68 65 20 41 44 46 53  |or from the ADFS|
00000040  20 66 72 65 65 20 73 70  61 63 65 20 6d 61 70 0d  | free space map.|
00000050  00 0b 42 f4 20 69 66 20  70 6f 73 73 69 62 6c 65  |..B. if possible|
00000060  2c 20 73 6f 20 69 74 20  69 73 20 6e 65 69 74 68  |, so it is neith|
00000070  65 72 20 66 72 65 65 20  6e 6f 72 20 61 6c 6c 6f  |er free nor allo|
00000080  63 61 74 65 64 20 61 6e  64 20 61 73 20 73 75 63  |cated and as suc|
00000090  68 0d 00 0c 44 f4 20 69  6e 61 63 63 65 73 73 69  |h...D. inaccessi|
000000a0  62 6c 65 2e 20 20 49 66  20 69 74 20 69 73 20 6e  |ble.  If it is n|
000000b0  6f 74 20 69 6e 20 74 68  65 20 6d 61 70 2c 20 69  |ot in the map, i|
000000c0  74 20 69 73 20 61 6c 6c  6f 63 61 74 65 64 20 61  |t is allocated a|
000000d0  6e 64 20 69 74 0d 00 0d  39 f4 20 69 73 20 75 70  |nd it...9. is up|
000000e0  20 74 6f 20 79 6f 75 20  74 6f 20 66 72 65 65 20  | to you to free |
000000f0  74 68 65 20 73 70 61 63  65 20 28 64 65 6c 65 74  |the space (delet|
00000100  65 20 74 68 65 20 6f 62  6a 65 63 74 29 2e 0d 00  |e the object)...|
00000110  14 05 3a 0d 00 19 07 eb  20 37 0d 00 1e 09 f2 49  |..:..... 7.....I|
00000120  4e 49 54 0d 00 23 07 ef  31 34 0d 00 28 05 3a 0d  |NIT..#..14..(.:.|
00000130  00 2d 06 f1 27 0d 00 32  2e f1 22 54 68 69 73 20  |.-..'..2.."This |
00000140  70 72 6f 67 72 61 6d 20  69 73 20 69 6e 74 65 6e  |program is inten|
00000150  64 65 64 20 66 6f 72 20  75 73 65 20 69 6e 20 74  |ded for use in t|
00000160  68 65 22 0d 00 3c 2d f1  22 65 76 65 6e 74 20 6f  |he"..<-."event o|
00000170  66 20 74 68 65 72 65 20  62 65 69 6e 67 20 61 20  |f there being a |
00000180  64 69 73 63 20 65 72 72  6f 72 20 6f 6e 20 61 22  |disc error on a"|
00000190  0d 00 46 30 f1 22 46 6c  6f 70 70 79 20 20 64 69  |..F0."Floppy  di|
000001a0  73 63 20 20 77 68 65 6e  20 20 69 74 20 20 69 73  |sc  when  it  is|
000001b0  20 69 6e 63 6f 6e 76 65  6e 69 65 6e 74 22 20 20  | inconvenient"  |
000001c0  0d 00 50 2d f1 22 74 6f  20 72 65 66 6f 72 6d 61  |..P-."to reforma|
000001d0  74 20 74 68 65 20 64 69  73 63 2c 20 69 65 20 77  |t the disc, ie w|
000001e0  68 65 6e 20 79 6f 75 20  6e 65 65 64 22 0d 00 5a  |hen you need"..Z|
000001f0  2d f1 22 74 6f 20 6b 65  65 70 20 74 68 65 20 64  |-."to keep the d|
00000200  61 74 61 20 6f 6e 20 74  68 65 20 64 69 73 63 20  |ata on the disc |
00000210  61 6e 64 20 61 76 6f 69  64 22 0d 00 5f 20 f1 22  |and avoid".._ ."|
00000220  74 68 65 20 27 44 69 73  63 20 65 72 72 6f 72 27  |the 'Disc error'|
00000230  20 6d 65 73 73 61 67 65  2e 22 0d 00 64 2a f1 22  | message."..d*."|
00000240  54 68 69 73 20 69 73 20  64 6f 6e 65 20 62 79 20  |This is done by |
00000250  72 65 6d 6f 76 69 6e 67  20 74 68 65 20 73 65 63  |removing the sec|
00000260  74 6f 72 22 0d 00 69 26  f1 22 66 72 6f 6d 20 74  |tor"..i&."from t|
00000270  68 65 20 41 44 46 53 20  66 72 65 65 20 73 70 61  |he ADFS free spa|
00000280  63 65 20 6d 61 70 20 69  66 22 0d 00 6e 2a f1 22  |ce map if"..n*."|
00000290  70 6f 73 73 69 62 6c 65  2c 20 73 6f 20 69 74 20  |possible, so it |
000002a0  69 73 20 6e 65 69 74 68  65 72 20 66 72 65 65 20  |is neither free |
000002b0  6e 6f 72 22 0d 00 73 2d  f1 22 61 6c 6c 6f 63 61  |nor"..s-."alloca|
000002c0  74 65 64 20 61 6e 64 20  69 73 20 61 73 20 73 75  |ted and is as su|
000002d0  63 68 20 69 6e 61 63 63  65 73 73 69 62 6c 65 2e  |ch inaccessible.|
000002e0  22 0d 00 78 2e f1 22 49  66 20 69 74 20 69 73 20  |"..x.."If it is |
000002f0  6e 6f 74 20 69 6e 20 74  68 65 20 6d 61 70 20 69  |not in the map i|
00000300  74 20 69 73 20 61 6c 6c  6f 63 61 74 65 64 22 0d  |t is allocated".|
00000310  00 7d 2c f1 22 61 6e 64  20 69 74 20 69 73 20 75  |.},."and it is u|
00000320  70 20 74 6f 20 79 6f 75  20 74 6f 20 66 72 65 65  |p to you to free|
00000330  20 74 68 65 20 73 70 61  63 65 22 0d 00 82 2c f1  | the space"...,.|
00000340  22 62 79 20 64 65 6c 65  74 69 6e 67 20 74 68 65  |"by deleting the|
00000350  20 6f 62 6a 65 63 74 20  77 68 69 63 68 20 6f 63  | object which oc|
00000360  63 75 70 69 65 73 22 0d  00 87 2d f1 22 74 68 61  |cupies"...-."tha|
00000370  74 20 73 70 61 63 65 2e  20 49 66 20 74 68 69 73  |t space. If this|
00000380  20 69 73 20 61 20 64 69  72 65 63 74 6f 72 79 20  | is a directory |
00000390  74 68 65 22 0d 00 8c 2c  f1 22 73 74 72 75 63 74  |the"...,."struct|
000003a0  75 72 65 20 6f 66 20 74  68 65 20 64 69 73 63 20  |ure of the disc |
000003b0  77 69 6c 6c 20 62 65 20  63 6f 72 72 75 70 74 22  |will be corrupt"|
000003c0  0d 00 91 2e f1 22 61 6e  64 20 79 6f 75 20 73 68  |....."and you sh|
000003d0  6f 75 6c 64 20 62 61 63  6b 20 74 68 65 20 64 69  |ould back the di|
000003e0  73 63 20 75 70 2c 20 73  61 76 69 6e 67 22 0d 00  |sc up, saving"..|
000003f0  96 2e f1 22 61 6c 6c 20  74 68 65 20 66 69 6c 65  |..."all the file|
00000400  73 20 79 6f 75 20 77 69  73 68 20 74 6f 20 6b 65  |s you wish to ke|
00000410  65 70 20 61 6e 64 20 74  68 65 6e 22 0d 00 9b 2e  |ep and then"....|
00000420  f1 22 66 6f 72 6d 61 74  20 74 68 65 20 64 69 73  |."format the dis|
00000430  63 2e 20 20 49 20 61 73  73 75 6d 65 20 74 68 61  |c.  I assume tha|
00000440  74 20 41 44 46 53 20 69  73 22 0d 00 af 28 f1 22  |t ADFS is"...(."|
00000450  73 65 6c 65 63 74 65 64  20 61 6e 64 20 74 68 61  |selected and tha|
00000460  74 20 74 68 65 20 65 72  72 6f 72 20 69 73 20 6f  |t the error is o|
00000470  6e 22 0d 00 b4 2a f1 22  74 68 65 20 63 75 72 72  |n"...*."the curr|
00000480  65 6e 74 20 64 72 69 76  65 2e 20 20 49 66 20 6e  |ent drive.  If n|
00000490  6f 74 2c 20 45 73 63 61  70 65 2e 22 0d 00 c8 05  |ot, Escape."....|
000004a0  f1 0d 00 d2 2d f1 22 4e  6f 77 20 70 6c 65 61 73  |....-."Now pleas|
000004b0  65 20 74 79 70 65 20 69  6e 20 74 68 65 20 64 69  |e type in the di|
000004c0  73 63 20 61 64 64 72 65  73 73 20 6f 66 22 0d 00  |sc address of"..|
000004d0  dc 2e f1 22 74 68 65 20  65 72 72 6f 72 2c 20 65  |..."the error, e|
000004e0  69 74 68 65 72 20 69 6e  20 64 65 63 69 6d 61 6c  |ither in decimal|
000004f0  2c 20 6f 72 20 69 6e 20  48 65 78 22 0d 00 e6 2a  |, or in Hex"...*|
00000500  f1 22 70 72 65 63 65 64  65 64 20 77 69 74 68 20  |."preceded with |
00000510  27 26 27 2c 20 6f 72 20  70 72 65 73 73 20 45 73  |'&', or press Es|
00000520  63 61 70 65 2e 22 0d 00  e9 06 f1 27 0d 00 eb 07  |cape.".....'....|
00000530  ef 31 35 0d 00 f0 19 f5  e8 22 44 69 73 63 20 61  |.15......"Disc a|
00000540  64 64 72 65 73 73 20 3f  20 22 41 24 0d 00 fa 0e  |ddress ? "A$....|
00000550  41 64 64 25 3d a0 28 41  24 29 0d 01 04 26 f1 22  |Add%=.(A$)...&."|
00000560  54 68 65 20 65 72 72 6f  72 20 69 73 20 61 74 20  |The error is at |
00000570  22 41 64 64 25 22 20 3d  20 26 22 7e 41 64 64 25  |"Add%" = &"~Add%|
00000580  0d 01 0e 14 f5 e8 22 43  6f 72 72 65 63 74 20 3f  |......"Correct ?|
00000590  20 22 41 24 0d 01 18 15  fd 20 a7 22 59 79 4e 6e  | "A$..... ."YyNn|
000005a0  22 2c c0 41 24 2c 31 29  29 0d 01 22 13 fd 28 97  |",.A$,1)).."..(.|
000005b0  41 24 80 26 35 46 29 3d  97 22 59 22 0d 01 2c 05  |A$.&5F)=."Y"..,.|
000005c0  3a 0d 01 90 0a f2 47 65  74 46 53 0d 01 9a 05 3a  |:.....GetFS....:|
000005d0  0d 01 f4 14 f2 52 65 73  65 72 76 65 28 41 64 64  |.....Reserve(Add|
000005e0  25 2c 31 29 0d 01 f9 0f  e7 20 46 25 20 e5 20 8d  |%,1)..... F% . .|
000005f0  54 60 43 0d 01 fe 05 3a  0d 02 58 0a f2 50 75 74  |T`C....:..X..Put|
00000600  46 53 0d 02 62 05 3a 0d  02 6c 0a 2a 4d 6f 75 6e  |FS..b.:..l.*Moun|
00000610  74 0d 02 76 05 3a 0d 02  bc 05 e0 0d 02 c6 05 3a  |t..v.:.........:|
00000620  0d 03 20 25 f1 22 54 68  69 73 20 73 65 63 74 6f  |.. %."This secto|
00000630  72 20 69 73 20 6e 6f 74  20 69 6e 20 74 68 65 20  |r is not in the |
00000640  6d 61 70 2e 22 0d 03 2a  26 f1 22 44 65 6c 65 74  |map."..*&."Delet|
00000650  65 20 74 68 65 20 6f 62  6a 65 63 74 20 6f 63 63  |e the object occ|
00000660  75 70 79 69 6e 67 20 74  68 65 22 0d 03 34 1b f1  |upying the"..4..|
00000670  22 73 70 61 63 65 20 61  6e 64 20 74 72 79 20 61  |"space and try a|
00000680  67 61 69 6e 2e 22 0d 03  3e 05 e0 0d 2e 18 05 3a  |gain."..>......:|
00000690  0d 2e 7c 05 3a 0d 2e e0  0b dd 20 f2 49 4e 49 54  |..|.:..... .INIT|
000006a0  0d 2f 44 08 40 25 3d 30  0d 30 0c 1a de 20 41 44  |./D.@%=0.0... AD|
000006b0  44 25 28 31 37 35 29 2c  46 4c 45 4e 25 28 31 37  |D%(175),FLEN%(17|
000006c0  35 29 0d 30 d4 0b de 20  58 25 20 32 30 0d 31 38  |5).0... X% 20.18|
000006d0  0e de 20 4d 41 50 25 20  35 31 32 0d 31 9c 0f 59  |.. MAP% 512.1..Y|
000006e0  25 3d 58 25 20 81 20 32  35 36 0d 32 64 05 e1 0d  |%=X% . 256.2d...|
000006f0  32 c8 05 3a 0d 33 2c 0c  dd 20 f2 47 65 74 46 53  |2..:.3,.. .GetFS|
00000700  0d 34 58 2e f4 20 47 65  74 20 74 68 65 20 46 53  |.4X.. Get the FS|
00000710  6d 61 70 20 69 6e 74 6f  20 41 44 44 25 28 29 2c  |map into ADD%(),|
00000720  46 4c 45 4e 25 28 29 2c  45 4f 46 53 4c 25 0d 35  |FLEN%(),EOFSL%.5|
00000730  e8 12 f2 47 65 74 46 53  66 72 6f 6d 44 69 73 63  |...GetFSfromDisc|
00000740  0d 36 4c 05 3a 0d 36 56  18 45 4f 46 53 4c 25 3d  |.6L.:.6V.EOFSL%=|
00000750  28 4d 41 50 25 3f 26 31  46 45 29 81 33 0d 39 6c  |(MAP%?&1FE).3.9l|
00000760  14 e3 49 25 3d 30 20 b8  20 45 4f 46 53 4c 25 2d  |..I%=0 . EOFSL%-|
00000770  31 0d 39 d0 23 41 44 44  25 28 49 25 29 3d 28 21  |1.9.#ADD%(I%)=(!|
00000780  28 4d 41 50 25 2b 49 25  2a 33 29 80 26 46 46 46  |(MAP%+I%*3).&FFF|
00000790  46 46 46 29 0d 3a 34 28  46 4c 45 4e 25 28 49 25  |FFF).:4(FLEN%(I%|
000007a0  29 3d 28 21 28 4d 41 50  25 2b 32 35 36 2b 49 25  |)=(!(MAP%+256+I%|
000007b0  2a 33 29 80 26 46 46 46  46 46 46 29 0d 3a 98 05  |*3).&FFFFFF).:..|
000007c0  ed 0d 3a fc 05 e1 0d 3b  60 05 3a 0d 3b c4 0a dd  |..:....;`.:.;...|
000007d0  20 f2 4d 41 50 0d 3c 28  15 f1 22 46 72 65 65 20  | .MAP.<(.."Free |
000007e0  53 70 61 63 65 20 4d 61  70 22 0d 3c 8c 18 f1 22  |Space Map".<..."|
000007f0  41 64 64 72 65 73 73 20  3a 20 20 4c 65 6e 67 74  |Address :  Lengt|
00000800  68 22 0d 3c f0 08 40 25  3d 36 0d 3d 54 15 e3 20  |h".<..@%=6.=T.. |
00000810  49 25 3d 30 20 b8 20 45  4f 46 53 4c 25 2d 31 0d  |I%=0 . EOFSL%-1.|
00000820  3d b8 21 f1 7e 41 44 44  25 28 49 25 29 3b 22 20  |=.!.~ADD%(I%);" |
00000830  20 3a 20 20 22 3b 7e 46  4c 45 4e 25 28 49 25 29  | :  ";~FLEN%(I%)|
00000840  0d 3e 1c 05 ed 0d 3e 80  05 e1 0d 3e e4 05 3a 0d  |.>....>....>..:.|
00000850  3f 48 05 3a 0d 3f ac 05  3a 0d 4f 4c 15 dd 20 f2  |?H.:.?..:.OL.. .|
00000860  52 65 73 65 72 76 65 28  41 25 2c 4c 25 29 0d 4f  |Reserve(A%,L%).O|
00000870  7e 08 46 25 3d a3 0d 4f  b0 0c e7 20 4c 25 20 8b  |~.F%=..O... L% .|
00000880  20 e1 0d 50 14 09 49 25  3d 2d 31 0d 50 78 31 f5  | ..P..I%=-1.Px1.|
00000890  20 49 25 3d 49 25 2b 31  3a fd 20 49 25 3d 45 4f  | I%=I%+1:. I%=EO|
000008a0  46 53 4c 25 20 84 20 41  44 44 25 28 49 25 29 2b  |FSL% . ADD%(I%)+|
000008b0  46 4c 45 4e 25 28 49 25  29 3e 41 25 0d 50 dc 16  |FLEN%(I%)>A%.P..|
000008c0  e7 20 49 25 3d 45 4f 46  53 4c 25 20 e5 20 8d 50  |. I%=EOFSL% . .P|
000008d0  68 55 0d 51 40 18 e7 20  41 44 44 25 28 49 25 29  |hU.Q@.. ADD%(I%)|
000008e0  3d 41 25 20 e5 20 8d 40  60 54 0d 51 a4 1a e7 20  |=A% . .@`T.Q... |
000008f0  41 44 44 25 28 49 25 29  3e 41 25 20 3a 20 e5 20  |ADD%(I%)>A% : . |
00000900  8d 50 68 55 0d 52 08 3b  e7 20 41 44 44 25 28 49  |.PhU.R.;. ADD%(I|
00000910  25 29 2b 46 4c 45 4e 25  28 49 25 29 3d 41 25 2b  |%)+FLEN%(I%)=A%+|
00000920  4c 25 20 3a 20 46 4c 45  4e 25 28 49 25 29 3d 46  |L% : FLEN%(I%)=F|
00000930  4c 45 4e 25 28 49 25 29  2d 4c 25 20 3a 20 e1 0d  |LEN%(I%)-L% : ..|
00000940  52 3a 27 e7 20 41 44 44  25 28 49 25 29 2b 46 4c  |R:'. ADD%(I%)+FL|
00000950  45 4e 25 28 49 25 29 3c  41 25 2b 4c 25 20 3a 20  |EN%(I%)<A%+L% : |
00000960  e5 20 8d 50 68 55 0d 52  6c 48 e3 20 4a 25 3d 45  |. .PhU.RlH. J%=E|
00000970  4f 46 53 4c 25 2d 31 20  b8 20 49 25 2b 31 20 88  |OFSL%-1 . I%+1 .|
00000980  2d 31 3a 41 44 44 25 28  4a 25 2b 31 29 3d 41 44  |-1:ADD%(J%+1)=AD|
00000990  44 25 28 4a 25 29 3a 46  4c 45 4e 25 28 4a 25 2b  |D%(J%):FLEN%(J%+|
000009a0  31 29 3d 46 4c 45 4e 25  28 4a 25 29 3a ed 0d 52  |1)=FLEN%(J%):..R|
000009b0  d0 13 45 4f 46 53 4c 25  3d 45 4f 46 53 4c 25 2b  |..EOFSL%=EOFSL%+|
000009c0  31 0d 53 34 3e 41 44 44  25 28 49 25 2b 31 29 3d  |1.S4>ADD%(I%+1)=|
000009d0  41 25 2b 4c 25 3a 46 4c  45 4e 25 28 49 25 2b 31  |A%+L%:FLEN%(I%+1|
000009e0  29 3d 41 44 44 25 28 49  25 29 2b 46 4c 45 4e 25  |)=ADD%(I%)+FLEN%|
000009f0  28 49 25 29 2d 41 44 44  25 28 49 25 2b 31 29 0d  |(I%)-ADD%(I%+1).|
00000a00  53 98 1d 46 4c 45 4e 25  28 49 25 29 3d 41 25 2d  |S..FLEN%(I%)=A%-|
00000a10  41 44 44 25 28 49 25 29  20 3a 20 e1 0d 53 fc 05  |ADD%(I%) : ..S..|
00000a20  3a 0d 54 60 42 e7 20 46  4c 45 4e 25 28 49 25 29  |:.T`B. FLEN%(I%)|
00000a30  3e 4c 25 20 8c 20 41 44  44 25 28 49 25 29 3d 41  |>L% . ADD%(I%)=A|
00000a40  44 44 25 28 49 25 29 2b  4c 25 3a 46 4c 45 4e 25  |DD%(I%)+L%:FLEN%|
00000a50  28 49 25 29 3d 46 4c 45  4e 25 28 49 25 29 2d 4c  |(I%)=FLEN%(I%)-L|
00000a60  25 3a e1 0d 54 c4 65 e7  20 46 4c 45 4e 25 28 49  |%:..T.e. FLEN%(I|
00000a70  25 29 3d 4c 25 20 8c 20  e3 20 4a 25 3d 49 25 20  |%)=L% . . J%=I% |
00000a80  b8 20 45 4f 46 53 4c 25  2d 32 3a 41 44 44 25 28  |. EOFSL%-2:ADD%(|
00000a90  4a 25 29 3d 41 44 44 25  28 4a 25 2b 31 29 3a 46  |J%)=ADD%(J%+1):F|
00000aa0  4c 45 4e 25 28 4a 25 29  3d 46 4c 45 4e 25 28 4a  |LEN%(J%)=FLEN%(J|
00000ab0  25 2b 31 29 3a ed 3a 45  4f 46 53 4c 25 3d 45 4f  |%+1):.:EOFSL%=EO|
00000ac0  46 53 4c 25 2d 31 3a e1  0d 55 28 0d e7 20 4c 25  |FSL%-1:..U(.. L%|
00000ad0  3a 46 25 3d b9 0d 55 8c  05 e1 0d 55 f0 05 3a 0d  |:F%=..U....U..:.|
00000ae0  56 54 0c dd 20 f2 50 75  74 46 53 0d 57 e4 0a 41  |VT.. .PutFS.W..A|
00000af0  25 3d 26 37 32 0d 58 16  25 e7 20 45 4f 46 53 4c  |%=&72.X.%. EOFSL|
00000b00  25 3e 38 31 3a f1 22 2a  2a 2a 4d 61 70 20 74 6f  |%>81:."***Map to|
00000b10  6f 20 66 75 6c 6c 21 22  3a fa 0d 58 48 15 e3 20  |o full!":..XH.. |
00000b20  49 25 3d 30 20 b8 20 45  4f 46 53 4c 25 2d 31 0d  |I%=0 . EOFSL%-1.|
00000b30  58 ac 18 4d 41 50 25 21  28 49 25 2a 33 29 3d 41  |X..MAP%!(I%*3)=A|
00000b40  44 44 25 28 49 25 29 0d  59 10 1d 4d 41 50 25 21  |DD%(I%).Y..MAP%!|
00000b50  28 49 25 2a 33 2b 32 35  36 29 3d 46 4c 45 4e 25  |(I%*3+256)=FLEN%|
00000b60  28 49 25 29 0d 59 74 05  ed 0d 59 d8 05 3a 0d 5a  |(I%).Yt...Y..:.Z|
00000b70  3c 16 4d 41 50 25 3f 26  31 46 45 3d 45 4f 46 53  |<.MAP%?&1FE=EOFS|
00000b80  4c 25 2a 33 0d 5a a0 17  de 20 51 25 20 33 30 3a  |L%*3.Z... Q% 30:|
00000b90  50 25 3d 51 25 3a 5b 4f  50 54 30 0d 5b 04 13 43  |P%=Q%:[OPT0.[..C|
00000ba0  4c 43 3a 4c 44 59 23 32  35 35 3a 54 59 41 0d 5b  |LC:LDY#255:TYA.[|
00000bb0  68 1f 2e 4c 31 20 41 44  43 20 4d 41 50 25 2d 31  |h..L1 ADC MAP%-1|
00000bc0  2c 59 3a 44 45 59 3a 42  4e 45 20 4c 31 0d 5b cc  |,Y:DEY:BNE L1.[.|
00000bd0  13 54 41 58 3a 44 45 59  3a 54 59 41 3a 43 4c 43  |.TAX:DEY:TYA:CLC|
00000be0  0d 5c 30 23 2e 4c 32 20  41 44 43 20 4d 41 50 25  |.\0#.L2 ADC MAP%|
00000bf0  2d 31 2b 32 35 36 2c 59  3a 44 45 59 3a 42 4e 45  |-1+256,Y:DEY:BNE|
00000c00  20 4c 32 0d 5c 94 10 53  54 58 20 4d 41 50 25 2b  | L2.\..STX MAP%+|
00000c10  32 35 35 0d 5c f8 14 53  54 41 20 4d 41 50 25 2b  |255.\..STA MAP%+|
00000c20  32 35 35 2b 32 35 36 0d  5d 5c 09 52 54 53 3a 5d  |255+256.]\.RTS:]|
00000c30  0d 5d 61 08 d6 20 51 25  0d 5d 66 19 f4 20 61 6e  |.]a.. Q%.]f.. an|
00000c40  64 20 64 72 6f 70 20 74  68 72 75 20 74 6f 2e 2e  |d drop thru to..|
00000c50  2e 0d 5d 70 12 dd 20 f2  50 75 74 46 53 74 6f 44  |..]p.. .PutFStoD|
00000c60  69 73 63 0d 5d 7a 2d f4  20 50 75 74 20 74 68 65  |isc.]z-. Put the|
00000c70  20 6e 65 77 20 46 53 6d  61 70 20 69 6e 20 4d 41  | new FSmap in MA|
00000c80  50 25 20 6f 6e 74 6f 20  74 68 65 20 64 69 73 63  |P% onto the disc|
00000c90  0d 5d c0 09 3f 58 25 3d  30 0d 5e 24 0a 41 25 3d  |.]..?X%=0.^$.A%=|
00000ca0  26 37 32 0d 5e 88 0d 58  25 21 31 3d 4d 41 50 25  |&72.^..X%!1=MAP%|
00000cb0  0d 5e ec 0b 58 25 21 35  3d 31 30 0d 5f 50 0a 58  |.^..X%!5=10._P.X|
00000cc0  25 21 39 3d 32 0d 60 18  0a d6 26 46 46 46 31 0d  |%!9=2.`...&FFF1.|
00000cd0  60 7c 3b e7 20 3f 58 25  20 f1 22 44 69 73 63 20  |`|;. ?X% ."Disc |
00000ce0  65 72 72 6f 72 20 22 7e  3f 58 25 22 20 77 68 69  |error "~?X%" whi|
00000cf0  6c 65 20 77 72 69 74 69  6e 67 20 6d 61 70 20 2d  |le writing map -|
00000d00  20 65 6e 64 65 64 2e 22  3a e0 0d 61 44 05 e1 0d  | ended.":..aD...|
00000d10  61 a8 05 3a 0d 62 0c 05  3a 0d 6d c4 05 3a 0d 6e  |a..:.b..:.m..:.n|
00000d20  28 14 dd 20 f2 47 65 74  46 53 66 72 6f 6d 44 69  |(.. .GetFSfromDi|
00000d30  73 63 0d 6e 5a 31 f4 20  47 65 74 20 74 68 65 20  |sc.nZ1. Get the |
00000d40  46 53 6d 61 70 20 69 6e  74 6f 20 4d 41 50 25 20  |FSmap into MAP% |
00000d50  61 73 20 6b 65 70 74 20  6f 6e 20 74 68 65 20 64  |as kept on the d|
00000d60  69 73 63 0d 6e 8c 0a 41  25 3d 26 37 32 0d 6e f0  |isc.n..A%=&72.n.|
00000d70  09 3f 58 25 3d 30 0d 6f  54 0d 58 25 21 31 3d 4d  |.?X%=0.oT.X%!1=M|
00000d80  41 50 25 0d 6f b8 0a 58  25 21 35 3d 38 0d 70 1c  |AP%.o..X%!5=8.p.|
00000d90  0a 58 25 21 39 3d 32 0d  70 80 0b d6 20 26 46 46  |.X%!9=2.p... &FF|
00000da0  46 31 0d 70 e4 3b e7 20  3f 58 25 20 f1 22 44 69  |F1.p.;. ?X% ."Di|
00000db0  73 63 20 65 72 72 6f 72  20 22 7e 3f 58 25 22 20  |sc error "~?X%" |
00000dc0  77 68 69 6c 65 20 72 65  61 64 69 6e 67 20 6d 61  |while reading ma|
00000dd0  70 20 2d 20 65 6e 64 65  64 2e 22 3a e0 0d 71 48  |p - ended.":..qH|
00000de0  05 e1 0d ff                                       |....|
00000de4
Library/Basic/HardError.m0
Library/Basic/HardError.m1
Library/Basic/HardError.m2
Library/Basic/HardError.m4
Library/Basic/HardError.m5