Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 » TechForum/!OS3_Fix/Modify
TechForum/!OS3_Fix/Modify
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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 |
| Filename: | TechForum/!OS3_Fix/Modify |
| Read OK: | ✔ |
| File size: | 02EB bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn Computing » 1994 02.adf » 9402 » TechForum/!OS3_Fix/Modify
- Recent acquisitions » Acorn ADFS disks » adfs_AcornComputing_199402.adf » 9402 » TechForum/!OS3_Fix/Modify
File contents
10SYS "OS_File",5,"<tabletos3fix$dir>.OldMod" TO ,,,,len%
20DIM data% len%+256, search% 12
30SYS "OS_File",255,"<tabletos3fix$dir>.OldMod",data%,0
40P%=search%
50[OPT 2
60MOV R0, #&9C
70MOV R1, #&DE
80SWI "XOS_Byte"
90]
100P%=0
110Q%=data%
120REPEAT
130 IF (Q%!0 = search%!0) AND (Q%!4 = search%!4) AND (Q%!8 = search%!8) P%=Q%+8
140 Q%+=1
150UNTIL (P%<>0) OR (Q%>data%+len%-12)
160IF P%=0 ERROR 0, "Can't find instructions to patch"
170[OPT 2
180BL data%+len%
190]
200FOR pass% = 0 TO 2 STEP 2
210P%=data%+len%
220[OPT pass%
230.ms%
240STMFD R13!,{R14}
250MOV R0,#1
260MOV R1,#%1000
270SWI "XOS_SerialOp"
280MOV R0,#2
290MOV R1,#2
300SWI "XOS_Byte"
310LDMFD R13!,{PC}
320.me%
330]
340NEXT
350SYS "OS_File",10,"<tabletos3fix$dir>.NewMod",&FFA,,data%,data%+len%+(me%-ms%)
9ș "OS_File",5,"<tabletos3fix$dir>.OldMod" � ,,,,len%
� data% len%+256, search% 12
8ș "OS_File",255,"<tabletos3fix$dir>.OldMod",data%,0
(P%=search%
2
[OPT 2
<MOV R0, #&9C
FMOV R1, #&DE
PSWI "XOS_Byte"
Z]
dP%=0
nQ%=data%
x�
�K � (Q%!0 = search%!0) � (Q%!4 = search%!4) � (Q%!8 = search%!8) P%=Q%+8
�
Q%+=1
�"� (P%<>0) � (Q%>data%+len%-12)
�2� P%=0 � 0, "Can't find instructions to patch"
�
[OPT 2
�BL data%+len%
�]
�� pass% = 0 � 2 � 2
�P%=data%+len%
�[OPT pass%
�.ms%
�STMFD R13!,{R14}
�
MOV R0,#1
MOV R1,#%1000
SWI "XOS_SerialOp"
MOV R0,#2
"
MOV R1,#2
,SWI "XOS_Byte"
6LDMFD R13!,{PC}
@.me%
J]
T�
^Pș "OS_File",10,"<tabletos3fix$dir>.NewMod",&FFA,,data%,data%+len%+(me%-ms%)
� 00000000 0d 00 0a 39 c8 99 20 22 4f 53 5f 46 69 6c 65 22 |...9.. "OS_File"|
00000010 2c 35 2c 22 3c 74 61 62 6c 65 74 6f 73 33 66 69 |,5,"<tabletos3fi|
00000020 78 24 64 69 72 3e 2e 4f 6c 64 4d 6f 64 22 20 b8 |x$dir>.OldMod" .|
00000030 20 2c 2c 2c 2c 6c 65 6e 25 0d 00 14 20 de 20 64 | ,,,,len%... . d|
00000040 61 74 61 25 20 6c 65 6e 25 2b 32 35 36 2c 20 73 |ata% len%+256, s|
00000050 65 61 72 63 68 25 20 31 32 0d 00 1e 38 c8 99 20 |earch% 12...8.. |
00000060 22 4f 53 5f 46 69 6c 65 22 2c 32 35 35 2c 22 3c |"OS_File",255,"<|
00000070 74 61 62 6c 65 74 6f 73 33 66 69 78 24 64 69 72 |tabletos3fix$dir|
00000080 3e 2e 4f 6c 64 4d 6f 64 22 2c 64 61 74 61 25 2c |>.OldMod",data%,|
00000090 30 0d 00 28 0e 50 25 3d 73 65 61 72 63 68 25 0d |0..(.P%=search%.|
000000a0 00 32 0a 5b 4f 50 54 20 32 0d 00 3c 10 4d 4f 56 |.2.[OPT 2..<.MOV|
000000b0 20 52 30 2c 20 23 26 39 43 0d 00 46 10 4d 4f 56 | R0, #&9C..F.MOV|
000000c0 20 52 31 2c 20 23 26 44 45 0d 00 50 12 53 57 49 | R1, #&DE..P.SWI|
000000d0 20 22 58 4f 53 5f 42 79 74 65 22 0d 00 5a 05 5d | "XOS_Byte"..Z.]|
000000e0 0d 00 64 08 50 25 3d 30 0d 00 6e 0c 51 25 3d 64 |..d.P%=0..n.Q%=d|
000000f0 61 74 61 25 0d 00 78 05 f5 0d 00 82 4b 20 e7 20 |ata%..x.....K . |
00000100 28 51 25 21 30 20 3d 20 73 65 61 72 63 68 25 21 |(Q%!0 = search%!|
00000110 30 29 20 80 20 28 51 25 21 34 20 3d 20 73 65 61 |0) . (Q%!4 = sea|
00000120 72 63 68 25 21 34 29 20 80 20 28 51 25 21 38 20 |rch%!4) . (Q%!8 |
00000130 3d 20 73 65 61 72 63 68 25 21 38 29 20 50 25 3d |= search%!8) P%=|
00000140 51 25 2b 38 0d 00 8c 0a 20 51 25 2b 3d 31 0d 00 |Q%+8.... Q%+=1..|
00000150 96 22 fd 20 28 50 25 3c 3e 30 29 20 84 20 28 51 |.". (P%<>0) . (Q|
00000160 25 3e 64 61 74 61 25 2b 6c 65 6e 25 2d 31 32 29 |%>data%+len%-12)|
00000170 0d 00 a0 32 e7 20 50 25 3d 30 20 85 20 30 2c 20 |...2. P%=0 . 0, |
00000180 22 43 61 6e 27 74 20 66 69 6e 64 20 69 6e 73 74 |"Can't find inst|
00000190 72 75 63 74 69 6f 6e 73 20 74 6f 20 70 61 74 63 |ructions to patc|
000001a0 68 22 0d 00 aa 0a 5b 4f 50 54 20 32 0d 00 b4 11 |h"....[OPT 2....|
000001b0 42 4c 20 64 61 74 61 25 2b 6c 65 6e 25 0d 00 be |BL data%+len%...|
000001c0 05 5d 0d 00 c8 17 e3 20 70 61 73 73 25 20 3d 20 |.]..... pass% = |
000001d0 30 20 b8 20 32 20 88 20 32 0d 00 d2 11 50 25 3d |0 . 2 . 2....P%=|
000001e0 64 61 74 61 25 2b 6c 65 6e 25 0d 00 dc 0e 5b 4f |data%+len%....[O|
000001f0 50 54 20 70 61 73 73 25 0d 00 e6 08 2e 6d 73 25 |PT pass%.....ms%|
00000200 0d 00 f0 14 53 54 4d 46 44 20 52 31 33 21 2c 7b |....STMFD R13!,{|
00000210 52 31 34 7d 0d 00 fa 0d 4d 4f 56 20 52 30 2c 23 |R14}....MOV R0,#|
00000220 31 0d 01 04 11 4d 4f 56 20 52 31 2c 23 25 31 30 |1....MOV R1,#%10|
00000230 30 30 0d 01 0e 16 53 57 49 20 22 58 4f 53 5f 53 |00....SWI "XOS_S|
00000240 65 72 69 61 6c 4f 70 22 0d 01 18 0d 4d 4f 56 20 |erialOp"....MOV |
00000250 52 30 2c 23 32 0d 01 22 0d 4d 4f 56 20 52 31 2c |R0,#2..".MOV R1,|
00000260 23 32 0d 01 2c 12 53 57 49 20 22 58 4f 53 5f 42 |#2..,.SWI "XOS_B|
00000270 79 74 65 22 0d 01 36 13 4c 44 4d 46 44 20 52 31 |yte"..6.LDMFD R1|
00000280 33 21 2c 7b 50 43 7d 0d 01 40 08 2e 6d 65 25 0d |3!,{PC}..@..me%.|
00000290 01 4a 05 5d 0d 01 54 05 ed 0d 01 5e 50 c8 99 20 |.J.]..T....^P.. |
000002a0 22 4f 53 5f 46 69 6c 65 22 2c 31 30 2c 22 3c 74 |"OS_File",10,"<t|
000002b0 61 62 6c 65 74 6f 73 33 66 69 78 24 64 69 72 3e |abletos3fix$dir>|
000002c0 2e 4e 65 77 4d 6f 64 22 2c 26 46 46 41 2c 2c 64 |.NewMod",&FFA,,d|
000002d0 61 74 61 25 2c 64 61 74 61 25 2b 6c 65 6e 25 2b |ata%,data%+len%+|
000002e0 28 6d 65 25 2d 6d 73 25 29 0d ff |(me%-ms%)..|
000002eb
.