Boot

Used Exports

BUILTINS: BYTE CHAR CHR DEC INC INTEGER LEN LONGINT ODD
Files: File Length New Old Read ReadByte ReadInt ReadString Register Rider Rider.eof Set Write WriteByte WriteInt
Kernel: PutSector SectorLength heapOrg
Modules: AllocPtr
Oberon: Log Par Par.pos Par.text
SYSTEM: GET PUT VAL
Texts: Append Int Name OpenScanner OpenWriter Scan Scanner Scanner.class Scanner.i Scanner.s String Write WriteInt WriteLn WriteString Writer Writer.buf

MODULE Boot; (*Oberon boot linker/loader for RISC; AP 1.9.18 Original Oberon 2013*)
.MODULE Boot (KEY 695C7025, VERSION 1, SIZE 00002F04)
.IMPORT Kernel (KEY 97E012DD)
.IMPORT Files (KEY 73F5D686)
.IMPORT Modules (KEY 41C6A19A)
.IMPORT Texts (KEY 0B9E9984)
.IMPORT Fonts (KEY F4C9F557)
.IMPORT Oberon (KEY A89CCEE2)
.IMPORT Display (KEY 4C08D3EA)
.IMPORT Viewers (KEY 25ABF199)
.TYPEDESC 00000080 FFFFFFFF FFFFFFFF FFFFFFFF 00000020 FFFFFFFF
.DATA 80H
.STRING 98H ".rsc"
.STRING A0H " linking"
.STRING ACH ".bin"
.STRING B4H "Link error: "
.STRING C4H " module not found"
.STRING D8H " bad version"
.STRING E8H " imports "
.STRING F4H " with bad key"
.STRING 104H " corrupted obj file"
.STRING 118H " insufficient space"
.STRING 12CH "Usage: Boot.Link module"
.STRING 144H " loading "
.STRING 150H " onto boot area"
.STRING 160H " not found"
.STRING 16CH "Usage: Boot.Load M.bin"
.STRING 184H " WriteFile "
.STRING 194H " done"
.STRING 19CH " insufficent size"
.STRING 1B0H " imports not allowed"
.STRING 1C8H " input file format error"
.STRING 1E4H " program too long"
.STRING 1F8H " input file not found"
.STRING 210H " size must be positive"
.STRING 228H "Usage: Boot.WriteFile M.rsc outputsize outputfile"
.STRING 25CH " WriteCode "
.STRING 26CH " done"
.STRING 274H " imports not allowed"
.STRING 28CH " input file format error"
.STRING 2A8H " program too long"
.STRING 2BCH " input file not found"
.STRING 2D4H "Usage: Boot.WriteCode M.rsc M.code"
.STRING 2F8H " WriteStream "
.STRING 308H " done"
.STRING 310H " input file empty"
.STRING 324H " input file not found"
.STRING 33CH " destaddr must be >= 0"
.STRING 354H " blocksize must be >= 0"
.STRING 370H "Usage: Boot.WriteStream M.bin M.stream blocksize destaddr"
.STRING 3ACH "OR Boot linker/loader AP 1.9.18"
.POINTER_REFERENCES 18H 70H 74H 94H 88H
.FIXUP T 0H
IMPORT SYSTEM, Kernel, Files, Modules, Texts, Oberon;
CONST versionkey = 1X; versionkey0 = 0X; MT = 12; DescSize = 80;
MemLim = 0E7EF0H; stackOrg = 80000H; maxCode = 8000; CR = 0DX;
TYPE (*copied from Modules for use as cross linker/loader*)
Module* = POINTER TO ModDesc;
Command* = PROCEDURE;
ModuleName* = ARRAY 32 OF CHAR;
ModDesc* = RECORD
name*: ModuleName;
next*: Module;
key*, num*, size*, refcnt*: INTEGER;
data*, code*, imp*, cmd*, ent*, ptr*, unused: INTEGER (*addresses*)
END ;
VAR root: Module;
MTOrg, AllocPtr, Start, limit, res*: INTEGER;
importing*, imported*: ModuleName;
W: Texts.Writer;
PROCEDURE MakeFileName(VAR FName: ARRAY OF CHAR; name, ext: ARRAY OF CHAR);
VAR i, j, k: INTEGER;
BEGINa i := 0;b j := 0;c k := 0;d
0000a .PROC 1
0000a(4EE90028): SUB SP, SP, 28H
0001a(AFE00000): STR LNK, SP, 0H
0002a(A0E00004): STR R0, SP, 4H
0003a(A1E00008): STR R1, SP, 8H
0004a(A2E0000C): STR R2, SP, CH
0005a(A3E00010): STR R3, SP, 10H
0006a(A4E00014): STR R4, SP, 14H
0007a(A5E00018): STR R5, SP, 18H
0008b(40000000): MOV R0, R0, 0H
0009b(A0E0001C): STR R0, SP, 1CH
000Ac(40000000): MOV R0, R0, 0H
000Bc .PROC 2
000Bc(A0E00020): STR R0, SP, 20H
000Cd .PROC 3
000Cd(40000000): MOV R0, R0, 0H
000Dd(A0E00024): STR R0, SP, 24H
WHILE ext[k]e > 0X DOf INC(k) ENDg ;
000Ee(80E00024): LDR R0, SP, 24H
000Fe(81E00018): LDR R1, SP, 18H
0010e(01090001): SUB R1, R0, R1
0011e(DA03921C): BLCC MT [trap=1, pos=914]
0012e(81E00014): LDR R1, SP, 14H
0013e(00180000): ADD R0, R1, R0
0014f .PROC 4
0014f(90000000): LDR R0, R0, 0H
0015f(40090000): SUB R0, R0, 0H
0016f(E6000004): BLE 4 [001BH]
0017g(80E00024): LDR R0, SP, 24H
0018g(40080001): ADD R0, R0, 1H
0019g(A0E00024): STR R0, SP, 24H
001Ag(E7FFFFF3): B -13 [000EH]
WHILE (i < LEN(FName)-hk-i1)j & (kname[i]l > 0X)m DOn FName[i]o := name[i]p;q INC(i) ENDr ;
001Bh(80E00008): LDR R0, SP, 8H
001Ci(81E00024): LDR R1, SP, 24H
001Di(00090001): SUB R0, R0, R1
001Ej(40090001): SUB R0, R0, 1H
001Fj(81E0001C): LDR R1, SP, 1CH
0020j(01190000): SUB R1, R1, R0
0021k(ED00001B): BGE 27 [003DH]
0022l(80E0001C): LDR R0, SP, 1CH
0023l(81E00010): LDR R1, SP, 10H
0024l(01090001): SUB R1, R0, R1
0025l(DA03D11C): BLCC MT [trap=1, pos=977]
0026l(81E0000C): LDR R1, SP, CH
0027l(00180000): ADD R0, R1, R0
0028m(90000000): LDR R0, R0, 0H
0029m(40090000): SUB R0, R0, 0H
002An(E6000012): BLE 18 [003DH]
002Bo(80E0001C): LDR R0, SP, 1CH
002Co(81E00008): LDR R1, SP, 8H
002Do(01090001): SUB R1, R0, R1
002Eo(DA03E31C): BLCC MT [trap=1, pos=995]
002Fo(81E00004): LDR R1, SP, 4H
0030o(00180000): ADD R0, R1, R0
0031p(81E0001C): LDR R1, SP, 1CH
0032p(82E00010): LDR R2, SP, 10H
0033p(02190002): SUB R2, R1, R2
0034p(DA03EE1C): BLCC MT [trap=1, pos=1006]
0035p(82E0000C): LDR R2, SP, CH
0036p(01280001): ADD R1, R2, R1
0037q(91100000): LDR R1, R1, 0H
0038q(B1000000): STR R1, R0, 0H
0039r(80E0001C): LDR R0, SP, 1CH
003Ar(40080001): ADD R0, R0, 1H
003Br(A0E0001C): STR R0, SP, 1CH
003Cr(E7FFFFDE): B -34 [001BH]
WHILE (i < LEN(FName)-s1)t & (uj < k)v DOw FName[i]x := ext[j]y;z INC(i);a INC(j) ENDb ;
003Ds(80E00008): LDR R0, SP, 8H
003Et(40090001): SUB R0, R0, 1H
003Ft(81E0001C): LDR R1, SP, 1CH
0040t(01190000): SUB R1, R1, R0
0041u(ED000019): BGE 25 [005BH]
0042v(80E00020): LDR R0, SP, 20H
0043v(81E00024): LDR R1, SP, 24H
0044v(00090001): SUB R0, R0, R1
0045w(ED000015): BGE 21 [005BH]
0046x(80E0001C): LDR R0, SP, 1CH
0047x(81E00008): LDR R1, SP, 8H
0048x(01090001): SUB R1, R0, R1
0049x(DA042F1C): BLCC MT [trap=1, pos=1071]
004Ax(81E00004): LDR R1, SP, 4H
004Bx(00180000): ADD R0, R1, R0
004Cy(81E00020): LDR R1, SP, 20H
004Dy(82E00018): LDR R2, SP, 18H
004Ey(02190002): SUB R2, R1, R2
004Fy(DA04391C): BLCC MT [trap=1, pos=1081]
0050y(82E00014): LDR R2, SP, 14H
0051y(01280001): ADD R1, R2, R1
0052z(91100000): LDR R1, R1, 0H
0053z(B1000000): STR R1, R0, 0H
0054a(80E0001C): LDR R0, SP, 1CH
0055a(40080001): ADD R0, R0, 1H
0056a(A0E0001C): STR R0, SP, 1CH
0057b(80E00020): LDR R0, SP, 20H
0058b(40080001): ADD R0, R0, 1H
0059b(A0E00020): STR R0, SP, 20H
005Ab(E7FFFFE2): B -30 [003DH]
FName[i]c := 0X
005Bc(80E0001C): LDR R0, SP, 1CH
005Cc(81E00008): LDR R1, SP, 8H
005Dc(01090001): SUB R1, R0, R1
005Ec(DA045C1C): BLCC MT [trap=1, pos=1116]
005Fc(81E00004): LDR R1, SP, 4H
0060c(00180000): ADD R0, R1, R0
ENDd MakeFileName;
0061d(41000000): MOV R1, R0, 0H
0062d(B1000000): STR R1, R0, 0H
0063d(8FE00000): LDR LNK, SP, 0H
0064d(4EE80028): ADD SP, SP, 28H
0065d(C700000F): B LNK
PROCEDURE error(n: INTEGER; name: ARRAY OF CHAR);
BEGINe res := n;f importing := name
0066e(4EE90010): SUB SP, SP, 10H
0067e(AFE00000): STR LNK, SP, 0H
0068e(A0E00004): STR R0, SP, 4H
0069e(A1E00008): STR R1, SP, 8H
006Ae(A2E0000C): STR R2, SP, CH
006Bf(80E00004): LDR R0, SP, 4H
006Cf .FIXUP D
006Cf(8D00006C): LDR SB, MT, MOD0 [Boot]
006Df(A0D0002C): STR R0, SB, 2CH [data]
ENDg error;
006Eg(40D80030): ADD R0, SB, 30H
006Fg(81E00008): LDR R1, SP, 8H
0070g(82E0000C): LDR R2, SP, CH
0071g(E100000B): BEQ 11 [007DH]
0072g(42280003): ADD R2, R2, 3H
0073g(42220002): ASR R2, R2, 2H
0074g(43000008): MOV R3, R0, 8H
0075g(03290003): SUB R3, R2, R3
0076g(DE04D53C): BLGT MT [trap=3, pos=1237]
0077g(83100000): LDR R3, R1, 0H
0078g(41180004): ADD R1, R1, 4H
0079g(A3000000): STR R3, R0, 0H
007Ag(40080004): ADD R0, R0, 4H
007Bg(42290001): SUB R2, R2, 1H
007Cg(E9FFFFFA): BNE -6 [0077H]
007Dg(8FE00000): LDR LNK, SP, 0H
007Eg(4EE80010): ADD SP, SP, 10H
007Fg(C700000F): B LNK
PROCEDURE Check(s: ARRAY OF CHAR);
VAR i: INTEGER; ch: CHAR;
BEGINh ch := s[0]i;j res := 1;k i := 1;l
0080h(4EE90014): SUB SP, SP, 14H
0081h(AFE00000): STR LNK, SP, 0H
0082h(A0E00004): STR R0, SP, 4H
0083h(A1E00008): STR R1, SP, 8H
0084i(40000000): MOV R0, R0, 0H
0085i(81E00008): LDR R1, SP, 8H
0086i(01090001): SUB R1, R0, R1
0087i(DA05331C): BLCC MT [trap=1, pos=1331]
0088i(81E00004): LDR R1, SP, 4H
0089i(00180000): ADD R0, R1, R0
008Aj(90000000): LDR R0, R0, 0H
008Bj(B0E00010): STR R0, SP, 10H
008Ck(40000001): MOV R0, R0, 1H
008Dk .FIXUP D
008Dk(8D000021): LDR SB, MT, MOD0 [Boot]
008Ek(A0D0002C): STR R0, SB, 2CH [data]
008Fl(40000001): MOV R0, R0, 1H
0090l(A0E0000C): STR R0, SP, CH
IF (ch >= "A")m & (nch <= "Z")o OR (pch >= "a")q & (rch <= "z")s THENt
0091m(90E00010): LDR R0, SP, 10H
0092m(40090041): SUB R0, R0, 41H
0093n(E5000003): BLT 3 [0097H]
0094o(90E00010): LDR R0, SP, 10H
0095o(4009005A): SUB R0, R0, 5AH
0096p(E6000006): BLE 6 [009DH]
0097q(90E00010): LDR R0, SP, 10H
0098q(40090061): SUB R0, R0, 61H
0099r(E500002E): BLT 46 [00C8H]
009As(90E00010): LDR R0, SP, 10H
009Bs(4009007A): SUB R0, R0, 7AH
009Ct(EE00002B): BGT 43 [00C8H]
REPEAT ch := s[i]u;v INC(i)
009Du(80E0000C): LDR R0, SP, CH
009Eu(81E00008): LDR R1, SP, 8H
009Fu(01090001): SUB R1, R0, R1
00A0u(DA05A11C): BLCC MT [trap=1, pos=1441]
00A1u(81E00004): LDR R1, SP, 4H
00A2u(00180000): ADD R0, R1, R0
00A3v(90000000): LDR R0, R0, 0H
00A4v(B0E00010): STR R0, SP, 10H
UNTILw ~((ch >= "0")x & (ych <= "9")z OR (ach >= "A")b & (cch <= "Z")d
00A5w(80E0000C): LDR R0, SP, CH
00A6w(40080001): ADD R0, R0, 1H
00A7w(A0E0000C): STR R0, SP, CH
00A8x(90E00010): LDR R0, SP, 10H
00A9x(40090030): SUB R0, R0, 30H
00AAy(E5000003): BLT 3 [00AEH]
00ABz(90E00010): LDR R0, SP, 10H
00ACz(40090039): SUB R0, R0, 39H
00ADa(E600000F): BLE 15 [00BDH]
00AEb(90E00010): LDR R0, SP, 10H
00AFb(40090041): SUB R0, R0, 41H
00B0c(E5000003): BLT 3 [00B4H]
00B1d(90E00010): LDR R0, SP, 10H
00B2d(4009005A): SUB R0, R0, 5AH
OR (ech >= "a")f & (gch <= "z")h OR (ich = ".")j) OR (ki = 32)l;m
00B3e(E6000009): BLE 9 [00BDH]
00B4f(90E00010): LDR R0, SP, 10H
00B5f(40090061): SUB R0, R0, 61H
00B6g(E5000003): BLT 3 [00BAH]
00B7h(90E00010): LDR R0, SP, 10H
00B8h(4009007A): SUB R0, R0, 7AH
00B9i(E6000003): BLE 3 [00BDH]
00BAj(90E00010): LDR R0, SP, 10H
00BBj(4009002E): SUB R0, R0, 2EH
00BCk(E9000003): BNE 3 [00C0H]
00BDl(80E0000C): LDR R0, SP, CH
00BEl(40090020): SUB R0, R0, 20H
00BFm(E9FFFFDD): BNE -35 [009DH]
IF (i < 32)n & (och = 0X)p THENq res := 0 ENDr
00C0n(80E0000C): LDR R0, SP, CH
00C1n(40090020): SUB R0, R0, 20H
00C2o(ED000005): BGE 5 [00C8H]
00C3p(90E00010): LDR R0, SP, 10H
00C4q(E9000003): BNE 3 [00C8H]
00C5r(40000000): MOV R0, R0, 0H
00C6r .FIXUP D
00C6r(8D000039): LDR SB, MT, MOD0 [Boot]
00C7r(A0D0002C): STR R0, SB, 2CH [data]
END
ENDs Check;
00C8s(8FE00000): LDR LNK, SP, 0H
00C9s(4EE80014): ADD SP, SP, 14H
00CAs(C700000F): B LNK
PROCEDURE Link1(name: ARRAY OF CHAR; VAR newmod: Module);
VAR mod, impmod: Module;
i, n, key, impkey, mno, nofimps, size: INTEGER;
p, u, v, w: INTEGER; (*addresses*)
ch: CHAR;
body: Command;
fixorgP, fixorgD, fixorgT: INTEGER;
disp, adr, inst, pno, vno, dest, offset: INTEGER;
name1, impname: ModuleName;
F: Files.File; R: Files.Rider;
import: ARRAY 16 OF Module;
BEGINt mod := root;u res := 0;v nofimps := 0;w
00CBt(4EE90110): SUB SP, SP, 110H
00CCt(AFE00000): STR LNK, SP, 0H
00CDt(A0E00004): STR R0, SP, 4H
00CEt(A1E00008): STR R1, SP, 8H
00CFt(A2E0000C): STR R2, SP, CH
00D0u .FIXUP D
00D0u(8D00000A): LDR SB, MT, MOD0 [Boot]
00D1u(80D00018): LDR R0, SB, 18H [data]
00D2u(A0E00010): STR R0, SP, 10H
00D3v(40000000): MOV R0, R0, 0H
00D4v(A0D0002C): STR R0, SB, 2CH
00D5w(40000000): MOV R0, R0, 0H
00D6w(A0E0002C): STR R0, SP, 2CH
WHILE (mod # NIL)x & (yname # mod.namez)a DOb mod := mod.nextc ENDd ;
00D7x(80E00010): LDR R0, SP, 10H
00D8y(E1000011): BEQ 17 [00EAH]
00D9z(80E00010): LDR R0, SP, 10H
00DAz(D108744C): BLEQ MT [trap=4, pos=2164]
00DBa(81E00004): LDR R1, SP, 4H
00DCa(92100000): LDR R2, R1, 0H
00DDa(41180001): ADD R1, R1, 1H
00DEa(93000000): LDR R3, R0, 0H
00DFa(40080001): ADD R0, R0, 1H
00E0a(04290003): SUB R4, R2, R3
00E1a(E9000002): BNE 2 [00E4H]
00E2a(44290000): SUB R4, R2, 0H
00E3a(E9FFFFF8): BNE -8 [00DCH]
00E4b(E1000005): BEQ 5 [00EAH]
00E5c(80E00010): LDR R0, SP, 10H
00E6c(D108884C): BLEQ MT [trap=4, pos=2184]
00E7d(80000020): LDR R0, R0, 20H
00E8d(A0E00010): STR R0, SP, 10H
00E9d(E7FFFFED): B -19 [00D7H]
IF mod = NIL THENe (*load*)
00EAe(80E00010): LDR R0, SP, 10H
00EBe(E9000343): BNE 835 [042FH]
Check(name)f;g
00ECf(80E00004): LDR R0, SP, 4H
00EDf(81E00008): LDR R1, SP, 8H
00EEg(F7FFFF91): BL -111 [0080H]
IF res = 0 THENh MakeFileName(name1,i name,j ".rsc")k;l F := Files.Old(name1)m ELSEn Fo := NIL ENDp ;
00EFh .FIXUP D
00EFh(8D00001F): LDR SB, MT, MOD0 [Boot]
00F0h(80D0002C): LDR R0, SB, 2CH [data]
00F1h(E900000D): BNE 13 [00FFH]
00F2i(40E80074): ADD R0, SP, 74H
00F3i(41000020): MOV R1, R0, 20H
00F4j(82E00004): LDR R2, SP, 4H
00F5j(83E00008): LDR R3, SP, 8H
00F6k .FIXUP D
00F6k(8D000007): LDR SB, MT, MOD0 [Boot]
00F7k(44D80098): ADD R4, SB, 98H [".rsc"]
00F8k(45000005): MOV R5, R0, 5H
00F9l(F7FFFF06): BL -250 [0000H]
00FAm(40E80074): ADD R0, SP, 74H
00FBm(41000020): MOV R1, R0, 20H
00FCn .FIXUP P
00FCn(F72020FC): BL MOD2 [Files] PROC2
00FDn(A0E000B4): STR R0, SP, B4H
00FEo(E7000002): B 2 [0101H]
00FFp(40000000): MOV R0, R0, 0H
0100p(A0E000B4): STR R0, SP, B4H
IF F # NIL THENq
0101q(80E000B4): LDR R0, SP, B4H
0102q(E100007D): BEQ 125 [0180H]
Files.Set(R,r F,s 0)t;u Files.ReadString(R,v name1)w;x Files.ReadInt(R,y key)z;a Files.Read(R,b ch)c;d
0103r(40E800B8): ADD R0, SP, B8H
0104r .FIXUP D
0104r(8D20000E): LDR SB, MT, MOD2 [Files]
0105r(41D80001): ADD R1, SB, VAR1
0106s(82E000B4): LDR R2, SP, B4H
0107t(43000000): MOV R3, R0, 0H
0108u .FIXUP P
0108u(F720B00C): BL MOD2 [Files] PROC11
0109v(40E800B8): ADD R0, SP, B8H
010Av .FIXUP D
010Av(8D200006): LDR SB, MT, MOD2 [Files]
010Bv(41D80001): ADD R1, SB, VAR1
010Cw(42E80074): ADD R2, SP, 74H
010Dw(43000020): MOV R3, R0, 20H
010Ex .FIXUP P
010Ex(F7214006): BL MOD2 [Files] PROC20
010Fy(40E800B8): ADD R0, SP, B8H
0110y .FIXUP D
0110y(8D200006): LDR SB, MT, MOD2 [Files]
0111y(41D80001): ADD R1, SB, VAR1
0112z(42E80020): ADD R2, SP, 20H
0113a .FIXUP P
0113a(F7211005): BL MOD2 [Files] PROC17
0114b(40E800B8): ADD R0, SP, B8H
0115b .FIXUP D
0115b(8D200005): LDR SB, MT, MOD2 [Files]
0116b(41D80001): ADD R1, SB, VAR1
0117c(42E80044): ADD R2, SP, 44H
0118d .FIXUP P
0118d(F7210005): BL MOD2 [Files] PROC16
Files.ReadInt(R,e size)f;g importing := name1;h
0119e(40E800B8): ADD R0, SP, B8H
011Ae .FIXUP D
011Ae(8D200005): LDR SB, MT, MOD2 [Files]
011Be(41D80001): ADD R1, SB, VAR1
011Cf(42E80030): ADD R2, SP, 30H
011Dg .FIXUP P
011Dg(F7211005): BL MOD2 [Files] PROC17
011Eh .FIXUP D
011Eh(8D000004): LDR SB, MT, MOD0 [Boot]
011Fh(40D80030): ADD R0, SB, 30H [data]
0120h(41E80074): ADD R1, SP, 74H
0121h(42000008): MOV R2, R0, 8H
0122h(83100000): LDR R3, R1, 0H
0123h(41180004): ADD R1, R1, 4H
0124h(A3000000): STR R3, R0, 0H
0125h(40080004): ADD R0, R0, 4H
0126h(42290001): SUB R2, R2, 1H
0127h(E9FFFFFA): BNE -6 [0122H]
IF (ch = versionkey)i (*regular module*) OR (jch = versionkey0)k (*standalone program*) THENl
0128i(90E00044): LDR R0, SP, 44H
0129i(40090001): SUB R0, R0, 1H
012Aj(E1000002): BEQ 2 [012DH]
012Bk(90E00044): LDR R0, SP, 44H
012Cl(E900004E): BNE 78 [017BH]
Files.ReadString(R,m impname)n;o (*imports*)
012Dm(40E800B8): ADD R0, SP, B8H
012Em .FIXUP D
012Em(8D200010): LDR SB, MT, MOD2 [Files]
012Fm(41D80001): ADD R1, SB, VAR1
0130n(42E80094): ADD R2, SP, 94H
0131n(43000020): MOV R3, R0, 20H
0132o .FIXUP P
0132o(F7214015): BL MOD2 [Files] PROC20
WHILE (impname[0] # 0X)p & (qres = 0)r DOs
0133p(90E00094): LDR R0, SP, 94H
0134q(E1000045): BEQ 69 [017AH]
0135r .FIXUP D
0135r(8D000007): LDR SB, MT, MOD0 [Boot]
0136r(80D0002C): LDR R0, SB, 2CH [data]
0137s(E9000042): BNE 66 [017AH]
Files.ReadInt(R,t impkey)u;v
0138t(40E800B8): ADD R0, SP, B8H
0139t .FIXUP D
0139t(8D200004): LDR SB, MT, MOD2 [Files]
013At(41D80001): ADD R1, SB, VAR1
013Bu(42E80024): ADD R2, SP, 24H
013Cv .FIXUP P
013Cv(F721100A): BL MOD2 [Files] PROC17
Link1(impname,w impmod)x;y import[nofimps]z := impmod;a
013Dw(40E80094): ADD R0, SP, 94H
013Ew(41000020): MOV R1, R0, 20H
013Fx(42E80014): ADD R2, SP, 14H
0140y(F7FFFF8A): BL -118 [00CBH]
0141z(80E0002C): LDR R0, SP, 2CH
0142z(41090010): SUB R1, R0, 10H
0143z(DA0AF21C): BLCC MT [trap=1, pos=2802]
0144z(40010002): LSL R0, R0, 2H
0145z(00E80000): ADD R0, SP, R0
0146a(81E00014): LDR R1, SP, 14H
0147a(A10000D0): STR R1, R0, D0H
IF res = 0 THENb importing := name1;c
0148b .FIXUP D
0148b(8D00000F): LDR SB, MT, MOD0 [Boot]
0149b(80D0002C): LDR R0, SB, 2CH [data]
014Ab(E9000028): BNE 40 [0173H]
014Bc .FIXUP D
014Bc(8D000003): LDR SB, MT, MOD0 [Boot]
014Cc(40D80030): ADD R0, SB, 30H [data]
014Dc(41E80074): ADD R1, SP, 74H
014Ec(42000008): MOV R2, R0, 8H
014Fc(83100000): LDR R3, R1, 0H
0150c(41180004): ADD R1, R1, 4H
0151c(A3000000): STR R3, R0, 0H
0152c(40080004): ADD R0, R0, 4H
0153c(42290001): SUB R2, R2, 1H
0154c(E9FFFFFA): BNE -6 [014FH]
IF impmod.keyd = impkey THENe INC(impmod.refcntf);g INC(nofimps)
0155d(80E00014): LDR R0, SP, 14H
0156d(D10B494C): BLEQ MT [trap=4, pos=2889]
0157e(80000024): LDR R0, R0, 24H
0158e(81E00024): LDR R1, SP, 24H
0159e(00090001): SUB R0, R0, R1
015Ae(E900000A): BNE 10 [0165H]
015Bf(80E00014): LDR R0, SP, 14H
015Cf(D10B694C): BLEQ MT [trap=4, pos=2921]
015Dg(40080030): ADD R0, R0, 30H
015Eg(81000000): LDR R1, R0, 0H
015Fg(41180001): ADD R1, R1, 1H
0160g(A1000000): STR R1, R0, 0H
ELSEh errori(3,j name1)k;l imported := impname
0161h(80E0002C): LDR R0, SP, 2CH
0162h(40080001): ADD R0, R0, 1H
0163h(A0E0002C): STR R0, SP, 2CH
0164i(E700000E): B 14 [0173H]
0165j(40000003): MOV R0, R0, 3H
0166k(41E80074): ADD R1, SP, 74H
0167k(42000020): MOV R2, R0, 20H
0168l(F7FFFEFD): BL -259 [0066H]
ENDm
0169m .FIXUP D
0169m(8D00001E): LDR SB, MT, MOD0 [Boot]
016Am(40D80050): ADD R0, SB, 50H [data]
016Bm(41E80094): ADD R1, SP, 94H
016Cm(42000008): MOV R2, R0, 8H
016Dm(83100000): LDR R3, R1, 0H
016Em(41180004): ADD R1, R1, 4H
016Fm(A3000000): STR R3, R0, 0H
0170m(40080004): ADD R0, R0, 4H
0171m(42290001): SUB R2, R2, 1H
0172m(E9FFFFFA): BNE -6 [016DH]
END ;
Files.ReadString(R,n impname)o
0173n(40E800B8): ADD R0, SP, B8H
0174n .FIXUP D
0174n(8D20000B): LDR SB, MT, MOD2 [Files]
0175n(41D80001): ADD R1, SB, VAR1
0176o(42E80094): ADD R2, SP, 94H
0177o(43000020): MOV R3, R0, 20H
ENDp
0178p .FIXUP P
0178p(F721403C): BL MOD2 [Files] PROC20
0179p(E7FFFFB9): B -71 [0133H]
ELSE errorq(2,r name1)s
017Aq(E7000004): B 4 [017FH]
017Br(40000002): MOV R0, R0, 2H
017Cs(41E80074): ADD R1, SP, 74H
017Ds(42000020): MOV R2, R0, 20H
ENDt
017Et(F7FFFEE7): BL -281 [0066H]
ELSE erroru(1,v name)w
017Fu(E7000004): B 4 [0184H]
0180v(40000001): MOV R0, R0, 1H
0181w(81E00004): LDR R1, SP, 4H
0182w(82E00008): LDR R2, SP, 8H
ENDx ;
0183x(F7FFFEE2): BL -286 [0066H]
IF res = 0 THENy
0184y .FIXUP D
0184y(8D000010): LDR SB, MT, MOD0 [Boot]
0185y(80D0002C): LDR R0, SB, 2CH [data]
0186y(E9000037): BNE 55 [01BEH]
INC(size, DescSize);z
0187z(80E00030): LDR R0, SP, 30H
0188z(40080050): ADD R0, R0, 50H
0189z(A0E00030): STR R0, SP, 30H
IF AllocPtr + size <a limit THENb (*allocate*)
018Aa .FIXUP D
018Aa(8D000006): LDR SB, MT, MOD0 [Boot]
018Ba(80D00020): LDR R0, SB, 20H [data]
018Ca(81E00030): LDR R1, SP, 30H
018Da(00080001): ADD R0, R0, R1
018Eb(81D00028): LDR R1, SB, 28H
018Fb(00090001): SUB R0, R0, R1
0190b(ED000029): BGE 41 [01BAH]
p := AllocPtr;c mod := SYSTEM.VAL(Module, p);d
0191c .FIXUP D
0191c(8D000007): LDR SB, MT, MOD0 [Boot]
0192c(80D00020): LDR R0, SB, 20H [data]
0193c(A0E00034): STR R0, SP, 34H
0194d(80E00034): LDR R0, SP, 34H
0195d(A0E00010): STR R0, SP, 10H
AllocPtr := (p + size +e 31)f DIV 32 *g 32;h mod.sizei := AllocPtr - p;j
0196e(80E00034): LDR R0, SP, 34H
0197e(81E00030): LDR R1, SP, 30H
0198e(00080001): ADD R0, R0, R1
0199f(4008001F): ADD R0, R0, 1FH
019Ag(40020005): ASR R0, R0, 5H
019Bh(40010005): LSL R0, R0, 5H
019Ch(A0D00020): STR R0, SB, 20H
019Di(80E00010): LDR R0, SP, 10H
019Ei(D10D354C): BLEQ MT [trap=4, pos=3381]
019Fj(81D00020): LDR R1, SB, 20H
01A0j(82E00034): LDR R2, SP, 34H
01A1j(01190002): SUB R1, R1, R2
01A2j(A100002C): STR R1, R0, 2CH
IF root = NIL THENk mod.numl := 1 ELSEm modn.numo := root.nump + 1 ENDq ;
01A3k(80D00018): LDR R0, SB, 18H
01A4k(E9000005): BNE 5 [01AAH]
01A5l(80E00010): LDR R0, SP, 10H
01A6l(D10D6B4C): BLEQ MT [trap=4, pos=3435]
01A7m(41000001): MOV R1, R0, 1H
01A8m(A1000028): STR R1, R0, 28H
01A9n(E7000008): B 8 [01B2H]
01AAo(80E00010): LDR R0, SP, 10H
01ABo(D10D7D4C): BLEQ MT [trap=4, pos=3453]
01ACp .FIXUP D
01ACp(8D00001B): LDR SB, MT, MOD0 [Boot]
01ADp(81D00018): LDR R1, SB, 18H [data]
01AEp(D10D894C): BLEQ MT [trap=4, pos=3465]
01AFq(81100028): LDR R1, R1, 28H
01B0q(41180001): ADD R1, R1, 1H
01B1q(A1000028): STR R1, R0, 28H
mod.nextr := root;s root := mod
01B2r(80E00010): LDR R0, SP, 10H
01B3r(D10DA64C): BLEQ MT [trap=4, pos=3494]
01B4s .FIXUP D
01B4s(8D000008): LDR SB, MT, MOD0 [Boot]
01B5s(81D00018): LDR R1, SB, 18H [data]
01B6s(A1000020): STR R1, R0, 20H
ELSEt erroru(7,v name1)w
01B7t(80E00010): LDR R0, SP, 10H
01B8t(A0D00018): STR R0, SB, 18H
01B9u(E7000004): B 4 [01BEH]
01BAv(40000007): MOV R0, R0, 7H
01BBw(41E80074): ADD R1, SP, 74H
01BCw(42000020): MOV R2, R0, 20H
ENDx
01BDx(F7FFFEA8): BL -344 [0066H]
END ;
IF res = 0 THENy (*read file*)
01BEy .FIXUP D
01BEy(8D00000A): LDR SB, MT, MOD0 [Boot]
01BFy(80D0002C): LDR R0, SB, 2CH [data]
01C0y(E9000144): BNE 324 [0305H]
INC(p, DescSize);z (*allocate descriptor*)
01C1z(80E00034): LDR R0, SP, 34H
01C2z(40080050): ADD R0, R0, 50H
01C3z(A0E00034): STR R0, SP, 34H
mod.namea := name;b mod.keyc := key;d mod.refcnte := 0;f
01C4a(80E00010): LDR R0, SP, 10H
01C5a(D10E574C): BLEQ MT [trap=4, pos=3671]
01C6b(81E00004): LDR R1, SP, 4H
01C7b(82E00008): LDR R2, SP, 8H
01C8b(E100000B): BEQ 11 [01D4H]
01C9b(42280003): ADD R2, R2, 3H
01CAb(42220002): ASR R2, R2, 2H
01CBb(43000008): MOV R3, R0, 8H
01CCb(03290003): SUB R3, R2, R3
01CDb(DE0E603C): BLGT MT [trap=3, pos=3680]
01CEb(83100000): LDR R3, R1, 0H
01CFb(41180004): ADD R1, R1, 4H
01D0b(A3000000): STR R3, R0, 0H
01D1b(40080004): ADD R0, R0, 4H
01D2b(42290001): SUB R2, R2, 1H
01D3b(E9FFFFFA): BNE -6 [01CEH]
01D4c(80E00010): LDR R0, SP, 10H
01D5c(D10E684C): BLEQ MT [trap=4, pos=3688]
01D6d(81E00020): LDR R1, SP, 20H
01D7d(A1000024): STR R1, R0, 24H
01D8e(80E00010): LDR R0, SP, 10H
01D9e(D10E7B4C): BLEQ MT [trap=4, pos=3707]
01DAf(41000000): MOV R1, R0, 0H
01DBf(A1000030): STR R1, R0, 30H
mod.datag := p;h (*data*)
01DCg(80E00010): LDR R0, SP, 10H
01DDg(D10E924C): BLEQ MT [trap=4, pos=3730]
01DEh(81E00034): LDR R1, SP, 34H
01DFh(A1000034): STR R1, R0, 34H
SYSTEM.PUT(mod.numi * 4 +j MTOrg,k p);l (*module table entry*)
01E0i(80E00010): LDR R0, SP, 10H
01E1i(D10EBD4C): BLEQ MT [trap=4, pos=3773]
01E2j(80000028): LDR R0, R0, 28H
01E3j(40010002): LSL R0, R0, 2H
01E4k .FIXUP D
01E4k(8D000026): LDR SB, MT, MOD0 [Boot]
01E5k(81D0001C): LDR R1, SB, 1CH [data]
01E6k(00080001): ADD R0, R0, R1
01E7l(81E00034): LDR R1, SP, 34H
01E8l(A1000000): STR R1, R0, 0H
Files.ReadInt(R,m n)n;o
01E9m(40E800B8): ADD R0, SP, B8H
01EAm .FIXUP D
01EAm(8D200006): LDR SB, MT, MOD2 [Files]
01EBm(41D80001): ADD R1, SB, VAR1
01ECn(42E8001C): ADD R2, SP, 1CH
01EDo .FIXUP P
01EDo(F7211075): BL MOD2 [Files] PROC17
WHILE n > 0 DOp Files.ReadInt(R,q w)r;s SYSTEM.PUT(p, w);t INC(p, 4);u DEC(n, 4) ENDv ; (*type descriptors*)
01EEp(80E0001C): LDR R0, SP, 1CH
01EFp(40090000): SUB R0, R0, 0H
01F0p(E600000F): BLE 15 [0200H]
01F1q(40E800B8): ADD R0, SP, B8H
01F2q .FIXUP D
01F2q(8D200008): LDR SB, MT, MOD2 [Files]
01F3q(41D80001): ADD R1, SB, VAR1
01F4r(42E80040): ADD R2, SP, 40H
01F5s .FIXUP P
01F5s(F7211008): BL MOD2 [Files] PROC17
01F6t(80E00034): LDR R0, SP, 34H
01F7t(81E00040): LDR R1, SP, 40H
01F8t(A1000000): STR R1, R0, 0H
01F9u(80E00034): LDR R0, SP, 34H
01FAu(40080004): ADD R0, R0, 4H
01FBu(A0E00034): STR R0, SP, 34H
01FCv(80E0001C): LDR R0, SP, 1CH
01FDv(40090004): SUB R0, R0, 4H
01FEv(A0E0001C): STR R0, SP, 1CH
01FFv(E7FFFFEE): B -18 [01EEH]
Files.ReadInt(R,w n)x;y
0200w(40E800B8): ADD R0, SP, B8H
0201w .FIXUP D
0201w(8D20000F): LDR SB, MT, MOD2 [Files]
0202w(41D80001): ADD R1, SB, VAR1
0203x(42E8001C): ADD R2, SP, 1CH
0204y .FIXUP P
0204y(F721100F): BL MOD2 [Files] PROC17
WHILE n > 0 DOz SYSTEM.PUT(p, 0);a INC(p, 4);b DEC(n, 4) ENDc ; (*variable space*)
0205z(80E0001C): LDR R0, SP, 1CH
0206z(40090000): SUB R0, R0, 0H
0207z(E600000A): BLE 10 [0212H]
0208a(80E00034): LDR R0, SP, 34H
0209a(41000000): MOV R1, R0, 0H
020Aa(A1000000): STR R1, R0, 0H
020Bb(80E00034): LDR R0, SP, 34H
020Cb(40080004): ADD R0, R0, 4H
020Db(A0E00034): STR R0, SP, 34H
020Ec(80E0001C): LDR R0, SP, 1CH
020Fc(40090004): SUB R0, R0, 4H
0210c(A0E0001C): STR R0, SP, 1CH
0211c(E7FFFFF3): B -13 [0205H]
Files.ReadInt(R,d n)e;f
0212d(40E800B8): ADD R0, SP, B8H
0213d .FIXUP D
0213d(8D200012): LDR SB, MT, MOD2 [Files]
0214d(41D80001): ADD R1, SB, VAR1
0215e(42E8001C): ADD R2, SP, 1CH
0216f .FIXUP P
0216f(F7211012): BL MOD2 [Files] PROC17
WHILE n > 0 DOg Files.Read(R,h ch)i;j SYSTEM.PUT(p, ch);k INC(p);l DEC(n) ENDm ; (*strings*)
0217g(80E0001C): LDR R0, SP, 1CH
0218g(40090000): SUB R0, R0, 0H
0219g(E600000F): BLE 15 [0229H]
021Ah(40E800B8): ADD R0, SP, B8H
021Bh .FIXUP D
021Bh(8D200008): LDR SB, MT, MOD2 [Files]
021Ch(41D80001): ADD R1, SB, VAR1
021Di(42E80044): ADD R2, SP, 44H
021Ej .FIXUP P
021Ej(F7210008): BL MOD2 [Files] PROC16
021Fk(80E00034): LDR R0, SP, 34H
0220k(91E00044): LDR R1, SP, 44H
0221k(B1000000): STR R1, R0, 0H
0222l(80E00034): LDR R0, SP, 34H
0223l(40080001): ADD R0, R0, 1H
0224l(A0E00034): STR R0, SP, 34H
0225m(80E0001C): LDR R0, SP, 1CH
0226m(40090001): SUB R0, R0, 1H
0227m(A0E0001C): STR R0, SP, 1CH
0228m(E7FFFFEE): B -18 [0217H]
mod.coden := p;o (*program*)
0229n(80E00010): LDR R0, SP, 10H
022An(D110754C): BLEQ MT [trap=4, pos=4213]
022Bo(81E00034): LDR R1, SP, 34H
022Co(A1000038): STR R1, R0, 38H
Files.ReadInt(R,p n)q;r
022Dp(40E800B8): ADD R0, SP, B8H
022Ep .FIXUP D
022Ep(8D200013): LDR SB, MT, MOD2 [Files]
022Fp(41D80001): ADD R1, SB, VAR1
0230q(42E8001C): ADD R2, SP, 1CH
0231r .FIXUP P
0231r(F7211013): BL MOD2 [Files] PROC17
WHILE n > 0 DOs Files.ReadInt(R,t w)u;v SYSTEM.PUT(p, w);w INC(p, 4);x DEC(n) ENDy ; (*program code*)
0232s(80E0001C): LDR R0, SP, 1CH
0233s(40090000): SUB R0, R0, 0H
0234s(E600000F): BLE 15 [0244H]
0235t(40E800B8): ADD R0, SP, B8H
0236t .FIXUP D
0236t(8D200008): LDR SB, MT, MOD2 [Files]
0237t(41D80001): ADD R1, SB, VAR1
0238u(42E80040): ADD R2, SP, 40H
0239v .FIXUP P
0239v(F7211008): BL MOD2 [Files] PROC17
023Aw(80E00034): LDR R0, SP, 34H
023Bw(81E00040): LDR R1, SP, 40H
023Cw(A1000000): STR R1, R0, 0H
023Dx(80E00034): LDR R0, SP, 34H
023Ex(40080004): ADD R0, R0, 4H
023Fx(A0E00034): STR R0, SP, 34H
0240y(80E0001C): LDR R0, SP, 1CH
0241y(40090001): SUB R0, R0, 1H
0242y(A0E0001C): STR R0, SP, 1CH
0243y(E7FFFFEE): B -18 [0232H]
mod.impz := p;a (*copy imports*)
0244z(80E00010): LDR R0, SP, 10H
0245z(D1111D4C): BLEQ MT [trap=4, pos=4381]
0246a(81E00034): LDR R1, SP, 34H
0247a(A100003C): STR R1, R0, 3CH
i := 0;b
0248b(40000000): MOV R0, R0, 0H
0249b(A0E00018): STR R0, SP, 18H
WHILE i < nofimps DOc
024Ac(80E00018): LDR R0, SP, 18H
024Bc(81E0002C): LDR R1, SP, 2CH
024Cc(00090001): SUB R0, R0, R1
024Dc(ED00000F): BGE 15 [025DH]
SYSTEM.PUT(p, import[i]d);e INC(p, 4);f INC(i)
024Ed(80E00018): LDR R0, SP, 18H
024Fd(41090010): SUB R1, R0, 10H
0250d(DA11841C): BLCC MT [trap=1, pos=4484]
0251d(40010002): LSL R0, R0, 2H
0252d(00E80000): ADD R0, SP, R0
0253e(81E00034): LDR R1, SP, 34H
0254e(800000D0): LDR R0, R0, D0H
0255e(A0100000): STR R0, R1, 0H
0256f(80E00034): LDR R0, SP, 34H
0257f(40080004): ADD R0, R0, 4H
0258f(A0E00034): STR R0, SP, 34H
ENDg ;
0259g(80E00018): LDR R0, SP, 18H
025Ag(40080001): ADD R0, R0, 1H
025Bg(A0E00018): STR R0, SP, 18H
025Cg(E7FFFFED): B -19 [024AH]
mod.cmdh := p;i (*commands*) Files.Read(R,j ch)k;l
025Dh(80E00010): LDR R0, SP, 10H
025Eh(D111B64C): BLEQ MT [trap=4, pos=4534]
025Fi(81E00034): LDR R1, SP, 34H
0260i(A1000040): STR R1, R0, 40H
0261j(40E800B8): ADD R0, SP, B8H
0262j .FIXUP D
0262j(8D20002C): LDR SB, MT, MOD2 [Files]
0263j(41D80001): ADD R1, SB, VAR1
0264k(42E80044): ADD R2, SP, 44H
0265l .FIXUP P
0265l(F721002C): BL MOD2 [Files] PROC16
WHILE ch # 0X DOm
0266m(90E00044): LDR R0, SP, 44H
0267m(E1000028): BEQ 40 [0290H]
REPEAT SYSTEM.PUT(p, ch);n INC(p);o Files.Read(R,p ch)q UNTILr ch = 0X;s
0268n(80E00034): LDR R0, SP, 34H
0269n(91E00044): LDR R1, SP, 44H
026An(B1000000): STR R1, R0, 0H
026Bo(80E00034): LDR R0, SP, 34H
026Co(40080001): ADD R0, R0, 1H
026Do(A0E00034): STR R0, SP, 34H
026Ep(40E800B8): ADD R0, SP, B8H
026Fp .FIXUP D
026Fp(8D20000D): LDR SB, MT, MOD2 [Files]
0270p(41D80001): ADD R1, SB, VAR1
0271q(42E80044): ADD R2, SP, 44H
0272r .FIXUP P
0272r(F721000D): BL MOD2 [Files] PROC16
0273s(90E00044): LDR R0, SP, 44H
0274s(E9FFFFF3): BNE -13 [0268H]
REPEAT SYSTEM.PUT(p, 0X);t INC(p) UNTILu p MOD 4 =v 0;w
0275t(80E00034): LDR R0, SP, 34H
0276t(41000000): MOV R1, R0, 0H
0277t(B1000000): STR R1, R0, 0H
0278u(80E00034): LDR R0, SP, 34H
0279u(40080001): ADD R0, R0, 1H
027Au(A0E00034): STR R0, SP, 34H
027Bv(80E00034): LDR R0, SP, 34H
027Cv(40040003): AND R0, R0, 3H
027Dw(40090000): SUB R0, R0, 0H
027Ew(E9FFFFF6): BNE -10 [0275H]
Files.ReadInt(R,x n)y;z SYSTEM.PUT(p, n);a INC(p, 4);b Files.Read(R,c ch)d
027Fx(40E800B8): ADD R0, SP, B8H
0280x .FIXUP D
0280x(8D200011): LDR SB, MT, MOD2 [Files]
0281x(41D80001): ADD R1, SB, VAR1
0282y(42E8001C): ADD R2, SP, 1CH
0283z .FIXUP P
0283z(F7211011): BL MOD2 [Files] PROC17
0284a(80E00034): LDR R0, SP, 34H
0285a(81E0001C): LDR R1, SP, 1CH
0286a(A1000000): STR R1, R0, 0H
0287b(80E00034): LDR R0, SP, 34H
0288b(40080004): ADD R0, R0, 4H
0289b(A0E00034): STR R0, SP, 34H
028Ac(40E800B8): ADD R0, SP, B8H
028Bc .FIXUP D
028Bc(8D20000B): LDR SB, MT, MOD2 [Files]
028Cc(41D80001): ADD R1, SB, VAR1
028Dd(42E80044): ADD R2, SP, 44H
ENDe ;
028Ee .FIXUP P
028Ee(F721000B): BL MOD2 [Files] PROC16
028Fe(E7FFFFD6): B -42 [0266H]
REPEAT SYSTEM.PUT(p, 0X);f INC(p) UNTILg p MOD 4 =h 0;i
0290f(80E00034): LDR R0, SP, 34H
0291f(41000000): MOV R1, R0, 0H
0292f(B1000000): STR R1, R0, 0H
0293g(80E00034): LDR R0, SP, 34H
0294g(40080001): ADD R0, R0, 1H
0295g(A0E00034): STR R0, SP, 34H
0296h(80E00034): LDR R0, SP, 34H
0297h(40040003): AND R0, R0, 3H
0298i(40090000): SUB R0, R0, 0H
0299i(E9FFFFF6): BNE -10 [0290H]
mod.entj := p;k (*entries*)
029Aj(80E00010): LDR R0, SP, 10H
029Bj(D113294C): BLEQ MT [trap=4, pos=4905]
029Ck(81E00034): LDR R1, SP, 34H
029Dk(A1000044): STR R1, R0, 44H
Files.ReadInt(R,l n)m;n
029El(40E800B8): ADD R0, SP, B8H
029Fl .FIXUP D
029Fl(8D200014): LDR SB, MT, MOD2 [Files]
02A0l(41D80001): ADD R1, SB, VAR1
02A1m(42E8001C): ADD R2, SP, 1CH
02A2n .FIXUP P
02A2n(F7211014): BL MOD2 [Files] PROC17
WHILE n > 0 DOo Files.ReadInt(R,p w)q;r SYSTEM.PUT(p, w);s INC(p, 4);t DEC(n) ENDu ;
02A3o(80E0001C): LDR R0, SP, 1CH
02A4o(40090000): SUB R0, R0, 0H
02A5o(E600000F): BLE 15 [02B5H]
02A6p(40E800B8): ADD R0, SP, B8H
02A7p .FIXUP D
02A7p(8D200008): LDR SB, MT, MOD2 [Files]
02A8p(41D80001): ADD R1, SB, VAR1
02A9q(42E80040): ADD R2, SP, 40H
02AAr .FIXUP P
02AAr(F7211008): BL MOD2 [Files] PROC17
02ABs(80E00034): LDR R0, SP, 34H
02ACs(81E00040): LDR R1, SP, 40H
02ADs(A1000000): STR R1, R0, 0H
02AEt(80E00034): LDR R0, SP, 34H
02AFt(40080004): ADD R0, R0, 4H
02B0t(A0E00034): STR R0, SP, 34H
02B1u(80E0001C): LDR R0, SP, 1CH
02B2u(40090001): SUB R0, R0, 1H
02B3u(A0E0001C): STR R0, SP, 1CH
02B4u(E7FFFFEE): B -18 [02A3H]
mod.ptrv := p;w (*pointer references*)
02B5v(80E00010): LDR R0, SP, 10H
02B6v(D113BF4C): BLEQ MT [trap=4, pos=5055]
02B7w(81E00034): LDR R1, SP, 34H
02B8w(A1000048): STR R1, R0, 48H
Files.ReadInt(R,x w)y;z
02B9x(40E800B8): ADD R0, SP, B8H
02BAx .FIXUP D
02BAx(8D200013): LDR SB, MT, MOD2 [Files]
02BBx(41D80001): ADD R1, SB, VAR1
02BCy(42E80040): ADD R2, SP, 40H
02BDz .FIXUP P
02BDz(F7211013): BL MOD2 [Files] PROC17
WHILE w >= 0 DOa SYSTEM.PUT(p, mod.datab + w -c Start)d;e INC(p, 4);f Files.ReadInt(R,g w)h ENDi ;
02BEa(80E00040): LDR R0, SP, 40H
02BFa(40090000): SUB R0, R0, 0H
02C0a(E5000013): BLT 19 [02D4H]
02C1b(80E00010): LDR R0, SP, 10H
02C2b(D114294C): BLEQ MT [trap=4, pos=5161]
02C3c(80000034): LDR R0, R0, 34H
02C4c(81E00040): LDR R1, SP, 40H
02C5c(00080001): ADD R0, R0, R1
02C6d .FIXUP D
02C6d(8D00000C): LDR SB, MT, MOD0 [Boot]
02C7d(81D00024): LDR R1, SB, 24H [data]
02C8d(00090001): SUB R0, R0, R1
02C9e(81E00034): LDR R1, SP, 34H
02CAe(A0100000): STR R0, R1, 0H
02CBf(80E00034): LDR R0, SP, 34H
02CCf(40080004): ADD R0, R0, 4H
02CDf(A0E00034): STR R0, SP, 34H
02CEg(40E800B8): ADD R0, SP, B8H
02CFg .FIXUP D
02CFg(8D200009): LDR SB, MT, MOD2 [Files]
02D0g(41D80001): ADD R1, SB, VAR1
02D1h(42E80040): ADD R2, SP, 40H
02D2i .FIXUP P
02D2i(F7211015): BL MOD2 [Files] PROC17
02D3i(E7FFFFEA): B -22 [02BEH]
SYSTEM.PUT(p, 0);j INC(p, 4);k
02D4j(80E00034): LDR R0, SP, 34H
02D5j(41000000): MOV R1, R0, 0H
02D6j(A1000000): STR R1, R0, 0H
02D7k(80E00034): LDR R0, SP, 34H
02D8k(40080004): ADD R0, R0, 4H
02D9k(A0E00034): STR R0, SP, 34H
Files.ReadInt(R,l fixorgP)m;n Files.ReadInt(R,o fixorgD)p;q Files.ReadInt(R,r fixorgT)s;t
02DAl(40E800B8): ADD R0, SP, B8H
02DBl .FIXUP D
02DBl(8D20000C): LDR SB, MT, MOD2 [Files]
02DCl(41D80001): ADD R1, SB, VAR1
02DDm(42E8004C): ADD R2, SP, 4CH
02DEn .FIXUP P
02DEn(F721100C): BL MOD2 [Files] PROC17
02DFo(40E800B8): ADD R0, SP, B8H
02E0o .FIXUP D
02E0o(8D200005): LDR SB, MT, MOD2 [Files]
02E1o(41D80001): ADD R1, SB, VAR1
02E2p(42E80050): ADD R2, SP, 50H
02E3q .FIXUP P
02E3q(F7211005): BL MOD2 [Files] PROC17
02E4r(40E800B8): ADD R0, SP, B8H
02E5r .FIXUP D
02E5r(8D200005): LDR SB, MT, MOD2 [Files]
02E6r(41D80001): ADD R1, SB, VAR1
02E7s(42E80054): ADD R2, SP, 54H
02E8t .FIXUP P
02E8t(F7211005): BL MOD2 [Files] PROC17
Files.ReadInt(R,u w)v;w body := SYSTEM.VAL(Command, mod.codex + w -y Start)z;a
02E9u(40E800B8): ADD R0, SP, B8H
02EAu .FIXUP D
02EAu(8D200005): LDR SB, MT, MOD2 [Files]
02EBu(41D80001): ADD R1, SB, VAR1
02ECv(42E80040): ADD R2, SP, 40H
02EDw .FIXUP P
02EDw(F7211005): BL MOD2 [Files] PROC17
02EEx(80E00010): LDR R0, SP, 10H
02EFx(D1151C4C): BLEQ MT [trap=4, pos=5404]
02F0y(80000038): LDR R0, R0, 38H
02F1y(81E00040): LDR R1, SP, 40H
02F2y(00080001): ADD R0, R0, R1
02F3z .FIXUP D
02F3z(8D000009): LDR SB, MT, MOD0 [Boot]
02F4z(81D00024): LDR R1, SB, 24H [data]
02F5z(00090001): SUB R0, R0, R1
02F6a(A0E00048): STR R0, SP, 48H
Files.Read(R,b ch)c;d
02F7b(40E800B8): ADD R0, SP, B8H
02F8b .FIXUP D
02F8b(8D200005): LDR SB, MT, MOD2 [Files]
02F9b(41D80001): ADD R1, SB, VAR1
02FAc(42E80044): ADD R2, SP, 44H
02FBd .FIXUP P
02FBd(F721000E): BL MOD2 [Files] PROC16
IF ch # "O" THENe (*corrupted file*) mod := NIL;f error(4,g name)h ENDi
02FCe(90E00044): LDR R0, SP, 44H
02FDe(4009004F): SUB R0, R0, 4FH
02FEe(E1000006): BEQ 6 [0305H]
02FFf(40000000): MOV R0, R0, 0H
0300f(A0E00010): STR R0, SP, 10H
0301g(40000004): MOV R0, R0, 4H
0302h(81E00004): LDR R1, SP, 4H
0303h(82E00008): LDR R2, SP, 8H
0304i(F7FFFD61): BL -671 [0066H]
END ;
IF res = 0 THENj (*fixup of BL*)
0305j .FIXUP D
0305j(8D00000D): LDR SB, MT, MOD0 [Boot]
0306j(80D0002C): LDR R0, SB, 2CH [data]
0307j(E9000101): BNE 257 [0409H]
adr := mod.codek + fixorgP*4;l
0308k(80E00010): LDR R0, SP, 10H
0309k(D115DB4C): BLEQ MT [trap=4, pos=5595]
030Al(81E0004C): LDR R1, SP, 4CH
030Bl(41110002): LSL R1, R1, 2H
030Cl(80000038): LDR R0, R0, 38H
030Dl(00080001): ADD R0, R0, R1
030El(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.codem DOn
030Fm(80E00010): LDR R0, SP, 10H
0310m(D116054C): BLEQ MT [trap=4, pos=5637]
0311n(81E0005C): LDR R1, SP, 5CH
0312n(80000038): LDR R0, R0, 38H
0313n(01190000): SUB R1, R1, R0
0314n(E100003D): BEQ 61 [0352H]
SYSTEM.GET(adr, inst);o
0315o(80E0005C): LDR R0, SP, 5CH
0316o(80000000): LDR R0, R0, 0H
0317o(A0E00060): STR R0, SP, 60H
mno := inst DIV 100000H MODp 10H;q
0318p(80E00060): LDR R0, SP, 60H
0319p(40020014): ASR R0, R0, 14H
031Aq(4004000F): AND R0, R0, FH
031Bq(A0E00028): STR R0, SP, 28H
pno := inst DIV 1000H MODr 100H;s
031Cr(80E00060): LDR R0, SP, 60H
031Dr(4002000C): ASR R0, R0, CH
031Es(400400FF): AND R0, R0, FFH
031Fs(A0E00064): STR R0, SP, 64H
disp := inst MOD 1000H;t
0320t(80E00060): LDR R0, SP, 60H
0321t(40040FFF): AND R0, R0, FFFH
0322t(A0E00058): STR R0, SP, 58H
SYSTEM.GET(mod.impu + (mno-1)v*4,w impmod);x
0323u(80E00010): LDR R0, SP, 10H
0324u(D116BD4C): BLEQ MT [trap=4, pos=5821]
0325v(81E00028): LDR R1, SP, 28H
0326v(41190001): SUB R1, R1, 1H
0327w(41110002): LSL R1, R1, 2H
0328w(8000003C): LDR R0, R0, 3CH
0329w(00080001): ADD R0, R0, R1
032Ax(80000000): LDR R0, R0, 0H
032Bx(A0E00014): STR R0, SP, 14H
SYSTEM.GET(impmod.enty + pno*4,z dest);a dest := dest + impmod.codeb -c Start;d
032Cy(80E00014): LDR R0, SP, 14H
032Dy(D116F34C): BLEQ MT [trap=4, pos=5875]
032Ez(81E00064): LDR R1, SP, 64H
032Fz(41110002): LSL R1, R1, 2H
0330z(80000044): LDR R0, R0, 44H
0331z(00080001): ADD R0, R0, R1
0332a(80000000): LDR R0, R0, 0H
0333a(A0E0006C): STR R0, SP, 6CH
0334b(80E00014): LDR R0, SP, 14H
0335b(D1171E4C): BLEQ MT [trap=4, pos=5918]
0336c(81E0006C): LDR R1, SP, 6CH
0337c(80000038): LDR R0, R0, 38H
0338c(00180000): ADD R0, R1, R0
0339d .FIXUP D
0339d(8D000034): LDR SB, MT, MOD0 [Boot]
033Ad(81D00024): LDR R1, SB, 24H [data]
033Bd(00090001): SUB R0, R0, R1
033Cd(A0E0006C): STR R0, SP, 6CH
offset := (dest - (adr - Start)e -f 4)g DIV 4;h
033De(80E0005C): LDR R0, SP, 5CH
033Ee(81D00024): LDR R1, SB, 24H
033Fe(00090001): SUB R0, R0, R1
0340f(81E0006C): LDR R1, SP, 6CH
0341f(00190000): SUB R0, R1, R0
0342g(40090004): SUB R0, R0, 4H
0343h(40020002): ASR R0, R0, 2H
0344h(A0E00070): STR R0, SP, 70H
SYSTEM.PUT(adr, (offset MOD 1000000H)i + 0F7000000H)j;k
0345i(80E00070): LDR R0, SP, 70H
0346i(40010008): LSL R0, R0, 8H
0347i(40030008): ROR R0, R0, 8H
0348j(7100F700): MOV' R1, R0, FFFFF700H
0349j(00080001): ADD R0, R0, R1
034Ak(81E0005C): LDR R1, SP, 5CH
034Bk(A0100000): STR R0, R1, 0H
adr := adr - disp*4
ENDl ;
034Cl(80E00058): LDR R0, SP, 58H
034Dl(40010002): LSL R0, R0, 2H
034El(81E0005C): LDR R1, SP, 5CH
034Fl(00190000): SUB R0, R1, R0
0350l(A0E0005C): STR R0, SP, 5CH
0351l(E7FFFFBD): B -67 [030FH]
(*fixup of LDR/STR/ADD*)
adr := mod.codem + fixorgD*4;n
0352m(80E00010): LDR R0, SP, 10H
0353m(D118014C): BLEQ MT [trap=4, pos=6145]
0354n(81E00050): LDR R1, SP, 50H
0355n(41110002): LSL R1, R1, 2H
0356n(80000038): LDR R0, R0, 38H
0357n(00080001): ADD R0, R0, R1
0358n(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.codeo DOp
0359o(80E00010): LDR R0, SP, 10H
035Ao(D1182B4C): BLEQ MT [trap=4, pos=6187]
035Bp(81E0005C): LDR R1, SP, 5CH
035Cp(80000038): LDR R0, R0, 38H
035Dp(01190000): SUB R1, R1, R0
035Ep(E100005B): BEQ 91 [03BAH]
SYSTEM.GET(adr, inst);q
035Fq(80E0005C): LDR R0, SP, 5CH
0360q(80000000): LDR R0, R0, 0H
0361q(A0E00060): STR R0, SP, 60H
mno := inst DIV 100000H MODr 10H;s
0362r(80E00060): LDR R0, SP, 60H
0363r(40020014): ASR R0, R0, 14H
0364s(4004000F): AND R0, R0, FH
0365s(A0E00028): STR R0, SP, 28H
disp := inst MOD 1000H;t
0366t(80E00060): LDR R0, SP, 60H
0367t(40040FFF): AND R0, R0, FFFH
0368t(A0E00058): STR R0, SP, 58H
IF mno = 0 THENu (*global*)
0369u(80E00028): LDR R0, SP, 28H
036Au(E900000D): BNE 13 [0378H]
SYSTEM.PUT(adr, (inst DIV 1000000H *v 10H +w MT)x * 100000H +y mod.numz * 4)a
036Bv(80E00060): LDR R0, SP, 60H
036Cv(40020018): ASR R0, R0, 18H
036Dw(40010004): LSL R0, R0, 4H
036Ex(4008000C): ADD R0, R0, CH
036Fy(40010014): LSL R0, R0, 14H
0370z(81E00010): LDR R1, SP, 10H
0371z(D119104C): BLEQ MT [trap=4, pos=6416]
0372a(81100028): LDR R1, R1, 28H
0373a(41110002): LSL R1, R1, 2H
0374a(00080001): ADD R0, R0, R1
ELSEb (*import*)
0375b(81E0005C): LDR R1, SP, 5CH
0376b(A0100000): STR R0, R1, 0H
SYSTEMc.GET(mod.impd + (mno-1)e*4,f impmod);g v := impmod.numh;i
0377c(E700003C): B 60 [03B4H]
0378d(80E00010): LDR R0, SP, 10H
0379d(D1194E4C): BLEQ MT [trap=4, pos=6478]
037Ae(81E00028): LDR R1, SP, 28H
037Be(41190001): SUB R1, R1, 1H
037Cf(41110002): LSL R1, R1, 2H
037Df(8000003C): LDR R0, R0, 3CH
037Ef(00080001): ADD R0, R0, R1
037Fg(80000000): LDR R0, R0, 0H
0380g(A0E00014): STR R0, SP, 14H
0381h(80E00014): LDR R0, SP, 14H
0382h(D119744C): BLEQ MT [trap=4, pos=6516]
0383i(80000028): LDR R0, R0, 28H
0384i(A0E0003C): STR R0, SP, 3CH
SYSTEM.PUT(adr, (inst DIV 1000000H *j 10H +k MT)l * 100000H +m v*4)n;o
0385j(80E00060): LDR R0, SP, 60H
0386j(40020018): ASR R0, R0, 18H
0387k(40010004): LSL R0, R0, 4H
0388l(4008000C): ADD R0, R0, CH
0389m(40010014): LSL R0, R0, 14H
038An(81E0003C): LDR R1, SP, 3CH
038Bn(41110002): LSL R1, R1, 2H
038Cn(00080001): ADD R0, R0, R1
038Do(81E0005C): LDR R1, SP, 5CH
038Eo(A0100000): STR R0, R1, 0H
SYSTEM.GET(adr+4,p inst);q vno := inst MOD 100H;r
038Fp(80E0005C): LDR R0, SP, 5CH
0390p(40080004): ADD R0, R0, 4H
0391q(80000000): LDR R0, R0, 0H
0392q(A0E00060): STR R0, SP, 60H
0393r(80E00060): LDR R0, SP, 60H
0394r(400400FF): AND R0, R0, FFH
0395r(A0E00068): STR R0, SP, 68H
SYSTEM.GET(impmod.ents + vno*4,t offset);u
0396s(80E00014): LDR R0, SP, 14H
0397s(D11A1F4C): BLEQ MT [trap=4, pos=6687]
0398t(81E00068): LDR R1, SP, 68H
0399t(41110002): LSL R1, R1, 2H
039At(80000044): LDR R0, R0, 44H
039Bt(00080001): ADD R0, R0, R1
039Cu(80000000): LDR R0, R0, 0H
039Du(A0E00070): STR R0, SP, 70H
IF ODD(inst DIV 100H)v THENw offset := offset + impmod.codex -y impmod.dataz ENDa ;
039Ev(80E00060): LDR R0, SP, 60H
039Fv(40020008): ASR R0, R0, 8H
03A0w(40040001): AND R0, R0, 1H
03A1w(E100000A): BEQ 10 [03ACH]
03A2x(80E00014): LDR R0, SP, 14H
03A3x(D11A774C): BLEQ MT [trap=4, pos=6775]
03A4y(81E00070): LDR R1, SP, 70H
03A5y(80000038): LDR R0, R0, 38H
03A6y(00180000): ADD R0, R1, R0
03A7z(81E00014): LDR R1, SP, 14H
03A8z(D11A854C): BLEQ MT [trap=4, pos=6789]
03A9a(81100034): LDR R1, R1, 34H
03AAa(00090001): SUB R0, R0, R1
03ABa(A0E00070): STR R0, SP, 70H
SYSTEM.PUT(adr+4,b inst DIV 10000H *c 10000H +d offset)e
03ACb(80E0005C): LDR R0, SP, 5CH
03ADb(40080004): ADD R0, R0, 4H
03AEc(81E00060): LDR R1, SP, 60H
03AFc(41120010): ASR R1, R1, 10H
03B0d(41110010): LSL R1, R1, 10H
03B1e(82E00070): LDR R2, SP, 70H
03B2e(01180002): ADD R1, R1, R2
ENDf ;
03B3f(A1000000): STR R1, R0, 0H
adr := adr - disp*4
ENDg ;
03B4g(80E00058): LDR R0, SP, 58H
03B5g(40010002): LSL R0, R0, 2H
03B6g(81E0005C): LDR R1, SP, 5CH
03B7g(00190000): SUB R0, R1, R0
03B8g(A0E0005C): STR R0, SP, 5CH
03B9g(E7FFFF9F): B -97 [0359H]
(*fixup of type descriptors*)
adr := mod.datah + fixorgT*4;i
03BAh(80E00010): LDR R0, SP, 10H
03BBh(D11B464C): BLEQ MT [trap=4, pos=6982]
03BCi(81E00054): LDR R1, SP, 54H
03BDi(41110002): LSL R1, R1, 2H
03BEi(80000034): LDR R0, R0, 34H
03BFi(00080001): ADD R0, R0, R1
03C0i(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.dataj DOk
03C1j(80E00010): LDR R0, SP, 10H
03C2j(D11B704C): BLEQ MT [trap=4, pos=7024]
03C3k(81E0005C): LDR R1, SP, 5CH
03C4k(80000034): LDR R0, R0, 34H
03C5k(01190000): SUB R1, R1, R0
03C6k(E100003D): BEQ 61 [0404H]
SYSTEM.GET(adr, inst);l
03C7l(80E0005C): LDR R0, SP, 5CH
03C8l(80000000): LDR R0, R0, 0H
03C9l(A0E00060): STR R0, SP, 60H
mno := inst DIV 1000000H MODm 10H;n
03CAm(80E00060): LDR R0, SP, 60H
03CBm(40020018): ASR R0, R0, 18H
03CCn(4004000F): AND R0, R0, FH
03CDn(A0E00028): STR R0, SP, 28H
vno := inst DIV 1000H MODo 1000H;p
03CEo(80E00060): LDR R0, SP, 60H
03CFo(4002000C): ASR R0, R0, CH
03D0p(40040FFF): AND R0, R0, FFFH
03D1p(A0E00068): STR R0, SP, 68H
disp := inst MOD 1000H;q
03D2q(80E00060): LDR R0, SP, 60H
03D3q(40040FFF): AND R0, R0, FFFH
03D4q(A0E00058): STR R0, SP, 58H
IF mno = 0 THENr (*global*) inst := mod.datas - Start +t vno
03D5r(80E00028): LDR R0, SP, 28H
03D6r(E900000A): BNE 10 [03E1H]
03D7s(80E00010): LDR R0, SP, 10H
03D8s(D11C434C): BLEQ MT [trap=4, pos=7235]
03D9t(80000034): LDR R0, R0, 34H
03DAt .FIXUP D
03DAt(8D0000A1): LDR SB, MT, MOD0 [Boot]
03DBt(81D00024): LDR R1, SB, 24H [data]
03DCt(00090001): SUB R0, R0, R1
ELSEu (*import*)
03DDu(81E00068): LDR R1, SP, 68H
03DEu(00080001): ADD R0, R0, R1
03DFu(A0E00060): STR R0, SP, 60H
SYSTEMv.GET(mod.impw + (mno-1)x*4,y impmod);z
03E0v(E700001A): B 26 [03FBH]
03E1w(80E00010): LDR R0, SP, 10H
03E2w(D11C8A4C): BLEQ MT [trap=4, pos=7306]
03E3x(81E00028): LDR R1, SP, 28H
03E4x(41190001): SUB R1, R1, 1H
03E5y(41110002): LSL R1, R1, 2H
03E6y(8000003C): LDR R0, R0, 3CH
03E7y(00080001): ADD R0, R0, R1
03E8z(80000000): LDR R0, R0, 0H
03E9z(A0E00014): STR R0, SP, 14H
SYSTEM.GET(impmod.enta + vno*4,b offset);c
03EAa(80E00014): LDR R0, SP, 14H
03EBa(D11CC24C): BLEQ MT [trap=4, pos=7362]
03ECb(81E00068): LDR R1, SP, 68H
03EDb(41110002): LSL R1, R1, 2H
03EEb(80000044): LDR R0, R0, 44H
03EFb(00080001): ADD R0, R0, R1
03F0c(80000000): LDR R0, R0, 0H
03F1c(A0E00070): STR R0, SP, 70H
inst := impmod.datad + offset -e Start
03F2d(80E00014): LDR R0, SP, 14H
03F3d(D11CF44C): BLEQ MT [trap=4, pos=7412]
03F4e(80000034): LDR R0, R0, 34H
03F5e(81E00070): LDR R1, SP, 70H
03F6e(00080001): ADD R0, R0, R1
ENDf ;
03F7f .FIXUP D
03F7f(8D00001D): LDR SB, MT, MOD0 [Boot]
03F8f(81D00024): LDR R1, SB, 24H [data]
03F9f(00090001): SUB R0, R0, R1
03FAf(A0E00060): STR R0, SP, 60H
SYSTEM.PUT(adr, inst);g adr := adr - disp*4
03FBg(80E0005C): LDR R0, SP, 5CH
03FCg(81E00060): LDR R1, SP, 60H
03FDg(A1000000): STR R1, R0, 0H
ENDh ;
03FEh(80E00058): LDR R0, SP, 58H
03FFh(40010002): LSL R0, R0, 2H
0400h(81E0005C): LDR R1, SP, 5CH
0401h(00190000): SUB R0, R1, R0
0402h(A0E0005C): STR R0, SP, 5CH
0403h(E7FFFFBD): B -67 [03C1H]
SYSTEM.PUT(Start, body) (*module initialization body*)
ELSIFi resj = 3 THENk importing := name;l
0404i .FIXUP D
0404i(8D00000D): LDR SB, MT, MOD0 [Boot]
0405i(80D00024): LDR R0, SB, 24H [data]
0406i(81E00048): LDR R1, SP, 48H
0407i(A1000000): STR R1, R0, 0H
0408j(E7000026): B 38 [042FH]
0409k .FIXUP D
0409k(8D000005): LDR SB, MT, MOD0 [Boot]
040Ak(80D0002C): LDR R0, SB, 2CH [data]
040Bk(40090003): SUB R0, R0, 3H
040Ck(E9000022): BNE 34 [042FH]
040Dl .FIXUP D
040Dl(8D000004): LDR SB, MT, MOD0 [Boot]
040El(40D80030): ADD R0, SB, 30H [data]
040Fl(81E00004): LDR R1, SP, 4H
0410l(82E00008): LDR R2, SP, 8H
0411l(E100000B): BEQ 11 [041DH]
0412l(42280003): ADD R2, R2, 3H
0413l(42220002): ASR R2, R2, 2H
0414l(43000008): MOV R3, R0, 8H
0415l(03290003): SUB R3, R2, R3
0416l(DE1DC33C): BLGT MT [trap=3, pos=7619]
0417l(83100000): LDR R3, R1, 0H
0418l(41180004): ADD R1, R1, 4H
0419l(A3000000): STR R3, R0, 0H
041Al(40080004): ADD R0, R0, 4H
041Bl(42290001): SUB R2, R2, 1H
041Cl(E9FFFFFA): BNE -6 [0417H]
WHILE nofimps > 0 DOm DEC(nofimps);n DEC(import[nofimps]o.refcntp) ENDq
041Dm(80E0002C): LDR R0, SP, 2CH
041Em(40090000): SUB R0, R0, 0H
041Fm(E600000F): BLE 15 [042FH]
0420n(80E0002C): LDR R0, SP, 2CH
0421n(40090001): SUB R0, R0, 1H
0422n(A0E0002C): STR R0, SP, 2CH
0423o(80E0002C): LDR R0, SP, 2CH
0424o(41090010): SUB R1, R0, 10H
0425o(DA1E021C): BLCC MT [trap=1, pos=7682]
0426o(40010002): LSL R0, R0, 2H
0427o(00E80000): ADD R0, SP, R0
0428p(800000D0): LDR R0, R0, D0H
0429p(D11E094C): BLEQ MT [trap=4, pos=7689]
042Aq(40080030): ADD R0, R0, 30H
042Bq(81000000): LDR R1, R0, 0H
042Cq(41190001): SUB R1, R1, 1H
042Dq(A1000000): STR R1, R0, 0H
042Eq(E7FFFFEE): B -18 [041DH]
END
END ;
newmod := mod
ENDr Link1;
042Fr(80E00010): LDR R0, SP, 10H
0430r(81E0000C): LDR R1, SP, CH
0431r(A0100000): STR R0, R1, 0H
0432r(8FE00000): LDR LNK, SP, 0H
0433r(4EE80110): ADD SP, SP, 110H
0434r(C700000F): B LNK
PROCEDURE Link*; (*link object files together and create a single boot file F.bin from them*)
VAR i, x: INTEGER;
F: Files.File; R: Files.Rider;
S: Texts.Scanner;
M, p: Module;
name: ModuleName;
BEGINs Texts.OpenScanner(S,t Oberon.Par.text,u Oberon.Par.pos)v;w Texts.Scan(S)x;y
0435s .PROC 5
0435s .COMMAND Link
0435s(4EE900C4): SUB SP, SP, C4H
0436s(AFE00000): STR LNK, SP, 0H
0437t(40E80028): ADD R0, SP, 28H
0438t .FIXUP D
0438t(8D40002B): LDR SB, MT, MOD4 [Texts]
0439t(41D80003): ADD R1, SB, VAR3
043Au .FIXUP D
043Au(8D600002): LDR SB, MT, MOD6 [Oberon]
043Bu(42D8000E): ADD R2, SB, VAR14
043Cu(82200008): LDR R2, R2, 8H
043Dv .FIXUP D
043Dv(8D600003): LDR SB, MT, MOD6 [Oberon]
043Ev(43D8000E): ADD R3, SB, VAR14
043Fv(8330000C): LDR R3, R3, CH
0440w .FIXUP P
0440w(F7415145): BL MOD4 [Texts] PROC21
0441x(40E80028): ADD R0, SP, 28H
0442x .FIXUP D
0442x(8D400005): LDR SB, MT, MOD4 [Texts]
0443x(41D80003): ADD R1, SB, VAR3
0444y .FIXUP P
0444y(F7416004): BL MOD4 [Texts] PROC22
IF (S.class = Texts.Name)z OR (aS.class = Texts.String)b THENc (*name of top module*)
0445z(80E00064): LDR R0, SP, 64H
0446z(40090001): SUB R0, R0, 1H
0447a(E1000003): BEQ 3 [044BH]
0448b(80E00064): LDR R0, SP, 64H
0449b(40090002): SUB R0, R0, 2H
044Ac(E900015B): BNE 347 [05A6H]
root := NIL;d Start := Modules.AllocPtr;e MTOrg := Start + 32;f AllocPtr := Start + 256;g i := Start;h
044Bd(40000000): MOV R0, R0, 0H
044Cd .FIXUP D
044Cd(8D00000A): LDR SB, MT, MOD0 [Boot]
044Dd(A0D00018): STR R0, SB, 18H [data]
044Ee .FIXUP D
044Ee(8D300002): LDR SB, MT, MOD3 [Modules]
044Fe(80D00004): LDR R0, SB, VAR4
0450e .FIXUP D
0450e(8D000002): LDR SB, MT, MOD0 [Boot]
0451e(A0D00024): STR R0, SB, 24H [data]
0452f(80D00024): LDR R0, SB, 24H
0453f(40080020): ADD R0, R0, 20H
0454f(A0D0001C): STR R0, SB, 1CH
0455g(80D00024): LDR R0, SB, 24H
0456g(40080100): ADD R0, R0, 100H
0457g(A0D00020): STR R0, SB, 20H
0458h(80D00024): LDR R0, SB, 24H
0459h(A0E00004): STR R0, SP, 4H
WHILE i < AllocPtr DOi SYSTEM.PUT(i, 0);j INC(i, 4) ENDk ;
045Ai(80E00004): LDR R0, SP, 4H
045Bi .FIXUP D
045Bi(8D00000B): LDR SB, MT, MOD0 [Boot]
045Ci(81D00020): LDR R1, SB, 20H [data]
045Di(00090001): SUB R0, R0, R1
045Ei(ED000007): BGE 7 [0466H]
045Fj(80E00004): LDR R0, SP, 4H
0460j(41000000): MOV R1, R0, 0H
0461j(A1000000): STR R1, R0, 0H
0462k(80E00004): LDR R0, SP, 4H
0463k(40080004): ADD R0, R0, 4H
0464k(A0E00004): STR R0, SP, 4H
0465k(E7FFFFF4): B -12 [045AH]
Link1(S.s,l M)m;n
0466l(40E8007C): ADD R0, SP, 7CH
0467l(41000020): MOV R1, R0, 20H
0468m(42E8009C): ADD R2, SP, 9CH
0469n(F7FFFC61): BL -927 [00CBH]
IF res = 0 THENo p := root;p Texts.WriteString(W,q " linking")r;s
046Ao .FIXUP D
046Ao(8D00000F): LDR SB, MT, MOD0 [Boot]
046Bo(80D0002C): LDR R0, SB, 2CH [data]
046Co(E90000D8): BNE 216 [0545H]
046Dp .FIXUP D
046Dp(8D000003): LDR SB, MT, MOD0 [Boot]
046Ep(80D00018): LDR R0, SB, 18H [data]
046Fp(A0E000A0): STR R0, SP, A0H
0470q(40D80070): ADD R0, SB, 70H
0471q .FIXUP D
0471q(8D400004): LDR SB, MT, MOD4 [Texts]
0472q(41D80005): ADD R1, SB, VAR5
0473r .FIXUP D
0473r(8D000002): LDR SB, MT, MOD0 [Boot]
0474r(42D800A0): ADD R2, SB, A0H [" linking"]
0475r(4300000A): MOV R3, R0, AH
0476s .FIXUP P
0476s(F741D032): BL MOD4 [Texts] PROC29
WHILE p # NIL DOt (*fixup*) Texts.Write(W,u " ")v;w Texts.WriteString(W,x p.namey)z;a
0477t(80E000A0): LDR R0, SP, A0H
0478t(E1000075): BEQ 117 [04EEH]
0479u .FIXUP D
0479u(8D000006): LDR SB, MT, MOD0 [Boot]
047Au(40D80070): ADD R0, SB, 70H [data]
047Bu .FIXUP D
047Bu(8D400002): LDR SB, MT, MOD4 [Texts]
047Cu(41D80005): ADD R1, SB, VAR5
047Dv(42000020): MOV R2, R0, 20H
047Ew .FIXUP P
047Ew(F741B008): BL MOD4 [Texts] PROC27
047Fx .FIXUP D
047Fx(8D000004): LDR SB, MT, MOD0 [Boot]
0480x(40D80070): ADD R0, SB, 70H [data]
0481x .FIXUP D
0481x(8D400002): LDR SB, MT, MOD4 [Texts]
0482x(41D80005): ADD R1, SB, VAR5
0483y(82E000A0): LDR R2, SP, A0H
0484y(D1211B4C): BLEQ MT [trap=4, pos=8475]
0485z(43000020): MOV R3, R0, 20H
0486a .FIXUP P
0486a(F741D008): BL MOD4 [Texts] PROC29
M := p;b p := p.nextc;d
0487b(80E000A0): LDR R0, SP, A0H
0488b(A0E0009C): STR R0, SP, 9CH
0489c(80E000A0): LDR R0, SP, A0H
048Ac(D1213B4C): BLEQ MT [trap=4, pos=8507]
048Bd(80000020): LDR R0, R0, 20H
048Cd(A0E000A0): STR R0, SP, A0H
IF M.nexte # NIL THENf M.nextg := SYSTEM.VAL(Module, SYSTEM.VAL(INTEGER, M.nexth) - Start)i ENDj ;
048De(80E0009C): LDR R0, SP, 9CH
048Ee(D121504C): BLEQ MT [trap=4, pos=8528]
048Ff(80000020): LDR R0, R0, 20H
0490f(E1000009): BEQ 9 [049AH]
0491g(80E0009C): LDR R0, SP, 9CH
0492g(D121624C): BLEQ MT [trap=4, pos=8546]
0493h(81E0009C): LDR R1, SP, 9CH
0494h(D121934C): BLEQ MT [trap=4, pos=8595]
0495i(81100020): LDR R1, R1, 20H
0496i .FIXUP D
0496i(8D000015): LDR SB, MT, MOD0 [Boot]
0497i(82D00024): LDR R2, SB, 24H [data]
0498i(01190002): SUB R1, R1, R2
0499j(A1000020): STR R1, R0, 20H
M.datak := M.datal - Start;m
049Ak(80E0009C): LDR R0, SP, 9CH
049Bk(D121B44C): BLEQ MT [trap=4, pos=8628]
049Cl(81E0009C): LDR R1, SP, 9CH
049Dl(D121BE4C): BLEQ MT [trap=4, pos=8638]
049Em(81100034): LDR R1, R1, 34H
049Fm .FIXUP D
049Fm(8D000009): LDR SB, MT, MOD0 [Boot]
04A0m(82D00024): LDR R2, SB, 24H [data]
04A1m(01190002): SUB R1, R1, R2
04A2m(A1000034): STR R1, R0, 34H
SYSTEM.PUT(M.numn * 4 +o MTOrg,p M.dataq);r (*module table entry*)
04A3n(80E0009C): LDR R0, SP, 9CH
04A4n(D121E24C): BLEQ MT [trap=4, pos=8674]
04A5o(80000028): LDR R0, R0, 28H
04A6o(40010002): LSL R0, R0, 2H
04A7p(81D0001C): LDR R1, SB, 1CH
04A8p(00080001): ADD R0, R0, R1
04A9q(81E0009C): LDR R1, SP, 9CH
04AAq(D121F64C): BLEQ MT [trap=4, pos=8694]
04ABr(81100034): LDR R1, R1, 34H
04ACr(A1000000): STR R1, R0, 0H
M.codes := M.codet - Start;u
04ADs(80E0009C): LDR R0, SP, 9CH
04AEs(D122204C): BLEQ MT [trap=4, pos=8736]
04AFt(81E0009C): LDR R1, SP, 9CH
04B0t(D1222A4C): BLEQ MT [trap=4, pos=8746]
04B1u(81100038): LDR R1, R1, 38H
04B2u(82D00024): LDR R2, SB, 24H
04B3u(01190002): SUB R1, R1, R2
04B4u(A1000038): STR R1, R0, 38H
i := M.impv;w
04B5v(80E0009C): LDR R0, SP, 9CH
04B6v(D122484C): BLEQ MT [trap=4, pos=8776]
04B7w(8000003C): LDR R0, R0, 3CH
04B8w(A0E00004): STR R0, SP, 4H
WHILE i < M.cmdx DOy SYSTEM.GET(i, x);z SYSTEM.PUT(i, x - Start)a;b INC(i, 4) ENDc ;
04B9x(80E0009C): LDR R0, SP, 9CH
04BAx(D122634C): BLEQ MT [trap=4, pos=8803]
04BBy(81E00004): LDR R1, SP, 4H
04BCy(80000040): LDR R0, R0, 40H
04BDy(01190000): SUB R1, R1, R0
04BEy(ED00000D): BGE 13 [04CCH]
04BFz(80E00004): LDR R0, SP, 4H
04C0z(80000000): LDR R0, R0, 0H
04C1z(A0E00008): STR R0, SP, 8H
04C2a(80E00008): LDR R0, SP, 8H
04C3a .FIXUP D
04C3a(8D000024): LDR SB, MT, MOD0 [Boot]
04C4a(81D00024): LDR R1, SB, 24H [data]
04C5a(00090001): SUB R0, R0, R1
04C6b(81E00004): LDR R1, SP, 4H
04C7b(A0100000): STR R0, R1, 0H
04C8c(80E00004): LDR R0, SP, 4H
04C9c(40080004): ADD R0, R0, 4H
04CAc(A0E00004): STR R0, SP, 4H
04CBc(E7FFFFED): B -19 [04B9H]
M.impd := M.impe - Start;f
04CCd(80E0009C): LDR R0, SP, 9CH
04CDd(D122B24C): BLEQ MT [trap=4, pos=8882]
04CEe(81E0009C): LDR R1, SP, 9CH
04CFe(D122BB4C): BLEQ MT [trap=4, pos=8891]
04D0f(8110003C): LDR R1, R1, 3CH
04D1f .FIXUP D
04D1f(8D00000E): LDR SB, MT, MOD0 [Boot]
04D2f(82D00024): LDR R2, SB, 24H [data]
04D3f(01190002): SUB R1, R1, R2
04D4f(A100003C): STR R1, R0, 3CH
M.cmdg := M.cmdh - Start;i
04D5g(80E0009C): LDR R0, SP, 9CH
04D6g(D122D44C): BLEQ MT [trap=4, pos=8916]
04D7h(81E0009C): LDR R1, SP, 9CH
04D8h(D122DD4C): BLEQ MT [trap=4, pos=8925]
04D9i(81100040): LDR R1, R1, 40H
04DAi(82D00024): LDR R2, SB, 24H
04DBi(01190002): SUB R1, R1, R2
04DCi(A1000040): STR R1, R0, 40H
M.entj := M.entk - Start;l
04DDj(80E0009C): LDR R0, SP, 9CH
04DEj(D122F64C): BLEQ MT [trap=4, pos=8950]
04DFk(81E0009C): LDR R1, SP, 9CH
04E0k(D122FF4C): BLEQ MT [trap=4, pos=8959]
04E1l(81100044): LDR R1, R1, 44H
04E2l(82D00024): LDR R2, SB, 24H
04E3l(01190002): SUB R1, R1, R2
04E4l(A1000044): STR R1, R0, 44H
M.ptrm := M.ptrn - Start
04E5m(80E0009C): LDR R0, SP, 9CH
04E6m(D123184C): BLEQ MT [trap=4, pos=8984]
04E7n(81E0009C): LDR R1, SP, 9CH
04E8n(D123214C): BLEQ MT [trap=4, pos=8993]
ENDo ;
04E9o(81100048): LDR R1, R1, 48H
04EAo(82D00024): LDR R2, SB, 24H
04EBo(01190002): SUB R1, R1, R2
04ECo(A1000048): STR R1, R0, 48H
04EDo(E7FFFF89): B -119 [0477H]
SYSTEM.GET(Start, x);p
04EEp .FIXUP D
04EEp(8D00001D): LDR SB, MT, MOD0 [Boot]
04EFp(80D00024): LDR R0, SB, 24H [data]
04F0p(80000000): LDR R0, R0, 0H
04F1p(A0E00008): STR R0, SP, 8H
SYSTEM.PUT(Start, 0E7H * 1000000H + (x DIV 4)q -r 1)s;t (*branch instruction to the initialization body of the top module*)
04F2q(80E00008): LDR R0, SP, 8H
04F3q(40020002): ASR R0, R0, 2H
04F4r(6100E700): MOV' R1, R0, FFFFE700H
04F5r(00180000): ADD R0, R1, R0
04F6s(40090001): SUB R0, R0, 1H
04F7t(81D00024): LDR R1, SB, 24H
04F8t(A0100000): STR R0, R1, 0H
SYSTEM.PUT(Start + 12,u MemLim);v (*limit of available memory / MemLim*)
04F9u(80D00024): LDR R0, SB, 24H
04FAu(4008000C): ADD R0, R0, CH
04FBv(6100000E): MOV' R1, R0, EH
04FCv(41167EF0): IOR R1, R1, 7EF0H
04FDv(A1000000): STR R1, R0, 0H
SYSTEM.PUT(Start + 16,w AllocPtr - Start)x;y (*address of the end of the module space loaded / AllocPtr*)
04FEw(80D00024): LDR R0, SB, 24H
04FFw(40080010): ADD R0, R0, 10H
0500x(81D00020): LDR R1, SB, 20H
0501x(82D00024): LDR R2, SB, 24H
0502x(01190002): SUB R1, R1, R2
0503y(A1000000): STR R1, R0, 0H
SYSTEM.PUT(Start + 20,z SYSTEM.VAL(INTEGER, root) - Start)a;b (*current root of the links of loaded modules / root*)
0504z(80D00024): LDR R0, SB, 24H
0505z(40080014): ADD R0, R0, 14H
0506a(81D00018): LDR R1, SB, 18H
0507a(82D00024): LDR R2, SB, 24H
0508a(01190002): SUB R1, R1, R2
0509b(A1000000): STR R1, R0, 0H
SYSTEM.PUT(Start + 24,c stackOrg);d (*current limit of the module area / stackOrg = heapOrg*)
050Ac(80D00024): LDR R0, SB, 24H
050Bc(40080018): ADD R0, R0, 18H
050Cd(61000008): MOV' R1, R0, 8H
050Dd(A1000000): STR R1, R0, 0H
SYSTEM.PUT(Start + 252,e 12345678H);f (*fingerprint*)
050Ee(80D00024): LDR R0, SB, 24H
050Fe(400800FC): ADD R0, R0, FCH
0510f(61001234): MOV' R1, R0, 1234H
0511f(41165678): IOR R1, R1, 5678H
0512f(A1000000): STR R1, R0, 0H
MakeFileName(name,g S.s,h ".bin")i;j F := Files.New(name)k;l Files.Set(R,m F,n 0)o;p i := Start;q
0513g(40E800A4): ADD R0, SP, A4H
0514g(41000020): MOV R1, R0, 20H
0515h(42E8007C): ADD R2, SP, 7CH
0516h(43000020): MOV R3, R0, 20H
0517i(44D800AC): ADD R4, SB, ACH
0518i(45000005): MOV R5, R0, 5H
0519j(F7FFFAE6): BL -1306 [0000H]
051Ak(40E800A4): ADD R0, SP, A4H
051Bk(41000020): MOV R1, R0, 20H
051Cl .FIXUP P
051Cl(F7203096): BL MOD2 [Files] PROC3
051Dl(A0E0000C): STR R0, SP, CH
051Em(40E80010): ADD R0, SP, 10H
051Fm .FIXUP D
051Fm(8D200031): LDR SB, MT, MOD2 [Files]
0520m(41D80001): ADD R1, SB, VAR1
0521n(82E0000C): LDR R2, SP, CH
0522o(43000000): MOV R3, R0, 0H
0523p .FIXUP P
0523p(F720B007): BL MOD2 [Files] PROC11
0524q .FIXUP D
0524q(8D000005): LDR SB, MT, MOD0 [Boot]
0525q(80D00024): LDR R0, SB, 24H [data]
0526q(A0E00004): STR R0, SP, 4H
WHILE i < AllocPtr DOr SYSTEM.GET(i, x);s Files.WriteInt(R,t x)u;v INC(i, 4) ENDw ;
0527r(80E00004): LDR R0, SP, 4H
0528r .FIXUP D
0528r(8D000004): LDR SB, MT, MOD0 [Boot]
0529r(81D00020): LDR R1, SB, 20H [data]
052Ar(00090001): SUB R0, R0, R1
052Br(ED00000C): BGE 12 [0538H]
052Cs(80E00004): LDR R0, SP, 4H
052Ds(80000000): LDR R0, R0, 0H
052Es(A0E00008): STR R0, SP, 8H
052Ft(40E80010): ADD R0, SP, 10H
0530t .FIXUP D
0530t(8D200008): LDR SB, MT, MOD2 [Files]
0531t(41D80001): ADD R1, SB, VAR1
0532u(82E00008): LDR R2, SP, 8H
0533v .FIXUP P
0533v(F7219010): BL MOD2 [Files] PROC25
0534w(80E00004): LDR R0, SP, 4H
0535w(40080004): ADD R0, R0, 4H
0536w(A0E00004): STR R0, SP, 4H
0537w(E7FFFFEF): B -17 [0527H]
Texts.WriteInt(W,x AllocPtr - Start,y 7)z;a Files.Register(F)b
0538x .FIXUP D
0538x(8D000008): LDR SB, MT, MOD0 [Boot]
0539x(40D80070): ADD R0, SB, 70H [data]
053Ax .FIXUP D
053Ax(8D400002): LDR SB, MT, MOD4 [Texts]
053Bx(41D80005): ADD R1, SB, VAR5
053Cy .FIXUP D
053Cy(8D000002): LDR SB, MT, MOD0 [Boot]
053Dy(82D00020): LDR R2, SB, 20H [data]
053Ey(83D00024): LDR R3, SB, 24H
053Fy(02290003): SUB R2, R2, R3
0540z(43000007): MOV R3, R0, 7H
0541a .FIXUP P
0541a(F741E00E): BL MOD4 [Texts] PROC30
0542b(80E0000C): LDR R0, SP, CH
ELSEc Textsd.WriteString(W,e "Link error: ")f;g Texts.WriteString(W,h importing)i;j
0543c .FIXUP P
0543c(F7204002): BL MOD2 [Files] PROC4
0544d(E7000060): B 96 [05A5H]
0545e .FIXUP D
0545e(8D000009): LDR SB, MT, MOD0 [Boot]
0546e(40D80070): ADD R0, SB, 70H [data]
0547e .FIXUP D
0547e(8D400002): LDR SB, MT, MOD4 [Texts]
0548e(41D80005): ADD R1, SB, VAR5
0549f .FIXUP D
0549f(8D000002): LDR SB, MT, MOD0 [Boot]
054Af(42D800B4): ADD R2, SB, B4H ["Link error: "]
054Bf(4300000E): MOV R3, R0, EH
054Cg .FIXUP P
054Cg(F741D009): BL MOD4 [Texts] PROC29
054Dh .FIXUP D
054Dh(8D000004): LDR SB, MT, MOD0 [Boot]
054Eh(40D80070): ADD R0, SB, 70H [data]
054Fh .FIXUP D
054Fh(8D400002): LDR SB, MT, MOD4 [Texts]
0550h(41D80005): ADD R1, SB, VAR5
0551i .FIXUP D
0551i(8D000002): LDR SB, MT, MOD0 [Boot]
0552i(42D80030): ADD R2, SB, 30H [data]
0553i(43000020): MOV R3, R0, 20H
0554j .FIXUP P
0554j(F741D008): BL MOD4 [Texts] PROC29
IF res = 1 THENk Texts.WriteString(W,l " module not found")m
0555k .FIXUP D
0555k(8D000004): LDR SB, MT, MOD0 [Boot]
0556k(80D0002C): LDR R0, SB, 2CH [data]
0557k(40090001): SUB R0, R0, 1H
0558k(E9000009): BNE 9 [0562H]
0559l .FIXUP D
0559l(8D000004): LDR SB, MT, MOD0 [Boot]
055Al(40D80070): ADD R0, SB, 70H [data]
055Bl .FIXUP D
055Bl(8D400002): LDR SB, MT, MOD4 [Texts]
055Cl(41D80005): ADD R1, SB, VAR5
055Dm .FIXUP D
055Dm(8D000002): LDR SB, MT, MOD0 [Boot]
055Em(42D800C4): ADD R2, SB, C4H [" module not found"]
055Fm(43000012): MOV R3, R0, 12H
ELSIFn reso = 2 THENp Texts.WriteString(W,q " bad version")r
0560n .FIXUP P
0560n(F741D00C): BL MOD4 [Texts] PROC29
0561o(E7000043): B 67 [05A5H]
0562p .FIXUP D
0562p(8D000005): LDR SB, MT, MOD0 [Boot]
0563p(80D0002C): LDR R0, SB, 2CH [data]
0564p(40090002): SUB R0, R0, 2H
0565p(E9000009): BNE 9 [056FH]
0566q .FIXUP D
0566q(8D000004): LDR SB, MT, MOD0 [Boot]
0567q(40D80070): ADD R0, SB, 70H [data]
0568q .FIXUP D
0568q(8D400002): LDR SB, MT, MOD4 [Texts]
0569q(41D80005): ADD R1, SB, VAR5
056Ar .FIXUP D
056Ar(8D000002): LDR SB, MT, MOD0 [Boot]
056Br(42D800D8): ADD R2, SB, D8H [" bad version"]
056Cr(4300000D): MOV R3, R0, DH
ELSIFs rest = 3 THENu Texts.WriteString(W,v " imports ")w;x
056Ds .FIXUP P
056Ds(F741D00D): BL MOD4 [Texts] PROC29
056Et(E7000036): B 54 [05A5H]
056Fu .FIXUP D
056Fu(8D000005): LDR SB, MT, MOD0 [Boot]
0570u(80D0002C): LDR R0, SB, 2CH [data]
0571u(40090003): SUB R0, R0, 3H
0572u(E9000019): BNE 25 [058CH]
0573v .FIXUP D
0573v(8D000004): LDR SB, MT, MOD0 [Boot]
0574v(40D80070): ADD R0, SB, 70H [data]
0575v .FIXUP D
0575v(8D400002): LDR SB, MT, MOD4 [Texts]
0576v(41D80005): ADD R1, SB, VAR5
0577w .FIXUP D
0577w(8D000002): LDR SB, MT, MOD0 [Boot]
0578w(42D800E8): ADD R2, SB, E8H [" imports "]
0579w(4300000A): MOV R3, R0, AH
057Ax .FIXUP P
057Ax(F741D00D): BL MOD4 [Texts] PROC29
Texts.WriteString(W,y imported)z;a Texts.WriteString(W,b " with bad key")c
057By .FIXUP D
057By(8D000004): LDR SB, MT, MOD0 [Boot]
057Cy(40D80070): ADD R0, SB, 70H [data]
057Dy .FIXUP D
057Dy(8D400002): LDR SB, MT, MOD4 [Texts]
057Ey(41D80005): ADD R1, SB, VAR5
057Fz .FIXUP D
057Fz(8D000002): LDR SB, MT, MOD0 [Boot]
0580z(42D80050): ADD R2, SB, 50H [data]
0581z(43000020): MOV R3, R0, 20H
0582a .FIXUP P
0582a(F741D008): BL MOD4 [Texts] PROC29
0583b .FIXUP D
0583b(8D000004): LDR SB, MT, MOD0 [Boot]
0584b(40D80070): ADD R0, SB, 70H [data]
0585b .FIXUP D
0585b(8D400002): LDR SB, MT, MOD4 [Texts]
0586b(41D80005): ADD R1, SB, VAR5
0587c .FIXUP D
0587c(8D000002): LDR SB, MT, MOD0 [Boot]
0588c(42D800F4): ADD R2, SB, F4H [" with bad key"]
0589c(4300000E): MOV R3, R0, EH
ELSIFd rese = 4 THENf Texts.WriteString(W,g " corrupted obj file")h
058Ad .FIXUP P
058Ad(F741D008): BL MOD4 [Texts] PROC29
058Be(E7000019): B 25 [05A5H]
058Cf .FIXUP D
058Cf(8D000005): LDR SB, MT, MOD0 [Boot]
058Df(80D0002C): LDR R0, SB, 2CH [data]
058Ef(40090004): SUB R0, R0, 4H
058Ff(E9000009): BNE 9 [0599H]
0590g .FIXUP D
0590g(8D000004): LDR SB, MT, MOD0 [Boot]
0591g(40D80070): ADD R0, SB, 70H [data]
0592g .FIXUP D
0592g(8D400002): LDR SB, MT, MOD4 [Texts]
0593g(41D80005): ADD R1, SB, VAR5
0594h .FIXUP D
0594h(8D000002): LDR SB, MT, MOD0 [Boot]
0595h(42D80104): ADD R2, SB, 104H [" corrupted obj file"]
0596h(43000014): MOV R3, R0, 14H
ELSIFi resj = 7 THENk Texts.WriteString(W,l " insufficient space")m
0597i .FIXUP P
0597i(F741D00D): BL MOD4 [Texts] PROC29
0598j(E700000C): B 12 [05A5H]
0599k .FIXUP D
0599k(8D000005): LDR SB, MT, MOD0 [Boot]
059Ak(80D0002C): LDR R0, SB, 2CH [data]
059Bk(40090007): SUB R0, R0, 7H
059Ck(E9000008): BNE 8 [05A5H]
059Dl .FIXUP D
059Dl(8D000004): LDR SB, MT, MOD0 [Boot]
059El(40D80070): ADD R0, SB, 70H [data]
059Fl .FIXUP D
059Fl(8D400002): LDR SB, MT, MOD4 [Texts]
05A0l(41D80005): ADD R1, SB, VAR5
05A1m .FIXUP D
05A1m(8D000002): LDR SB, MT, MOD0 [Boot]
05A2m(42D80118): ADD R2, SB, 118H [" insufficient space"]
05A3m(43000014): MOV R3, R0, 14H
ENDn
05A4n .FIXUP P
05A4n(F741D00D): BL MOD4 [Texts] PROC29
END
ELSE Textso.WriteString(W,p "Usage: Boot.Link module")q
05A5o(E7000008): B 8 [05AEH]
05A6p .FIXUP D
05A6p(8D000005): LDR SB, MT, MOD0 [Boot]
05A7p(40D80070): ADD R0, SB, 70H [data]
05A8p .FIXUP D
05A8p(8D400002): LDR SB, MT, MOD4 [Texts]
05A9p(41D80005): ADD R1, SB, VAR5
05AAq .FIXUP D
05AAq(8D000002): LDR SB, MT, MOD0 [Boot]
05ABq(42D8012C): ADD R2, SB, 12CH ["Usage: Boot.Link module"]
05ACq(43000018): MOV R3, R0, 18H
ENDr ;
05ADr .FIXUP P
05ADr(F741D009): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)s;t Texts.Append(Oberon.Log,u W.buf)v
05AEs .FIXUP D
05AEs(8D000004): LDR SB, MT, MOD0 [Boot]
05AFs(40D80070): ADD R0, SB, 70H [data]
05B0s .FIXUP D
05B0s(8D400002): LDR SB, MT, MOD4 [Texts]
05B1s(41D80005): ADD R1, SB, VAR5
05B2t .FIXUP P
05B2t(F741C005): BL MOD4 [Texts] PROC28
05B3u .FIXUP D
05B3u(8D600003): LDR SB, MT, MOD6 [Oberon]
05B4u(80D0000D): LDR R0, SB, VAR13
05B5v .FIXUP D
05B5v(8D000002): LDR SB, MT, MOD0 [Boot]
05B6v(81D00070): LDR R1, SB, 70H [data]
ENDw Link;
05B7w .FIXUP P
05B7w(F740E005): BL MOD4 [Texts] PROC14
05B8w(8FE00000): LDR LNK, SP, 0H
05B9w(4EE800C4): ADD SP, SP, C4H
05BAw(C700000F): B LNK
PROCEDURE Load*; (*load prelinked boot file F.bin onto the boot area of the local disk, starting at sector 2*)
VAR i, secno: LONGINT; b: BYTE;
F: Files.File; R: Files.Rider;
S: Texts.Scanner;
buf: ARRAY Kernel.SectorLength OF BYTE;
BEGINx Texts.OpenScanner(S,y Oberon.Par.text,z Oberon.Par.pos)a;b Texts.Scan(S)c;d
05BBx .PROC 6
05BBx .COMMAND Load
05BBx(4EE904A0): SUB SP, SP, 4A0H
05BCx(AFE00000): STR LNK, SP, 0H
05BDy(40E8002C): ADD R0, SP, 2CH
05BEy .FIXUP D
05BEy(8D400009): LDR SB, MT, MOD4 [Texts]
05BFy(41D80003): ADD R1, SB, VAR3
05C0z .FIXUP D
05C0z(8D600002): LDR SB, MT, MOD6 [Oberon]
05C1z(42D8000E): ADD R2, SB, VAR14
05C2z(82200008): LDR R2, R2, 8H
05C3a .FIXUP D
05C3a(8D600003): LDR SB, MT, MOD6 [Oberon]
05C4a(43D8000E): ADD R3, SB, VAR14
05C5a(8330000C): LDR R3, R3, CH
05C6b .FIXUP P
05C6b(F741500F): BL MOD4 [Texts] PROC21
05C7c(40E8002C): ADD R0, SP, 2CH
05C8c .FIXUP D
05C8c(8D400005): LDR SB, MT, MOD4 [Texts]
05C9c(41D80003): ADD R1, SB, VAR3
05CAd .FIXUP P
05CAd(F7416004): BL MOD4 [Texts] PROC22
IF (S.class = Texts.Name)e OR (fS.class = Texts.String)g THENh (*input file name*)
05CBe(80E00068): LDR R0, SP, 68H
05CCe(40090001): SUB R0, R0, 1H
05CDf(E1000003): BEQ 3 [05D1H]
05CEg(80E00068): LDR R0, SP, 68H
05CFg(40090002): SUB R0, R0, 2H
05D0h(E9000076): BNE 118 [0647H]
Texts.WriteString(W,i " loading ")j;k Texts.WriteString(W,l S.s)m;n F := Files.Old(S.s)o;p
05D1i .FIXUP D
05D1i(8D000009): LDR SB, MT, MOD0 [Boot]
05D2i(40D80070): ADD R0, SB, 70H [data]
05D3i .FIXUP D
05D3i(8D400002): LDR SB, MT, MOD4 [Texts]
05D4i(41D80005): ADD R1, SB, VAR5
05D5j .FIXUP D
05D5j(8D000002): LDR SB, MT, MOD0 [Boot]
05D6j(42D80144): ADD R2, SB, 144H [" loading "]
05D7j(4300000B): MOV R3, R0, BH
05D8k .FIXUP P
05D8k(F741D00E): BL MOD4 [Texts] PROC29
05D9l .FIXUP D
05D9l(8D000004): LDR SB, MT, MOD0 [Boot]
05DAl(40D80070): ADD R0, SB, 70H [data]
05DBl .FIXUP D
05DBl(8D400002): LDR SB, MT, MOD4 [Texts]
05DCl(41D80005): ADD R1, SB, VAR5
05DDm(42E80080): ADD R2, SP, 80H
05DEm(43000020): MOV R3, R0, 20H
05DFn .FIXUP P
05DFn(F741D007): BL MOD4 [Texts] PROC29
05E0o(40E80080): ADD R0, SP, 80H
05E1o(41000020): MOV R1, R0, 20H
05E2p .FIXUP P
05E2p(F7202003): BL MOD2 [Files] PROC2
05E3p(A0E00010): STR R0, SP, 10H
IF F # NIL THENq Texts.WriteString(W,r " onto boot area")s;t Texts.WriteInt(W,u Files.Length(Fv)w,x 7)y;z
05E4q(80E00010): LDR R0, SP, 10H
05E5q(E1000058): BEQ 88 [063EH]
05E6r .FIXUP D
05E6r(8D00000B): LDR SB, MT, MOD0 [Boot]
05E7r(40D80070): ADD R0, SB, 70H [data]
05E8r .FIXUP D
05E8r(8D400002): LDR SB, MT, MOD4 [Texts]
05E9r(41D80005): ADD R1, SB, VAR5
05EAs .FIXUP D
05EAs(8D000002): LDR SB, MT, MOD0 [Boot]
05EBs(42D80150): ADD R2, SB, 150H [" onto boot area"]
05ECs(43000010): MOV R3, R0, 10H
05EDt .FIXUP P
05EDt(F741D00B): BL MOD4 [Texts] PROC29
05EEu .FIXUP D
05EEu(8D000004): LDR SB, MT, MOD0 [Boot]
05EFu(40D80070): ADD R0, SB, 70H [data]
05F0u .FIXUP D
05F0u(8D400002): LDR SB, MT, MOD4 [Texts]
05F1u(41D80005): ADD R1, SB, VAR5
05F2v(4EE90008): SUB SP, SP, 8H
05F3v(A0E00004): STR R0, SP, 4H
05F4v(A1E00000): STR R1, SP, 0H
05F5w(80E00018): LDR R0, SP, 18H
05F6x .FIXUP P
05F6x(F7209009): BL MOD2 [Files] PROC9
05F7x(02000000): MOV R2, R0, R0
05F8x(81E00000): LDR R1, SP, 0H
05F9x(80E00004): LDR R0, SP, 4H
05FAx(4EE80008): ADD SP, SP, 8H
05FBy(43000007): MOV R3, R0, 7H
05FCz .FIXUP P
05FCz(F741E006): BL MOD4 [Texts] PROC30
secno := 2;a i := 0;b Files.Set(R,c F,d 0)e;f Files.ReadByte(R,g b)h;i
05FDa(40000002): MOV R0, R0, 2H
05FEa(A0E00008): STR R0, SP, 8H
05FFb(40000000): MOV R0, R0, 0H
0600b(A0E00004): STR R0, SP, 4H
0601c(40E80014): ADD R0, SP, 14H
0602c .FIXUP D
0602c(8D200012): LDR SB, MT, MOD2 [Files]
0603c(41D80001): ADD R1, SB, VAR1
0604d(82E00010): LDR R2, SP, 10H
0605e(43000000): MOV R3, R0, 0H
0606f .FIXUP P
0606f(F720B00A): BL MOD2 [Files] PROC11
0607g(40E80014): ADD R0, SP, 14H
0608g .FIXUP D
0608g(8D200006): LDR SB, MT, MOD2 [Files]
0609g(41D80001): ADD R1, SB, VAR1
060Ah(42E8000C): ADD R2, SP, CH
060Bi .FIXUP P
060Bi(F720E005): BL MOD2 [Files] PROC14
WHILE ~R.eof DOj buf[i]k := b;l INC(i);m
060Cj(90E00014): LDR R0, SP, 14H
060Dj(E900001B): BNE 27 [0629H]
060Ek(80E00004): LDR R0, SP, 4H
060Fk(41090400): SUB R1, R0, 400H
0610k(DA2BF81C): BLCC MT [trap=1, pos=11256]
0611k(00E80000): ADD R0, SP, R0
0612l(91E0000C): LDR R1, SP, CH
0613l(B10000A0): STR R1, R0, A0H
0614m(80E00004): LDR R0, SP, 4H
0615m(40080001): ADD R0, R0, 1H
0616m(A0E00004): STR R0, SP, 4H
IF i = Kernel.SectorLength THENn Kernel.PutSector(secno*29,o buf)p;q INC(secno);r i := 0 ENDs ;
0617n(80E00004): LDR R0, SP, 4H
0618n(40090400): SUB R0, R0, 400H
0619n(E9000009): BNE 9 [0623H]
061Ao(80E00008): LDR R0, SP, 8H
061Bo(400A001D): MUL R0, R0, 1DH
061Cp(41E800A0): ADD R1, SP, A0H
061Dq .FIXUP P
061Dq(F7110012): BL MOD1 [Kernel] PROC16
061Er(80E00008): LDR R0, SP, 8H
061Fr(40080001): ADD R0, R0, 1H
0620r(A0E00008): STR R0, SP, 8H
0621s(40000000): MOV R0, R0, 0H
0622s(A0E00004): STR R0, SP, 4H
Files.ReadByte(R,t b)u
0623t(40E80014): ADD R0, SP, 14H
0624t .FIXUP D
0624t(8D20001C): LDR SB, MT, MOD2 [Files]
0625t(41D80001): ADD R1, SB, VAR1
0626u(42E8000C): ADD R2, SP, CH
ENDv ;
0627v .FIXUP P
0627v(F720E00A): BL MOD2 [Files] PROC14
0628v(E7FFFFE3): B -29 [060CH]
IF i > 0 THENw
0629w(80E00004): LDR R0, SP, 4H
062Aw(40090000): SUB R0, R0, 0H
062Bw(E6000011): BLE 17 [063DH]
WHILE i < Kernel.SectorLength DOx buf[i]y := 0;z INC(i) ENDa ;
062Cx(80E00004): LDR R0, SP, 4H
062Dx(40090400): SUB R0, R0, 400H
062Ex(ED00000A): BGE 10 [0639H]
062Fy(80E00004): LDR R0, SP, 4H
0630y(41090400): SUB R1, R0, 400H
0631y(DA2CDF1C): BLCC MT [trap=1, pos=11487]
0632y(00E80000): ADD R0, SP, R0
0633z(41000000): MOV R1, R0, 0H
0634z(B10000A0): STR R1, R0, A0H
0635a(80E00004): LDR R0, SP, 4H
0636a(40080001): ADD R0, R0, 1H
0637a(A0E00004): STR R0, SP, 4H
0638a(E7FFFFF3): B -13 [062CH]
Kernel.PutSector(secno*29,b buf)c
0639b(80E00008): LDR R0, SP, 8H
063Ab(400A001D): MUL R0, R0, 1DH
063Bc(41E800A0): ADD R1, SP, A0H
ENDd
063Cd .FIXUP P
063Cd(F7110015): BL MOD1 [Kernel] PROC16
ELSE Textse.WriteString(W,f " not found")g
063De(E7000008): B 8 [0646H]
063Ef .FIXUP D
063Ef(8D00001A): LDR SB, MT, MOD0 [Boot]
063Ff(40D80070): ADD R0, SB, 70H [data]
0640f .FIXUP D
0640f(8D400002): LDR SB, MT, MOD4 [Texts]
0641f(41D80005): ADD R1, SB, VAR5
0642g .FIXUP D
0642g(8D000002): LDR SB, MT, MOD0 [Boot]
0643g(42D80160): ADD R2, SB, 160H [" not found"]
0644g(4300000B): MOV R3, R0, BH
ENDh
0645h .FIXUP P
0645h(F741D009): BL MOD4 [Texts] PROC29
ELSE Textsi.WriteString(W,j "Usage: Boot.Load M.bin")k
0646i(E7000008): B 8 [064FH]
0647j .FIXUP D
0647j(8D000005): LDR SB, MT, MOD0 [Boot]
0648j(40D80070): ADD R0, SB, 70H [data]
0649j .FIXUP D
0649j(8D400002): LDR SB, MT, MOD4 [Texts]
064Aj(41D80005): ADD R1, SB, VAR5
064Bk .FIXUP D
064Bk(8D000002): LDR SB, MT, MOD0 [Boot]
064Ck(42D8016C): ADD R2, SB, 16CH ["Usage: Boot.Load M.bin"]
064Dk(43000017): MOV R3, R0, 17H
ENDl ;
064El .FIXUP P
064El(F741D009): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)m;n Texts.Append(Oberon.Log,o W.buf)p
064Fm .FIXUP D
064Fm(8D000004): LDR SB, MT, MOD0 [Boot]
0650m(40D80070): ADD R0, SB, 70H [data]
0651m .FIXUP D
0651m(8D400002): LDR SB, MT, MOD4 [Texts]
0652m(41D80005): ADD R1, SB, VAR5
0653n .FIXUP P
0653n(F741C005): BL MOD4 [Texts] PROC28
0654o .FIXUP D
0654o(8D600003): LDR SB, MT, MOD6 [Oberon]
0655o(80D0000D): LDR R0, SB, VAR13
0656p .FIXUP D
0656p(8D000002): LDR SB, MT, MOD0 [Boot]
0657p(81D00070): LDR R1, SB, 70H [data]
ENDq Load;
0658q .FIXUP P
0658q(F740E005): BL MOD4 [Texts] PROC14
0659q(8FE00000): LDR LNK, SP, 0H
065Aq(4EE804A0): ADD SP, SP, 4A0H
065Bq(C700000F): B LNK
PROCEDURE ReadCode(VAR R: Files.Rider; VAR code: ARRAY OF LONGINT; VAR size, start, nofimps, res: INTEGER);
VAR n, data: INTEGER; ch: CHAR; b: BYTE; (*size in words, start in bytes*)
name: ARRAY 32 OF CHAR;
BEGINr Files.ReadString(R,s name)t;u Files.ReadInt(R,v data)w;x (*key*)
065Cr(4EE90050): SUB SP, SP, 50H
065Dr(AFE00000): STR LNK, SP, 0H
065Er(A0E00004): STR R0, SP, 4H
065Fr(A1E00008): STR R1, SP, 8H
0660r(A2E0000C): STR R2, SP, CH
0661r(A3E00010): STR R3, SP, 10H
0662r(A4E00014): STR R4, SP, 14H
0663r(A5E00018): STR R5, SP, 18H
0664r(A6E0001C): STR R6, SP, 1CH
0665r(A7E00020): STR R7, SP, 20H
0666s(80E00004): LDR R0, SP, 4H
0667s(81E00008): LDR R1, SP, 8H
0668t(42E80030): ADD R2, SP, 30H
0669t(43000020): MOV R3, R0, 20H
066Au .FIXUP P
066Au(F7214012): BL MOD2 [Files] PROC20
066Bv(80E00004): LDR R0, SP, 4H
066Cv(81E00008): LDR R1, SP, 8H
066Dw(42E80028): ADD R2, SP, 28H
066Ex .FIXUP P
066Ex(F7211004): BL MOD2 [Files] PROC17
Files.ReadByte(R,y b)z;a (*version*) Files.ReadInt(R,b data)c;d (*size*)
066Fy(80E00004): LDR R0, SP, 4H
0670y(81E00008): LDR R1, SP, 8H
0671z(42E8002D): ADD R2, SP, 2DH
0672a .FIXUP P
0672a(F720E004): BL MOD2 [Files] PROC14
0673b(80E00004): LDR R0, SP, 4H
0674b(81E00008): LDR R1, SP, 8H
0675c(42E80028): ADD R2, SP, 28H
0676d .FIXUP P
0676d(F7211004): BL MOD2 [Files] PROC17
Files.ReadString(R,e name)f;g (*imports*) nofimps := 0;h
0677e(80E00004): LDR R0, SP, 4H
0678e(81E00008): LDR R1, SP, 8H
0679f(42E80030): ADD R2, SP, 30H
067Af(43000020): MOV R3, R0, 20H
067Bg .FIXUP P
067Bg(F7214005): BL MOD2 [Files] PROC20
067Ch(40000000): MOV R0, R0, 0H
067Dh(81E0001C): LDR R1, SP, 1CH
067Eh(A0100000): STR R0, R1, 0H
WHILE name[0] # 0X DOi INC(nofimps);j Files.ReadInt(R,k data)l;m (*key*) Files.ReadString(R,n name)o ENDp ;
067Fi(90E00030): LDR R0, SP, 30H
0680i(E100000E): BEQ 14 [068FH]
0681j(80E0001C): LDR R0, SP, 1CH
0682j(81000000): LDR R1, R0, 0H
0683j(41180001): ADD R1, R1, 1H
0684j(A1000000): STR R1, R0, 0H
0685k(80E00004): LDR R0, SP, 4H
0686k(81E00008): LDR R1, SP, 8H
0687l(42E80028): ADD R2, SP, 28H
0688m .FIXUP P
0688m(F721100D): BL MOD2 [Files] PROC17
0689n(80E00004): LDR R0, SP, 4H
068An(81E00008): LDR R1, SP, 8H
068Bo(42E80030): ADD R2, SP, 30H
068Co(43000020): MOV R3, R0, 20H
068Dp .FIXUP P
068Dp(F7214005): BL MOD2 [Files] PROC20
068Ep(E7FFFFF0): B -16 [067FH]
Files.ReadInt(R,q n)r;s
068Fq(80E00004): LDR R0, SP, 4H
0690q(81E00008): LDR R1, SP, 8H
0691r(42E80024): ADD R2, SP, 24H
0692s .FIXUP P
0692s(F7211005): BL MOD2 [Files] PROC17
WHILE n > 0 DOt Files.ReadInt(R,u data)v;w DEC(n, 4) ENDx ; (*type descriptors*)
0693t(80E00024): LDR R0, SP, 24H
0694t(40090000): SUB R0, R0, 0H
0695t(E6000008): BLE 8 [069EH]
0696u(80E00004): LDR R0, SP, 4H
0697u(81E00008): LDR R1, SP, 8H
0698v(42E80028): ADD R2, SP, 28H
0699w .FIXUP P
0699w(F7211007): BL MOD2 [Files] PROC17
069Ax(80E00024): LDR R0, SP, 24H
069Bx(40090004): SUB R0, R0, 4H
069Cx(A0E00024): STR R0, SP, 24H
069Dx(E7FFFFF5): B -11 [0693H]
Files.ReadInt(R,y n)z;a (*variable space*)
069Ey(80E00004): LDR R0, SP, 4H
069Fy(81E00008): LDR R1, SP, 8H
06A0z(42E80024): ADD R2, SP, 24H
06A1a .FIXUP P
06A1a(F7211008): BL MOD2 [Files] PROC17
Files.ReadInt(R,b n)c;d
06A2b(80E00004): LDR R0, SP, 4H
06A3b(81E00008): LDR R1, SP, 8H
06A4c(42E80024): ADD R2, SP, 24H
06A5d .FIXUP P
06A5d(F7211004): BL MOD2 [Files] PROC17
WHILE n > 0 DOe Files.Read(R,f ch)g;h DEC(n) ENDi ; (*strings*)
06A6e(80E00024): LDR R0, SP, 24H
06A7e(40090000): SUB R0, R0, 0H
06A8e(E6000008): BLE 8 [06B1H]
06A9f(80E00004): LDR R0, SP, 4H
06AAf(81E00008): LDR R1, SP, 8H
06ABg(42E8002C): ADD R2, SP, 2CH
06ACh .FIXUP P
06ACh(F7210007): BL MOD2 [Files] PROC16
06ADi(80E00024): LDR R0, SP, 24H
06AEi(40090001): SUB R0, R0, 1H
06AFi(A0E00024): STR R0, SP, 24H
06B0i(E7FFFFF5): B -11 [06A6H]
Files.ReadInt(R,j size)k;l
06B1j(80E00004): LDR R0, SP, 4H
06B2j(81E00008): LDR R1, SP, 8H
06B3k(82E00014): LDR R2, SP, 14H
06B4l .FIXUP P
06B4l(F7211008): BL MOD2 [Files] PROC17
IF size > LEN(code) THENm (*program too long*) res := 2
06B5m(80E00010): LDR R0, SP, 10H
06B6m(81E00014): LDR R1, SP, 14H
06B7m(81100000): LDR R1, R1, 0H
06B8m(01190000): SUB R1, R1, R0
06B9m(E6000004): BLE 4 [06BEH]
ELSEn no := 0;p
06BAn(40000002): MOV R0, R0, 2H
06BBn(81E00020): LDR R1, SP, 20H
06BCn(A0100000): STR R0, R1, 0H
06BDo(E7000062): B 98 [0720H]
06BEp(40000000): MOV R0, R0, 0H
06BFp(A0E00024): STR R0, SP, 24H
WHILE n < size DOq Files.ReadInt(R,r data)s;t code[n]u := data;v INC(n) ENDw ; (*code*)
06C0q(80E00024): LDR R0, SP, 24H
06C1q(81E00014): LDR R1, SP, 14H
06C2q(81100000): LDR R1, R1, 0H
06C3q(00090001): SUB R0, R0, R1
06C4q(ED000011): BGE 17 [06D6H]
06C5r(80E00004): LDR R0, SP, 4H
06C6r(81E00008): LDR R1, SP, 8H
06C7s(42E80028): ADD R2, SP, 28H
06C8t .FIXUP P
06C8t(F7211014): BL MOD2 [Files] PROC17
06C9u(80E00024): LDR R0, SP, 24H
06CAu(81E00010): LDR R1, SP, 10H
06CBu(01090001): SUB R1, R0, R1
06CCu(DA31861C): BLCC MT [trap=1, pos=12678]
06CDu(40010002): LSL R0, R0, 2H
06CEu(81E0000C): LDR R1, SP, CH
06CFu(00180000): ADD R0, R1, R0
06D0v(81E00028): LDR R1, SP, 28H
06D1v(A1000000): STR R1, R0, 0H
06D2w(80E00024): LDR R0, SP, 24H
06D3w(40080001): ADD R0, R0, 1H
06D4w(A0E00024): STR R0, SP, 24H
06D5w(E7FFFFEA): B -22 [06C0H]
Files.ReadString(R,x name)y;z
06D6x(80E00004): LDR R0, SP, 4H
06D7x(81E00008): LDR R1, SP, 8H
06D8y(42E80030): ADD R2, SP, 30H
06D9y(43000020): MOV R3, R0, 20H
06DAz .FIXUP P
06DAz(F7214012): BL MOD2 [Files] PROC20
WHILE name[0] # 0X DOa Files.ReadInt(R,b data)c;d Files.ReadString(R,e name)f ENDg ; (*commands*)
06DBa(90E00030): LDR R0, SP, 30H
06DCa(E100000A): BEQ 10 [06E7H]
06DDb(80E00004): LDR R0, SP, 4H
06DEb(81E00008): LDR R1, SP, 8H
06DFc(42E80028): ADD R2, SP, 28H
06E0d .FIXUP P
06E0d(F7211006): BL MOD2 [Files] PROC17
06E1e(80E00004): LDR R0, SP, 4H
06E2e(81E00008): LDR R1, SP, 8H
06E3f(42E80030): ADD R2, SP, 30H
06E4f(43000020): MOV R3, R0, 20H
06E5g .FIXUP P
06E5g(F7214005): BL MOD2 [Files] PROC20
06E6g(E7FFFFF4): B -12 [06DBH]
Files.ReadInt(R,h n)i;j
06E7h(80E00004): LDR R0, SP, 4H
06E8h(81E00008): LDR R1, SP, 8H
06E9i(42E80024): ADD R2, SP, 24H
06EAj .FIXUP P
06EAj(F7211005): BL MOD2 [Files] PROC17
WHILE n > 0 DOk Files.ReadInt(R,l data)m;n DEC(n) ENDo ; (*entries*)
06EBk(80E00024): LDR R0, SP, 24H
06ECk(40090000): SUB R0, R0, 0H
06EDk(E6000008): BLE 8 [06F6H]
06EEl(80E00004): LDR R0, SP, 4H
06EFl(81E00008): LDR R1, SP, 8H
06F0m(42E80028): ADD R2, SP, 28H
06F1n .FIXUP P
06F1n(F7211007): BL MOD2 [Files] PROC17
06F2o(80E00024): LDR R0, SP, 24H
06F3o(40090001): SUB R0, R0, 1H
06F4o(A0E00024): STR R0, SP, 24H
06F5o(E7FFFFF5): B -11 [06EBH]
Files.ReadInt(R,p data)q;r
06F6p(80E00004): LDR R0, SP, 4H
06F7p(81E00008): LDR R1, SP, 8H
06F8q(42E80028): ADD R2, SP, 28H
06F9r .FIXUP P
06F9r(F7211008): BL MOD2 [Files] PROC17
WHILE data >= 0 DOs Files.ReadInt(R,t data)u ENDv ; (*pointer references*)
06FAs(80E00028): LDR R0, SP, 28H
06FBs(40090000): SUB R0, R0, 0H
06FCs(E5000005): BLT 5 [0702H]
06FDt(80E00004): LDR R0, SP, 4H
06FEt(81E00008): LDR R1, SP, 8H
06FFu(42E80028): ADD R2, SP, 28H
0700v .FIXUP P
0700v(F7211007): BL MOD2 [Files] PROC17
0701v(E7FFFFF8): B -8 [06FAH]
Files.ReadInt(R,w data)x;y (*fixorgP*) Files.ReadInt(R,z data)a;b (*fixorgD*)
0702w(80E00004): LDR R0, SP, 4H
0703w(81E00008): LDR R1, SP, 8H
0704x(42E80028): ADD R2, SP, 28H
0705y .FIXUP P
0705y(F7211005): BL MOD2 [Files] PROC17
0706z(80E00004): LDR R0, SP, 4H
0707z(81E00008): LDR R1, SP, 8H
0708a(42E80028): ADD R2, SP, 28H
0709b .FIXUP P
0709b(F7211004): BL MOD2 [Files] PROC17
Files.ReadInt(R,c data)d;e (*fixorgT*) Files.ReadInt(R,f start)g;h (*entry*)
070Ac(80E00004): LDR R0, SP, 4H
070Bc(81E00008): LDR R1, SP, 8H
070Cd(42E80028): ADD R2, SP, 28H
070De .FIXUP P
070De(F7211004): BL MOD2 [Files] PROC17
070Ef(80E00004): LDR R0, SP, 4H
070Ff(81E00008): LDR R1, SP, 8H
0710g(82E00018): LDR R2, SP, 18H
0711h .FIXUP P
0711h(F7211004): BL MOD2 [Files] PROC17
Files.Read(R,i ch)j;k
0712i(80E00004): LDR R0, SP, 4H
0713i(81E00008): LDR R1, SP, 8H
0714j(42E8002C): ADD R2, SP, 2CH
0715k .FIXUP P
0715k(F7210004): BL MOD2 [Files] PROC16
IF ch # "O" THENl (*corrupted file*) res := 1 ELSEm resn := 0 ENDo
0716l(90E0002C): LDR R0, SP, 2CH
0717l(4009004F): SUB R0, R0, 4FH
0718l(E1000004): BEQ 4 [071DH]
0719m(40000001): MOV R0, R0, 1H
071Am(81E00020): LDR R1, SP, 20H
071Bm(A0100000): STR R0, R1, 0H
071Cn(E7000003): B 3 [0720H]
071Do(40000000): MOV R0, R0, 0H
071Eo(81E00020): LDR R1, SP, 20H
071Fo(A0100000): STR R0, R1, 0H
END
ENDp ReadCode;
0720p(8FE00000): LDR LNK, SP, 0H
0721p(4EE80050): ADD SP, SP, 50H
0722p(C700000F): B LNK
PROCEDURE WriteHex(VAR R: Files.Rider; x: LONGINT); (*write a 4 byte LONGINT in 8 digit hex format*)
VAR i: INTEGER; y: LONGINT;
a: ARRAY 10 OF CHAR;
BEGINq i := 0;r
0723q(4EE90024): SUB SP, SP, 24H
0724q(AFE00000): STR LNK, SP, 0H
0725q(A0E00004): STR R0, SP, 4H
0726q(A1E00008): STR R1, SP, 8H
0727q(A2E0000C): STR R2, SP, CH
0728r(40000000): MOV R0, R0, 0H
0729r(A0E00010): STR R0, SP, 10H
REPEAT y := x MOD 10H;s
072As(80E0000C): LDR R0, SP, CH
072Bs(4004000F): AND R0, R0, FH
072Cs(A0E00014): STR R0, SP, 14H
IF y < 10 THENt a[i]u := CHR(y + 30H)v ELSEw ax[i]y := CHR(y + 37H)z ENDa ;
072Dt(80E00014): LDR R0, SP, 14H
072Et(4009000A): SUB R0, R0, AH
072Ft(ED000008): BGE 8 [0738H]
0730u(80E00010): LDR R0, SP, 10H
0731u(4109000A): SUB R1, R0, AH
0732u(DA34EC1C): BLCC MT [trap=1, pos=13548]
0733u(00E80000): ADD R0, SP, R0
0734v(81E00014): LDR R1, SP, 14H
0735v(41180030): ADD R1, R1, 30H
0736w(B1000018): STR R1, R0, 18H
0737x(E7000007): B 7 [073FH]
0738y(80E00010): LDR R0, SP, 10H
0739y(4109000A): SUB R1, R0, AH
073Ay(DA35061C): BLCC MT [trap=1, pos=13574]
073By(00E80000): ADD R0, SP, R0
073Cz(81E00014): LDR R1, SP, 14H
073Dz(41180037): ADD R1, R1, 37H
073Ea(B1000018): STR R1, R0, 18H
x := x DIV 10H;b INC(i)
073Fb(80E0000C): LDR R0, SP, CH
0740b(40020004): ASR R0, R0, 4H
0741b(A0E0000C): STR R0, SP, CH
UNTILc i = 8;d
0742c(80E00010): LDR R0, SP, 10H
0743c(40080001): ADD R0, R0, 1H
0744c(A0E00010): STR R0, SP, 10H
0745d(80E00010): LDR R0, SP, 10H
0746d(40090008): SUB R0, R0, 8H
0747d(E9FFFFE2): BNE -30 [072AH]
REPEAT DEC(i);e Files.Write(R,f a[i]g)h UNTILi i = 0
0748e(80E00010): LDR R0, SP, 10H
0749e(40090001): SUB R0, R0, 1H
074Ae(A0E00010): STR R0, SP, 10H
074Bf(80E00004): LDR R0, SP, 4H
074Cf(81E00008): LDR R1, SP, 8H
074Dg(82E00010): LDR R2, SP, 10H
074Eg(4329000A): SUB R3, R2, AH
074Fg(DA35711C): BLCC MT [trap=1, pos=13681]
0750g(02E80002): ADD R2, SP, R2
0751h(92200018): LDR R2, R2, 18H
0752i .FIXUP P
0752i(F721803D): BL MOD2 [Files] PROC24
ENDj WriteHex;
0753j(80E00010): LDR R0, SP, 10H
0754j(E9FFFFF3): BNE -13 [0748H]
0755j(8FE00000): LDR LNK, SP, 0H
0756j(4EE80024): ADD SP, SP, 24H
0757j(C700000F): B LNK
PROCEDURE WriteFile*; (*write code section of M.rsc in PROM format with specified size to output file*)
VAR if, of: Files.File; ir, or: Files.Rider;
code: ARRAY maxCode OF LONGINT;
i, len, size, start, nofimps, res: INTEGER;
name: ARRAY 32 OF CHAR;
S: Texts.Scanner;
BEGINk Texts.OpenScanner(S,l Oberon.Par.text,m Oberon.Par.pos)n;o Texts.Scan(S)p;q res := -1;r
0758k .PROC 7
0758k .COMMAND WriteFile
0758k(4EE97DE8): SUB SP, SP, 7DE8H
0759k(AFE00000): STR LNK, SP, 0H
075Al(40E87D74): ADD R0, SP, 7D74H
075Bl .FIXUP D
075Bl(8D400105): LDR SB, MT, MOD4 [Texts]
075Cl(41D80003): ADD R1, SB, VAR3
075Dm .FIXUP D
075Dm(8D600002): LDR SB, MT, MOD6 [Oberon]
075Em(42D8000E): ADD R2, SB, VAR14
075Fm(82200008): LDR R2, R2, 8H
0760n .FIXUP D
0760n(8D600003): LDR SB, MT, MOD6 [Oberon]
0761n(43D8000E): ADD R3, SB, VAR14
0762n(8330000C): LDR R3, R3, CH
0763o .FIXUP P
0763o(F7415011): BL MOD4 [Texts] PROC21
0764p(40E87D74): ADD R0, SP, 7D74H
0765p .FIXUP D
0765p(8D400005): LDR SB, MT, MOD4 [Texts]
0766p(41D80003): ADD R1, SB, VAR3
0767q .FIXUP P
0767q(F7416004): BL MOD4 [Texts] PROC22
0768r(5000FFFF): MOV R0, R0, FFFFFFFFH
0769r(A0E07D50): STR R0, SP, 7D50H
IF (S.class = Texts.Name)s OR (tS.class = Texts.String)u THENv name := S.s;w Texts.Scan(S)x;y
076As(80E07DB0): LDR R0, SP, 7DB0H
076Bs(40090001): SUB R0, R0, 1H
076Ct(E1000003): BEQ 3 [0770H]
076Du(80E07DB0): LDR R0, SP, 7DB0H
076Eu(40090002): SUB R0, R0, 2H
076Fv(E90000DF): BNE 223 [084FH]
0770w(40E87D54): ADD R0, SP, 7D54H
0771w(41E87DC8): ADD R1, SP, 7DC8H
0772w(42000008): MOV R2, R0, 8H
0773w(83100000): LDR R3, R1, 0H
0774w(41180004): ADD R1, R1, 4H
0775w(A3000000): STR R3, R0, 0H
0776w(40080004): ADD R0, R0, 4H
0777w(42290001): SUB R2, R2, 1H
0778w(E9FFFFFA): BNE -6 [0773H]
0779x(40E87D74): ADD R0, SP, 7D74H
077Ax .FIXUP D
077Ax(8D400015): LDR SB, MT, MOD4 [Texts]
077Bx(41D80003): ADD R1, SB, VAR3
077Cy .FIXUP P
077Cy(F7416015): BL MOD4 [Texts] PROC22
IF S.class = Texts.Int THENz len := S.i;a Texts.Scan(S)b;c
077Dz(80E07DB0): LDR R0, SP, 7DB0H
077Ez(40090003): SUB R0, R0, 3H
077Fz(E90000CF): BNE 207 [084FH]
0780a(80E07DB4): LDR R0, SP, 7DB4H
0781a(A0E07D40): STR R0, SP, 7D40H
0782b(40E87D74): ADD R0, SP, 7D74H
0783b .FIXUP D
0783b(8D400009): LDR SB, MT, MOD4 [Texts]
0784b(41D80003): ADD R1, SB, VAR3
0785c .FIXUP P
0785c(F7416009): BL MOD4 [Texts] PROC22
IF (S.class = Texts.Name)d OR (eS.class = Texts.String)f THENg res := 0;h Texts.WriteString(W,i " WriteFile ")j;k
0786d(80E07DB0): LDR R0, SP, 7DB0H
0787d(40090001): SUB R0, R0, 1H
0788e(E1000003): BEQ 3 [078CH]
0789f(80E07DB0): LDR R0, SP, 7DB0H
078Af(40090002): SUB R0, R0, 2H
078Bg(E90000C3): BNE 195 [084FH]
078Ch(40000000): MOV R0, R0, 0H
078Dh(A0E07D50): STR R0, SP, 7D50H
078Ei .FIXUP D
078Ei(8D00000B): LDR SB, MT, MOD0 [Boot]
078Fi(40D80070): ADD R0, SB, 70H [data]
0790i .FIXUP D
0790i(8D400002): LDR SB, MT, MOD4 [Texts]
0791i(41D80005): ADD R1, SB, VAR5
0792j .FIXUP D
0792j(8D000002): LDR SB, MT, MOD0 [Boot]
0793j(42D80184): ADD R2, SB, 184H [" WriteFile "]
0794j(4300000D): MOV R3, R0, DH
0795k .FIXUP P
0795k(F741D010): BL MOD4 [Texts] PROC29
Texts.WriteString(W,l name)m;n Texts.WriteInt(W,o len,p 5)q;r Texts.Write(W,s " ")t;u Texts.WriteString(W,v S.s)w;x
0796l .FIXUP D
0796l(8D000004): LDR SB, MT, MOD0 [Boot]
0797l(40D80070): ADD R0, SB, 70H [data]
0798l .FIXUP D
0798l(8D400002): LDR SB, MT, MOD4 [Texts]
0799l(41D80005): ADD R1, SB, VAR5
079Am(42E87D54): ADD R2, SP, 7D54H
079Bm(43000020): MOV R3, R0, 20H
079Cn .FIXUP P
079Cn(F741D007): BL MOD4 [Texts] PROC29
079Do .FIXUP D
079Do(8D000005): LDR SB, MT, MOD0 [Boot]
079Eo(40D80070): ADD R0, SB, 70H [data]
079Fo .FIXUP D
079Fo(8D400002): LDR SB, MT, MOD4 [Texts]
07A0o(41D80005): ADD R1, SB, VAR5
07A1p(82E07D40): LDR R2, SP, 7D40H
07A2q(43000005): MOV R3, R0, 5H
07A3r .FIXUP P
07A3r(F741E007): BL MOD4 [Texts] PROC30
07A4s .FIXUP D
07A4s(8D000005): LDR SB, MT, MOD0 [Boot]
07A5s(40D80070): ADD R0, SB, 70H [data]
07A6s .FIXUP D
07A6s(8D400002): LDR SB, MT, MOD4 [Texts]
07A7s(41D80005): ADD R1, SB, VAR5
07A8t(42000020): MOV R2, R0, 20H
07A9u .FIXUP P
07A9u(F741B006): BL MOD4 [Texts] PROC27
07AAv .FIXUP D
07AAv(8D000004): LDR SB, MT, MOD0 [Boot]
07ABv(40D80070): ADD R0, SB, 70H [data]
07ACv .FIXUP D
07ACv(8D400002): LDR SB, MT, MOD4 [Texts]
07ADv(41D80005): ADD R1, SB, VAR5
07AEw(42E87DC8): ADD R2, SP, 7DC8H
07AFw(43000020): MOV R3, R0, 20H
07B0x .FIXUP P
07B0x(F741D007): BL MOD4 [Texts] PROC29
IF len > 0 THENy if := Files.Old(name)z;a
07B1y(80E07D40): LDR R0, SP, 7D40H
07B2y(40090000): SUB R0, R0, 0H
07B3y(E6000093): BLE 147 [0847H]
07B4z(40E87D54): ADD R0, SP, 7D54H
07B5z(41000020): MOV R1, R0, 20H
07B6a .FIXUP P
07B6a(F7202006): BL MOD2 [Files] PROC2
07B7a(A0E00004): STR R0, SP, 4H
IF if # NIL THENb of := Files.New(S.s)c;d
07B8b(80E00004): LDR R0, SP, 4H
07B9b(E1000084): BEQ 132 [083EH]
07BAc(40E87DC8): ADD R0, SP, 7DC8H
07BBc(41000020): MOV R1, R0, 20H
07BCd .FIXUP P
07BCd(F7203006): BL MOD2 [Files] PROC3
07BDd(A0E00008): STR R0, SP, 8H
IF of # NIL THENe Files.Set(ir,f if,g 0)h;i ReadCode(ir,j code,k size,l start,m nofimps,n res)o;p
07BEe(80E00008): LDR R0, SP, 8H
07BFe(E100007D): BEQ 125 [083DH]
07C0f(40E8000C): ADD R0, SP, CH
07C1f .FIXUP D
07C1f(8D200015): LDR SB, MT, MOD2 [Files]
07C2f(41D80001): ADD R1, SB, VAR1
07C3g(82E00004): LDR R2, SP, 4H
07C4h(43000000): MOV R3, R0, 0H
07C5i .FIXUP P
07C5i(F720B009): BL MOD2 [Files] PROC11
07C6j(40E8000C): ADD R0, SP, CH
07C7j .FIXUP D
07C7j(8D200006): LDR SB, MT, MOD2 [Files]
07C8j(41D80001): ADD R1, SB, VAR1
07C9k(42E8003C): ADD R2, SP, 3CH
07CAk(43001F40): MOV R3, R0, 1F40H
07CBl(44E87D44): ADD R4, SP, 7D44H
07CCm(45E87D48): ADD R5, SP, 7D48H
07CDn(46E87D4C): ADD R6, SP, 7D4CH
07CEo(47E87D50): ADD R7, SP, 7D50H
07CFp(F7FFFE8C): BL -372 [065CH]
IF res = 0 THENq
07D0q(80E07D50): LDR R0, SP, 7D50H
07D1q(E9000054): BNE 84 [0826H]
IF nofimps = 0 THENr
07D2r(80E07D4C): LDR R0, SP, 7D4CH
07D3r(E9000049): BNE 73 [081DH]
IF size <= len THENs Files.Set(or,t of,u 0)v;w i := 0;x
07D4s(80E07D44): LDR R0, SP, 7D44H
07D5s(81E07D40): LDR R1, SP, 7D40H
07D6s(00090001): SUB R0, R0, R1
07D7s(EE00003C): BGT 60 [0814H]
07D8t(40E80024): ADD R0, SP, 24H
07D9t .FIXUP D
07D9t(8D200012): LDR SB, MT, MOD2 [Files]
07DAt(41D80001): ADD R1, SB, VAR1
07DBu(82E00008): LDR R2, SP, 8H
07DCv(43000000): MOV R3, R0, 0H
07DDw .FIXUP P
07DDw(F720B018): BL MOD2 [Files] PROC11
07DEx(40000000): MOV R0, R0, 0H
07DFx(A0E07D3C): STR R0, SP, 7D3CH
WHILE i < size DOy WriteHex(or,z code[i]a)b;c Files.Write(or,d CR)e;f INC(i) ENDg ;
07E0y(80E07D3C): LDR R0, SP, 7D3CH
07E1y(81E07D44): LDR R1, SP, 7D44H
07E2y(00090001): SUB R0, R0, R1
07E3y(ED000013): BGE 19 [07F7H]
07E4z(40E80024): ADD R0, SP, 24H
07E5z .FIXUP D
07E5z(8D20000C): LDR SB, MT, MOD2 [Files]
07E6z(41D80001): ADD R1, SB, VAR1
07E7a(82E07D3C): LDR R2, SP, 7D3CH
07E8a(43291F40): SUB R3, R2, 1F40H
07E9a(DA3A1E1C): BLCC MT [trap=1, pos=14878]
07EAa(42210002): LSL R2, R2, 2H
07EBa(02E80002): ADD R2, SP, R2
07ECb(8220003C): LDR R2, R2, 3CH
07EDc(F7FFFF35): BL -203 [0723H]
07EEd(40E80024): ADD R0, SP, 24H
07EFd .FIXUP D
07EFd(8D20000A): LDR SB, MT, MOD2 [Files]
07F0d(41D80001): ADD R1, SB, VAR1
07F1e(4200000D): MOV R2, R0, DH
07F2f .FIXUP P
07F2f(F7218015): BL MOD2 [Files] PROC24
07F3g(80E07D3C): LDR R0, SP, 7D3CH
07F4g(40080001): ADD R0, R0, 1H
07F5g(A0E07D3C): STR R0, SP, 7D3CH
07F6g(E7FFFFE9): B -23 [07E0H]
WHILE i < len DOh WriteHex(or,i 0)j;k Files.Write(or,l CR)m;n INC(i) ENDo ;
07F7h(80E07D3C): LDR R0, SP, 7D3CH
07F8h(81E07D40): LDR R1, SP, 7D40H
07F9h(00090001): SUB R0, R0, R1
07FAh(ED00000E): BGE 14 [0809H]
07FBi(40E80024): ADD R0, SP, 24H
07FCi .FIXUP D
07FCi(8D20000D): LDR SB, MT, MOD2 [Files]
07FDi(41D80001): ADD R1, SB, VAR1
07FEj(42000000): MOV R2, R0, 0H
07FFk(F7FFFF23): BL -221 [0723H]
0800l(40E80024): ADD R0, SP, 24H
0801l .FIXUP D
0801l(8D200005): LDR SB, MT, MOD2 [Files]
0802l(41D80001): ADD R1, SB, VAR1
0803m(4200000D): MOV R2, R0, DH
0804n .FIXUP P
0804n(F7218012): BL MOD2 [Files] PROC24
0805o(80E07D3C): LDR R0, SP, 7D3CH
0806o(40080001): ADD R0, R0, 1H
0807o(A0E07D3C): STR R0, SP, 7D3CH
0808o(E7FFFFEE): B -18 [07F7H]
Files.Register(of)p;q Texts.WriteString(W,r " done")s
0809p(80E00008): LDR R0, SP, 8H
080Aq .FIXUP P
080Aq(F7204006): BL MOD2 [Files] PROC4
080Br .FIXUP D
080Br(8D00000A): LDR SB, MT, MOD0 [Boot]
080Cr(40D80070): ADD R0, SB, 70H [data]
080Dr .FIXUP D
080Dr(8D400002): LDR SB, MT, MOD4 [Texts]
080Er(41D80005): ADD R1, SB, VAR5
080Fs .FIXUP D
080Fs(8D000002): LDR SB, MT, MOD0 [Boot]
0810s(42D80194): ADD R2, SB, 194H [" done"]
0811s(43000007): MOV R3, R0, 7H
ELSEt Textsu.WriteString(W,v " insufficent size")w
0812t .FIXUP P
0812t(F741D008): BL MOD4 [Texts] PROC29
0813u(E7000008): B 8 [081CH]
0814v .FIXUP D
0814v(8D000005): LDR SB, MT, MOD0 [Boot]
0815v(40D80070): ADD R0, SB, 70H [data]
0816v .FIXUP D
0816v(8D400002): LDR SB, MT, MOD4 [Texts]
0817v(41D80005): ADD R1, SB, VAR5
0818w .FIXUP D
0818w(8D000002): LDR SB, MT, MOD0 [Boot]
0819w(42D8019C): ADD R2, SB, 19CH [" insufficent size"]
081Aw(43000013): MOV R3, R0, 13H
ENDx
081Bx .FIXUP P
081Bx(F741D009): BL MOD4 [Texts] PROC29
ELSE Textsy.WriteString(W,z " imports not allowed")a
081Cy(E7000008): B 8 [0825H]
081Dz .FIXUP D
081Dz(8D000005): LDR SB, MT, MOD0 [Boot]
081Ez(40D80070): ADD R0, SB, 70H [data]
081Fz .FIXUP D
081Fz(8D400002): LDR SB, MT, MOD4 [Texts]
0820z(41D80005): ADD R1, SB, VAR5
0821a .FIXUP D
0821a(8D000002): LDR SB, MT, MOD0 [Boot]
0822a(42D801B0): ADD R2, SB, 1B0H [" imports not allowed"]
0823a(43000015): MOV R3, R0, 15H
ENDb
0824b .FIXUP P
0824b(F741D009): BL MOD4 [Texts] PROC29
ELSIF resc = 1 THENd Texts.WriteString(W,e " input file format error")f
0825c(E7000017): B 23 [083DH]
0826d(80E07D50): LDR R0, SP, 7D50H
0827d(40090001): SUB R0, R0, 1H
0828d(E9000009): BNE 9 [0832H]
0829e .FIXUP D
0829e(8D000008): LDR SB, MT, MOD0 [Boot]
082Ae(40D80070): ADD R0, SB, 70H [data]
082Be .FIXUP D
082Be(8D400002): LDR SB, MT, MOD4 [Texts]
082Ce(41D80005): ADD R1, SB, VAR5
082Df .FIXUP D
082Df(8D000002): LDR SB, MT, MOD0 [Boot]
082Ef(42D801C8): ADD R2, SB, 1C8H [" input file format error"]
082Ff(4300001A): MOV R3, R0, 1AH
ELSIFg resh = 2 THENi Texts.WriteString(W,j " program too long")k
0830g .FIXUP P
0830g(F741D00C): BL MOD4 [Texts] PROC29
0831h(E700000B): B 11 [083DH]
0832i(80E07D50): LDR R0, SP, 7D50H
0833i(40090002): SUB R0, R0, 2H
0834i(E9000008): BNE 8 [083DH]
0835j .FIXUP D
0835j(8D000008): LDR SB, MT, MOD0 [Boot]
0836j(40D80070): ADD R0, SB, 70H [data]
0837j .FIXUP D
0837j(8D400002): LDR SB, MT, MOD4 [Texts]
0838j(41D80005): ADD R1, SB, VAR5
0839k .FIXUP D
0839k(8D000002): LDR SB, MT, MOD0 [Boot]
083Ak(42D801E4): ADD R2, SB, 1E4H [" program too long"]
083Bk(43000013): MOV R3, R0, 13H
ENDl
083Cl .FIXUP P
083Cl(F741D00C): BL MOD4 [Texts] PROC29
END
ELSE Textsm.WriteString(W,n " input file not found")o
083Dm(E7000008): B 8 [0846H]
083En .FIXUP D
083En(8D000005): LDR SB, MT, MOD0 [Boot]
083Fn(40D80070): ADD R0, SB, 70H [data]
0840n .FIXUP D
0840n(8D400002): LDR SB, MT, MOD4 [Texts]
0841n(41D80005): ADD R1, SB, VAR5
0842o .FIXUP D
0842o(8D000002): LDR SB, MT, MOD0 [Boot]
0843o(42D801F8): ADD R2, SB, 1F8H [" input file not found"]
0844o(43000017): MOV R3, R0, 17H
ENDp
0845p .FIXUP P
0845p(F741D009): BL MOD4 [Texts] PROC29
ELSE Textsq.WriteString(W,r " size must be positive")s
0846q(E7000008): B 8 [084FH]
0847r .FIXUP D
0847r(8D000005): LDR SB, MT, MOD0 [Boot]
0848r(40D80070): ADD R0, SB, 70H [data]
0849r .FIXUP D
0849r(8D400002): LDR SB, MT, MOD4 [Texts]
084Ar(41D80005): ADD R1, SB, VAR5
084Bs .FIXUP D
084Bs(8D000002): LDR SB, MT, MOD0 [Boot]
084Cs(42D80210): ADD R2, SB, 210H [" size must be positive"]
084Ds(43000018): MOV R3, R0, 18H
ENDt
084Et .FIXUP P
084Et(F741D009): BL MOD4 [Texts] PROC29
END
END
END ;
IF res = -1 THENu Texts.WriteString(W,v "Usage: Boot.WriteFile M.rsc outputsize outputfile")w ENDx ;
084Fu(80E07D50): LDR R0, SP, 7D50H
0850u(5009FFFF): SUB R0, R0, FFFFFFFFH
0851u(E9000008): BNE 8 [085AH]
0852v .FIXUP D
0852v(8D000007): LDR SB, MT, MOD0 [Boot]
0853v(40D80070): ADD R0, SB, 70H [data]
0854v .FIXUP D
0854v(8D400002): LDR SB, MT, MOD4 [Texts]
0855v(41D80005): ADD R1, SB, VAR5
0856w .FIXUP D
0856w(8D000002): LDR SB, MT, MOD0 [Boot]
0857w(42D80228): ADD R2, SB, 228H ["Usage: Boot.WriteFile M.rsc outputsize outputfile"]
0858w(43000032): MOV R3, R0, 32H
0859x .FIXUP P
0859x(F741D00B): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)y;z Texts.Append(Oberon.Log,a W.buf)b
085Ay .FIXUP D
085Ay(8D000004): LDR SB, MT, MOD0 [Boot]
085By(40D80070): ADD R0, SB, 70H [data]
085Cy .FIXUP D
085Cy(8D400002): LDR SB, MT, MOD4 [Texts]
085Dy(41D80005): ADD R1, SB, VAR5
085Ez .FIXUP P
085Ez(F741C005): BL MOD4 [Texts] PROC28
085Fa .FIXUP D
085Fa(8D600003): LDR SB, MT, MOD6 [Oberon]
0860a(80D0000D): LDR R0, SB, VAR13
0861b .FIXUP D
0861b(8D000002): LDR SB, MT, MOD0 [Boot]
0862b(81D00070): LDR R1, SB, 70H [data]
ENDc WriteFile;
0863c .FIXUP P
0863c(F740E005): BL MOD4 [Texts] PROC14
0864c(8FE00000): LDR LNK, SP, 0H
0865c(4EE87DE8): ADD SP, SP, 7DE8H
0866c(C700000F): B LNK
PROCEDURE WriteCode*; (*write code section of M.rsc in binary format with prefix (size, adr) to output file*)
VAR if, of: Files.File; ir, or: Files.Rider;
code: ARRAY maxCode OF LONGINT;
i, size, start, nofimps, res: INTEGER;
name: ARRAY 32 OF CHAR;
S: Texts.Scanner;
BEGINd Texts.OpenScanner(S,e Oberon.Par.text,f Oberon.Par.pos)g;h Texts.Scan(S)i;j res := -1;k
0867d .PROC 8
0867d .COMMAND WriteCode
0867d(4EE97DE4): SUB SP, SP, 7DE4H
0868d(AFE00000): STR LNK, SP, 0H
0869e(40E87D70): ADD R0, SP, 7D70H
086Ae .FIXUP D
086Ae(8D400009): LDR SB, MT, MOD4 [Texts]
086Be(41D80003): ADD R1, SB, VAR3
086Cf .FIXUP D
086Cf(8D600002): LDR SB, MT, MOD6 [Oberon]
086Df(42D8000E): ADD R2, SB, VAR14
086Ef(82200008): LDR R2, R2, 8H
086Fg .FIXUP D
086Fg(8D600003): LDR SB, MT, MOD6 [Oberon]
0870g(43D8000E): ADD R3, SB, VAR14
0871g(8330000C): LDR R3, R3, CH
0872h .FIXUP P
0872h(F741500F): BL MOD4 [Texts] PROC21
0873i(40E87D70): ADD R0, SP, 7D70H
0874i .FIXUP D
0874i(8D400005): LDR SB, MT, MOD4 [Texts]
0875i(41D80003): ADD R1, SB, VAR3
0876j .FIXUP P
0876j(F7416004): BL MOD4 [Texts] PROC22
0877k(5000FFFF): MOV R0, R0, FFFFFFFFH
0878k(A0E07D4C): STR R0, SP, 7D4CH
IF (S.class = Texts.Name)l OR (mS.class = Texts.String)n THENo name := S.s;p Texts.Scan(S)q;r
0879l(80E07DAC): LDR R0, SP, 7DACH
087Al(40090001): SUB R0, R0, 1H
087Bm(E1000003): BEQ 3 [087FH]
087Cn(80E07DAC): LDR R0, SP, 7DACH
087Dn(40090002): SUB R0, R0, 2H
087Eo(E90000B9): BNE 185 [0938H]
087Fp(40E87D50): ADD R0, SP, 7D50H
0880p(41E87DC4): ADD R1, SP, 7DC4H
0881p(42000008): MOV R2, R0, 8H
0882p(83100000): LDR R3, R1, 0H
0883p(41180004): ADD R1, R1, 4H
0884p(A3000000): STR R3, R0, 0H
0885p(40080004): ADD R0, R0, 4H
0886p(42290001): SUB R2, R2, 1H
0887p(E9FFFFFA): BNE -6 [0882H]
0888q(40E87D70): ADD R0, SP, 7D70H
0889q .FIXUP D
0889q(8D400015): LDR SB, MT, MOD4 [Texts]
088Aq(41D80003): ADD R1, SB, VAR3
088Br .FIXUP P
088Br(F7416015): BL MOD4 [Texts] PROC22
IF (S.class = Texts.Name)s OR (tS.class = Texts.String)u THENv res := 0;w Texts.WriteString(W,x " WriteCode ")y;z
088Cs(80E07DAC): LDR R0, SP, 7DACH
088Ds(40090001): SUB R0, R0, 1H
088Et(E1000003): BEQ 3 [0892H]
088Fu(80E07DAC): LDR R0, SP, 7DACH
0890u(40090002): SUB R0, R0, 2H
0891v(E90000A6): BNE 166 [0938H]
0892w(40000000): MOV R0, R0, 0H
0893w(A0E07D4C): STR R0, SP, 7D4CH
0894x .FIXUP D
0894x(8D00000B): LDR SB, MT, MOD0 [Boot]
0895x(40D80070): ADD R0, SB, 70H [data]
0896x .FIXUP D
0896x(8D400002): LDR SB, MT, MOD4 [Texts]
0897x(41D80005): ADD R1, SB, VAR5
0898y .FIXUP D
0898y(8D000002): LDR SB, MT, MOD0 [Boot]
0899y(42D8025C): ADD R2, SB, 25CH [" WriteCode "]
089Ay(4300000D): MOV R3, R0, DH
089Bz .FIXUP P
089Bz(F741D010): BL MOD4 [Texts] PROC29
Texts.WriteString(W,a name)b;c Texts.Write(W,d " ")e;f Texts.WriteString(W,g S.s)h;i
089Ca .FIXUP D
089Ca(8D000004): LDR SB, MT, MOD0 [Boot]
089Da(40D80070): ADD R0, SB, 70H [data]
089Ea .FIXUP D
089Ea(8D400002): LDR SB, MT, MOD4 [Texts]
089Fa(41D80005): ADD R1, SB, VAR5
08A0b(42E87D50): ADD R2, SP, 7D50H
08A1b(43000020): MOV R3, R0, 20H
08A2c .FIXUP P
08A2c(F741D007): BL MOD4 [Texts] PROC29
08A3d .FIXUP D
08A3d(8D000005): LDR SB, MT, MOD0 [Boot]
08A4d(40D80070): ADD R0, SB, 70H [data]
08A5d .FIXUP D
08A5d(8D400002): LDR SB, MT, MOD4 [Texts]
08A6d(41D80005): ADD R1, SB, VAR5
08A7e(42000020): MOV R2, R0, 20H
08A8f .FIXUP P
08A8f(F741B006): BL MOD4 [Texts] PROC27
08A9g .FIXUP D
08A9g(8D000004): LDR SB, MT, MOD0 [Boot]
08AAg(40D80070): ADD R0, SB, 70H [data]
08ABg .FIXUP D
08ABg(8D400002): LDR SB, MT, MOD4 [Texts]
08ACg(41D80005): ADD R1, SB, VAR5
08ADh(42E87DC4): ADD R2, SP, 7DC4H
08AEh(43000020): MOV R3, R0, 20H
08AFi .FIXUP P
08AFi(F741D007): BL MOD4 [Texts] PROC29
if := Files.Old(name)j;k
08B0j(40E87D50): ADD R0, SP, 7D50H
08B1j(41000020): MOV R1, R0, 20H
08B2k .FIXUP P
08B2k(F7202003): BL MOD2 [Files] PROC2
08B3k(A0E00004): STR R0, SP, 4H
IF if # NIL THENl of := Files.New(S.s)m;n
08B4l(80E00004): LDR R0, SP, 4H
08B5l(E100007A): BEQ 122 [0930H]
08B6m(40E87DC4): ADD R0, SP, 7DC4H
08B7m(41000020): MOV R1, R0, 20H
08B8n .FIXUP P
08B8n(F7203006): BL MOD2 [Files] PROC3
08B9n(A0E00008): STR R0, SP, 8H
IF of # NIL THENo Files.Set(ir,p if,q 0)r;s ReadCode(ir,t code,u size,v start,w nofimps,x res)y;z
08BAo(80E00008): LDR R0, SP, 8H
08BBo(E1000073): BEQ 115 [092FH]
08BCp(40E8000C): ADD R0, SP, CH
08BDp .FIXUP D
08BDp(8D200012): LDR SB, MT, MOD2 [Files]
08BEp(41D80001): ADD R1, SB, VAR1
08BFq(82E00004): LDR R2, SP, 4H
08C0r(43000000): MOV R3, R0, 0H
08C1s .FIXUP P
08C1s(F720B009): BL MOD2 [Files] PROC11
08C2t(40E8000C): ADD R0, SP, CH
08C3t .FIXUP D
08C3t(8D200006): LDR SB, MT, MOD2 [Files]
08C4t(41D80001): ADD R1, SB, VAR1
08C5u(42E8003C): ADD R2, SP, 3CH
08C6u(43001F40): MOV R3, R0, 1F40H
08C7v(44E87D40): ADD R4, SP, 7D40H
08C8w(45E87D44): ADD R5, SP, 7D44H
08C9x(46E87D48): ADD R6, SP, 7D48H
08CAy(47E87D4C): ADD R7, SP, 7D4CH
08CBz(F7FFFD90): BL -624 [065CH]
IF res = 0 THENa
08CCa(80E07D4C): LDR R0, SP, 7D4CH
08CDa(E900004A): BNE 74 [0918H]
IF nofimps = 0 THENb Files.Set(or,c of,d 0)e;f i := 0;g
08CEb(80E07D48): LDR R0, SP, 7D48H
08CFb(E900003F): BNE 63 [090FH]
08D0c(40E80024): ADD R0, SP, 24H
08D1c .FIXUP D
08D1c(8D20000E): LDR SB, MT, MOD2 [Files]
08D2c(41D80001): ADD R1, SB, VAR1
08D3d(82E00008): LDR R2, SP, 8H
08D4e(43000000): MOV R3, R0, 0H
08D5f .FIXUP P
08D5f(F720B014): BL MOD2 [Files] PROC11
08D6g(40000000): MOV R0, R0, 0H
08D7g(A0E07D3C): STR R0, SP, 7D3CH
Texts.WriteInt(W,h size*4,i 6)j;k Texts.WriteInt(W,l start,m 6)n;o
08D8h .FIXUP D
08D8h(8D000007): LDR SB, MT, MOD0 [Boot]
08D9h(40D80070): ADD R0, SB, 70H [data]
08DAh .FIXUP D
08DAh(8D400002): LDR SB, MT, MOD4 [Texts]
08DBh(41D80005): ADD R1, SB, VAR5
08DCi(82E07D40): LDR R2, SP, 7D40H
08DDi(42210002): LSL R2, R2, 2H
08DEj(43000006): MOV R3, R0, 6H
08DFk .FIXUP P
08DFk(F741E00A): BL MOD4 [Texts] PROC30
08E0l .FIXUP D
08E0l(8D000006): LDR SB, MT, MOD0 [Boot]
08E1l(40D80070): ADD R0, SB, 70H [data]
08E2l .FIXUP D
08E2l(8D400002): LDR SB, MT, MOD4 [Texts]
08E3l(41D80005): ADD R1, SB, VAR5
08E4m(82E07D44): LDR R2, SP, 7D44H
08E5n(43000006): MOV R3, R0, 6H
08E6o .FIXUP P
08E6o(F741E007): BL MOD4 [Texts] PROC30
Files.WriteInt(or,p size*4)q;r Files.WriteInt(or,s start)t;u (*prefix*)
08E7p(40E80024): ADD R0, SP, 24H
08E8p .FIXUP D
08E8p(8D200006): LDR SB, MT, MOD2 [Files]
08E9p(41D80001): ADD R1, SB, VAR1
08EAq(82E07D40): LDR R2, SP, 7D40H
08EBq(42210002): LSL R2, R2, 2H
08ECr .FIXUP P
08ECr(F7219006): BL MOD2 [Files] PROC25
08EDs(40E80024): ADD R0, SP, 24H
08EEs .FIXUP D
08EEs(8D200006): LDR SB, MT, MOD2 [Files]
08EFs(41D80001): ADD R1, SB, VAR1
08F0t(82E07D44): LDR R2, SP, 7D44H
08F1u .FIXUP P
08F1u(F7219005): BL MOD2 [Files] PROC25
WHILE i < size DOv Files.WriteInt(or,w code[i]x)y;z INC(i) ENDa ;
08F2v(80E07D3C): LDR R0, SP, 7D3CH
08F3v(81E07D40): LDR R1, SP, 7D40H
08F4v(00090001): SUB R0, R0, R1
08F5v(ED00000E): BGE 14 [0904H]
08F6w(40E80024): ADD R0, SP, 24H
08F7w .FIXUP D
08F7w(8D200009): LDR SB, MT, MOD2 [Files]
08F8w(41D80001): ADD R1, SB, VAR1
08F9x(82E07D3C): LDR R2, SP, 7D3CH
08FAx(43291F40): SUB R3, R2, 1F40H
08FBx(DA42561C): BLCC MT [trap=1, pos=16982]
08FCx(42210002): LSL R2, R2, 2H
08FDx(02E80002): ADD R2, SP, R2
08FEy(8220003C): LDR R2, R2, 3CH
08FFz .FIXUP P
08FFz(F721900E): BL MOD2 [Files] PROC25
0900a(80E07D3C): LDR R0, SP, 7D3CH
0901a(40080001): ADD R0, R0, 1H
0902a(A0E07D3C): STR R0, SP, 7D3CH
0903a(E7FFFFEE): B -18 [08F2H]
Files.Register(of)b;c Texts.WriteString(W,d " done")e
0904b(80E00008): LDR R0, SP, 8H
0905c .FIXUP P
0905c(F7204006): BL MOD2 [Files] PROC4
0906d .FIXUP D
0906d(8D00000F): LDR SB, MT, MOD0 [Boot]
0907d(40D80070): ADD R0, SB, 70H [data]
0908d .FIXUP D
0908d(8D400002): LDR SB, MT, MOD4 [Texts]
0909d(41D80005): ADD R1, SB, VAR5
090Ae .FIXUP D
090Ae(8D000002): LDR SB, MT, MOD0 [Boot]
090Be(42D8026C): ADD R2, SB, 26CH [" done"]
090Ce(43000007): MOV R3, R0, 7H
ELSEf Textsg.WriteString(W,h " imports not allowed")i
090Df .FIXUP P
090Df(F741D008): BL MOD4 [Texts] PROC29
090Eg(E7000008): B 8 [0917H]
090Fh .FIXUP D
090Fh(8D000005): LDR SB, MT, MOD0 [Boot]
0910h(40D80070): ADD R0, SB, 70H [data]
0911h .FIXUP D
0911h(8D400002): LDR SB, MT, MOD4 [Texts]
0912h(41D80005): ADD R1, SB, VAR5
0913i .FIXUP D
0913i(8D000002): LDR SB, MT, MOD0 [Boot]
0914i(42D80274): ADD R2, SB, 274H [" imports not allowed"]
0915i(43000016): MOV R3, R0, 16H
ENDj
0916j .FIXUP P
0916j(F741D009): BL MOD4 [Texts] PROC29
ELSIF resk = 1 THENl Texts.WriteString(W,m " input file format error")n
0917k(E7000017): B 23 [092FH]
0918l(80E07D4C): LDR R0, SP, 7D4CH
0919l(40090001): SUB R0, R0, 1H
091Al(E9000009): BNE 9 [0924H]
091Bm .FIXUP D
091Bm(8D000008): LDR SB, MT, MOD0 [Boot]
091Cm(40D80070): ADD R0, SB, 70H [data]
091Dm .FIXUP D
091Dm(8D400002): LDR SB, MT, MOD4 [Texts]
091Em(41D80005): ADD R1, SB, VAR5
091Fn .FIXUP D
091Fn(8D000002): LDR SB, MT, MOD0 [Boot]
0920n(42D8028C): ADD R2, SB, 28CH [" input file format error"]
0921n(4300001A): MOV R3, R0, 1AH
ELSIFo resp = 2 THENq Texts.WriteString(W,r " program too long")s
0922o .FIXUP P
0922o(F741D00C): BL MOD4 [Texts] PROC29
0923p(E700000B): B 11 [092FH]
0924q(80E07D4C): LDR R0, SP, 7D4CH
0925q(40090002): SUB R0, R0, 2H
0926q(E9000008): BNE 8 [092FH]
0927r .FIXUP D
0927r(8D000008): LDR SB, MT, MOD0 [Boot]
0928r(40D80070): ADD R0, SB, 70H [data]
0929r .FIXUP D
0929r(8D400002): LDR SB, MT, MOD4 [Texts]
092Ar(41D80005): ADD R1, SB, VAR5
092Bs .FIXUP D
092Bs(8D000002): LDR SB, MT, MOD0 [Boot]
092Cs(42D802A8): ADD R2, SB, 2A8H [" program too long"]
092Ds(43000013): MOV R3, R0, 13H
ENDt
092Et .FIXUP P
092Et(F741D00C): BL MOD4 [Texts] PROC29
END
ELSE Textsu.WriteString(W,v " input file not found")w
092Fu(E7000008): B 8 [0938H]
0930v .FIXUP D
0930v(8D000005): LDR SB, MT, MOD0 [Boot]
0931v(40D80070): ADD R0, SB, 70H [data]
0932v .FIXUP D
0932v(8D400002): LDR SB, MT, MOD4 [Texts]
0933v(41D80005): ADD R1, SB, VAR5
0934w .FIXUP D
0934w(8D000002): LDR SB, MT, MOD0 [Boot]
0935w(42D802BC): ADD R2, SB, 2BCH [" input file not found"]
0936w(43000017): MOV R3, R0, 17H
ENDx
0937x .FIXUP P
0937x(F741D009): BL MOD4 [Texts] PROC29
END
END ;
IF res = -1 THENy Texts.WriteString(W,z "Usage: Boot.WriteCode M.rsc M.code")a ENDb ;
0938y(80E07D4C): LDR R0, SP, 7D4CH
0939y(5009FFFF): SUB R0, R0, FFFFFFFFH
093Ay(E9000008): BNE 8 [0943H]
093Bz .FIXUP D
093Bz(8D000007): LDR SB, MT, MOD0 [Boot]
093Cz(40D80070): ADD R0, SB, 70H [data]
093Dz .FIXUP D
093Dz(8D400002): LDR SB, MT, MOD4 [Texts]
093Ez(41D80005): ADD R1, SB, VAR5
093Fa .FIXUP D
093Fa(8D000002): LDR SB, MT, MOD0 [Boot]
0940a(42D802D4): ADD R2, SB, 2D4H ["Usage: Boot.WriteCode M.rsc M.code"]
0941a(43000023): MOV R3, R0, 23H
0942b .FIXUP P
0942b(F741D00B): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)c;d Texts.Append(Oberon.Log,e W.buf)f
0943c .FIXUP D
0943c(8D000004): LDR SB, MT, MOD0 [Boot]
0944c(40D80070): ADD R0, SB, 70H [data]
0945c .FIXUP D
0945c(8D400002): LDR SB, MT, MOD4 [Texts]
0946c(41D80005): ADD R1, SB, VAR5
0947d .FIXUP P
0947d(F741C005): BL MOD4 [Texts] PROC28
0948e .FIXUP D
0948e(8D600003): LDR SB, MT, MOD6 [Oberon]
0949e(80D0000D): LDR R0, SB, VAR13
094Af .FIXUP D
094Af(8D000002): LDR SB, MT, MOD0 [Boot]
094Bf(81D00070): LDR R1, SB, 70H [data]
ENDg WriteCode;
094Cg .FIXUP P
094Cg(F740E005): BL MOD4 [Texts] PROC14
094Dg(8FE00000): LDR LNK, SP, 0H
094Eg(4EE87DE4): ADD SP, SP, 7DE4H
094Fg(C700000F): B LNK
PROCEDURE MakeStream(VAR ir, or: Files.Rider; blksize, destadr: INTEGER);
VAR i, a: INTEGER; b: BYTE;
BEGINh Files.ReadByte(ir,i b)j;k i := 0;l a := destadr;m
0950h(4EE90028): SUB SP, SP, 28H
0951h(AFE00000): STR LNK, SP, 0H
0952h(A0E00004): STR R0, SP, 4H
0953h(A1E00008): STR R1, SP, 8H
0954h(A2E0000C): STR R2, SP, CH
0955h(A3E00010): STR R3, SP, 10H
0956h(A4E00014): STR R4, SP, 14H
0957h(A5E00018): STR R5, SP, 18H
0958i(80E00004): LDR R0, SP, 4H
0959i(81E00008): LDR R1, SP, 8H
095Aj(42E80024): ADD R2, SP, 24H
095Bk .FIXUP P
095Bk(F720E00F): BL MOD2 [Files] PROC14
095Cl(40000000): MOV R0, R0, 0H
095Dl(A0E0001C): STR R0, SP, 1CH
095Em(80E00018): LDR R0, SP, 18H
095Fm(A0E00020): STR R0, SP, 20H
WHILE ~ir.eof DOn
0960n(80E00004): LDR R0, SP, 4H
0961n(90000000): LDR R0, R0, 0H
0962n(E9000021): BNE 33 [0984H]
IF i MOD blksize =o 0 THENp i := 0;q
0963o(80E00014): LDR R0, SP, 14H
0964o(D6457D6C): BLLE MT [trap=6, pos=17789]
0965o(81E0001C): LDR R1, SP, 1CH
0966o(001B0000): DIV R0, R1, R0
0967o(20000000): MOV' R0, R0, R0
0968p(40090000): SUB R0, R0, 0H
0969p(E900000E): BNE 14 [0978H]
096Aq(40000000): MOV R0, R0, 0H
096Bq(A0E0001C): STR R0, SP, 1CH
Files.WriteInt(or,r blksize)s;t Files.WriteInt(or,u a)v;w INC(a, blksize)
096Cr(80E0000C): LDR R0, SP, CH
096Dr(81E00010): LDR R1, SP, 10H
096Es(82E00014): LDR R2, SP, 14H
096Ft .FIXUP P
096Ft(F7219014): BL MOD2 [Files] PROC25
0970u(80E0000C): LDR R0, SP, CH
0971u(81E00010): LDR R1, SP, 10H
0972v(82E00020): LDR R2, SP, 20H
0973w .FIXUP P
0973w(F7219004): BL MOD2 [Files] PROC25
ENDx ;
0974x(80E00020): LDR R0, SP, 20H
0975x(81E00014): LDR R1, SP, 14H
0976x(00080001): ADD R0, R0, R1
0977x(A0E00020): STR R0, SP, 20H
Files.WriteByte(or,y b)z;a INC(i);b Files.ReadByte(ir,c b)d
0978y(80E0000C): LDR R0, SP, CH
0979y(81E00010): LDR R1, SP, 10H
097Az(92E00024): LDR R2, SP, 24H
097Ba .FIXUP P
097Ba(F7216008): BL MOD2 [Files] PROC22
097Cb(80E0001C): LDR R0, SP, 1CH
097Db(40080001): ADD R0, R0, 1H
097Eb(A0E0001C): STR R0, SP, 1CH
097Fc(80E00004): LDR R0, SP, 4H
0980c(81E00008): LDR R1, SP, 8H
0981d(42E80024): ADD R2, SP, 24H
ENDe ;
0982e .FIXUP P
0982e(F720E007): BL MOD2 [Files] PROC14
0983e(E7FFFFDC): B -36 [0960H]
WHILE i < blksize DOf Files.WriteByte(or,g 0)h;i INC(i) ENDj ;
0984f(80E0001C): LDR R0, SP, 1CH
0985f(81E00014): LDR R1, SP, 14H
0986f(00090001): SUB R0, R0, R1
0987f(ED000008): BGE 8 [0990H]
0988g(80E0000C): LDR R0, SP, CH
0989g(81E00010): LDR R1, SP, 10H
098Ah(42000000): MOV R2, R0, 0H
098Bi .FIXUP P
098Bi(F7216009): BL MOD2 [Files] PROC22
098Cj(80E0001C): LDR R0, SP, 1CH
098Dj(40080001): ADD R0, R0, 1H
098Ej(A0E0001C): STR R0, SP, 1CH
098Fj(E7FFFFF4): B -12 [0984H]
Files.WriteInt(or,k 0)l (*size of last block*)
0990k(80E0000C): LDR R0, SP, CH
0991k(81E00010): LDR R1, SP, 10H
0992l(42000000): MOV R2, R0, 0H
ENDm MakeStream;
0993m .FIXUP P
0993m(F7219008): BL MOD2 [Files] PROC25
0994m(8FE00000): LDR LNK, SP, 0H
0995m(4EE80028): ADD SP, SP, 28H
0996m(C700000F): B LNK
PROCEDURE WriteStream*; (*convert boot file to stream format with specified block size and dest adr*)
VAR if, of: Files.File; ir, or: Files.Rider;
len, blksize, res: INTEGER;
name, name1: ARRAY 32 OF CHAR;
S: Texts.Scanner;
BEGINn Texts.OpenScanner(S,o Oberon.Par.text,p Oberon.Par.pos)q;r Texts.Scan(S)s;t res := -1;u
0997n .PROC 9
0997n .COMMAND WriteStream
0997n(4EE900FC): SUB SP, SP, FCH
0998n(AFE00000): STR LNK, SP, 0H
0999o(40E80088): ADD R0, SP, 88H
099Ao .FIXUP D
099Ao(8D400050): LDR SB, MT, MOD4 [Texts]
099Bo(41D80003): ADD R1, SB, VAR3
099Cp .FIXUP D
099Cp(8D600002): LDR SB, MT, MOD6 [Oberon]
099Dp(42D8000E): ADD R2, SB, VAR14
099Ep(82200008): LDR R2, R2, 8H
099Fq .FIXUP D
099Fq(8D600003): LDR SB, MT, MOD6 [Oberon]
09A0q(43D8000E): ADD R3, SB, VAR14
09A1q(8330000C): LDR R3, R3, CH
09A2r .FIXUP P
09A2r(F741500F): BL MOD4 [Texts] PROC21
09A3s(40E80088): ADD R0, SP, 88H
09A4s .FIXUP D
09A4s(8D400005): LDR SB, MT, MOD4 [Texts]
09A5s(41D80003): ADD R1, SB, VAR3
09A6t .FIXUP P
09A6t(F7416004): BL MOD4 [Texts] PROC22
09A7u(5000FFFF): MOV R0, R0, FFFFFFFFH
09A8u(A0E00044): STR R0, SP, 44H
IF (S.class = Texts.Name)v OR (wS.class = Texts.String)x THENy name := S.s;z Texts.Scan(S)a;b
09A9v(80E000C4): LDR R0, SP, C4H
09AAv(40090001): SUB R0, R0, 1H
09ABw(E1000003): BEQ 3 [09AFH]
09ACx(80E000C4): LDR R0, SP, C4H
09ADx(40090002): SUB R0, R0, 2H
09AEy(E90000B7): BNE 183 [0A66H]
09AFz(40E80048): ADD R0, SP, 48H
09B0z(41E800DC): ADD R1, SP, DCH
09B1z(42000008): MOV R2, R0, 8H
09B2z(83100000): LDR R3, R1, 0H
09B3z(41180004): ADD R1, R1, 4H
09B4z(A3000000): STR R3, R0, 0H
09B5z(40080004): ADD R0, R0, 4H
09B6z(42290001): SUB R2, R2, 1H
09B7z(E9FFFFFA): BNE -6 [09B2H]
09B8a(40E80088): ADD R0, SP, 88H
09B9a .FIXUP D
09B9a(8D400015): LDR SB, MT, MOD4 [Texts]
09BAa(41D80003): ADD R1, SB, VAR3
09BBb .FIXUP P
09BBb(F7416015): BL MOD4 [Texts] PROC22
IF (S.class = Texts.Name)c OR (dS.class = Texts.String)e THENf name1 := S.s;g Texts.Scan(S)h;i
09BCc(80E000C4): LDR R0, SP, C4H
09BDc(40090001): SUB R0, R0, 1H
09BEd(E1000003): BEQ 3 [09C2H]
09BFe(80E000C4): LDR R0, SP, C4H
09C0e(40090002): SUB R0, R0, 2H
09C1f(E90000A4): BNE 164 [0A66H]
09C2g(40E80068): ADD R0, SP, 68H
09C3g(41E800DC): ADD R1, SP, DCH
09C4g(42000008): MOV R2, R0, 8H
09C5g(83100000): LDR R3, R1, 0H
09C6g(41180004): ADD R1, R1, 4H
09C7g(A3000000): STR R3, R0, 0H
09C8g(40080004): ADD R0, R0, 4H
09C9g(42290001): SUB R2, R2, 1H
09CAg(E9FFFFFA): BNE -6 [09C5H]
09CBh(40E80088): ADD R0, SP, 88H
09CCh .FIXUP D
09CCh(8D400013): LDR SB, MT, MOD4 [Texts]
09CDh(41D80003): ADD R1, SB, VAR3
09CEi .FIXUP P
09CEi(F7416013): BL MOD4 [Texts] PROC22
IF S.class = Texts.Int THENj blksize := S.i;k Texts.Scan(S)l;m
09CFj(80E000C4): LDR R0, SP, C4H
09D0j(40090003): SUB R0, R0, 3H
09D1j(E9000094): BNE 148 [0A66H]
09D2k(80E000C8): LDR R0, SP, C8H
09D3k(A0E00040): STR R0, SP, 40H
09D4l(40E80088): ADD R0, SP, 88H
09D5l .FIXUP D
09D5l(8D400009): LDR SB, MT, MOD4 [Texts]
09D6l(41D80003): ADD R1, SB, VAR3
09D7m .FIXUP P
09D7m(F7416009): BL MOD4 [Texts] PROC22
IF S.class = Texts.Int THENn res := 0;o Texts.WriteString(W,p " WriteStream ")q;r
09D8n(80E000C4): LDR R0, SP, C4H
09D9n(40090003): SUB R0, R0, 3H
09DAn(E900008B): BNE 139 [0A66H]
09DBo(40000000): MOV R0, R0, 0H
09DCo(A0E00044): STR R0, SP, 44H
09DDp .FIXUP D
09DDp(8D000008): LDR SB, MT, MOD0 [Boot]
09DEp(40D80070): ADD R0, SB, 70H [data]
09DFp .FIXUP D
09DFp(8D400002): LDR SB, MT, MOD4 [Texts]
09E0p(41D80005): ADD R1, SB, VAR5
09E1q .FIXUP D
09E1q(8D000002): LDR SB, MT, MOD0 [Boot]
09E2q(42D802F8): ADD R2, SB, 2F8H [" WriteStream "]
09E3q(4300000F): MOV R3, R0, FH
09E4r .FIXUP P
09E4r(F741D00D): BL MOD4 [Texts] PROC29
Texts.WriteString(W,s name)t;u Texts.Write(W,v " ")w;x Texts.WriteString(W,y name1)z;a
09E5s .FIXUP D
09E5s(8D000004): LDR SB, MT, MOD0 [Boot]
09E6s(40D80070): ADD R0, SB, 70H [data]
09E7s .FIXUP D
09E7s(8D400002): LDR SB, MT, MOD4 [Texts]
09E8s(41D80005): ADD R1, SB, VAR5
09E9t(42E80048): ADD R2, SP, 48H
09EAt(43000020): MOV R3, R0, 20H
09EBu .FIXUP P
09EBu(F741D007): BL MOD4 [Texts] PROC29
09ECv .FIXUP D
09ECv(8D000005): LDR SB, MT, MOD0 [Boot]
09EDv(40D80070): ADD R0, SB, 70H [data]
09EEv .FIXUP D
09EEv(8D400002): LDR SB, MT, MOD4 [Texts]
09EFv(41D80005): ADD R1, SB, VAR5
09F0w(42000020): MOV R2, R0, 20H
09F1x .FIXUP P
09F1x(F741B006): BL MOD4 [Texts] PROC27
09F2y .FIXUP D
09F2y(8D000004): LDR SB, MT, MOD0 [Boot]
09F3y(40D80070): ADD R0, SB, 70H [data]
09F4y .FIXUP D
09F4y(8D400002): LDR SB, MT, MOD4 [Texts]
09F5y(41D80005): ADD R1, SB, VAR5
09F6z(42E80068): ADD R2, SP, 68H
09F7z(43000020): MOV R3, R0, 20H
09F8a .FIXUP P
09F8a(F741D007): BL MOD4 [Texts] PROC29
Texts.WriteInt(W,b blksize,c 5)d;e Texts.WriteInt(W,f S.i,g 5)h;i
09F9b .FIXUP D
09F9b(8D000005): LDR SB, MT, MOD0 [Boot]
09FAb(40D80070): ADD R0, SB, 70H [data]
09FBb .FIXUP D
09FBb(8D400002): LDR SB, MT, MOD4 [Texts]
09FCb(41D80005): ADD R1, SB, VAR5
09FDc(82E00040): LDR R2, SP, 40H
09FEd(43000005): MOV R3, R0, 5H
09FFe .FIXUP P
09FFe(F741E007): BL MOD4 [Texts] PROC30
0A00f .FIXUP D
0A00f(8D000005): LDR SB, MT, MOD0 [Boot]
0A01f(40D80070): ADD R0, SB, 70H [data]
0A02f .FIXUP D
0A02f(8D400002): LDR SB, MT, MOD4 [Texts]
0A03f(41D80005): ADD R1, SB, VAR5
0A04g(82E000C8): LDR R2, SP, C8H
0A05h(43000005): MOV R3, R0, 5H
0A06i .FIXUP P
0A06i(F741E007): BL MOD4 [Texts] PROC30
IF blksize >= 0 THENj
0A07j(80E00040): LDR R0, SP, 40H
0A08j(40090000): SUB R0, R0, 0H
0A09j(E5000054): BLT 84 [0A5EH]
IF S.i >= 0 THENk if := Files.Old(name)l;m
0A0Ak(80E000C8): LDR R0, SP, C8H
0A0Bk(40090000): SUB R0, R0, 0H
0A0Ck(E5000048): BLT 72 [0A55H]
0A0Dl(40E80048): ADD R0, SP, 48H
0A0El(41000020): MOV R1, R0, 20H
0A0Fm .FIXUP P
0A0Fm(F7202009): BL MOD2 [Files] PROC2
0A10m(A0E00004): STR R0, SP, 4H
IF if # NIL THENn len := Files.Length(if)o;p
0A11n(80E00004): LDR R0, SP, 4H
0A12n(E1000039): BEQ 57 [0A4CH]
0A13o(80E00004): LDR R0, SP, 4H
0A14p .FIXUP P
0A14p(F7209005): BL MOD2 [Files] PROC9
0A15p(A0E0003C): STR R0, SP, 3CH
IF len > 0 THENq of := Files.New(name1)r;s
0A16q(80E0003C): LDR R0, SP, 3CH
0A17q(40090000): SUB R0, R0, 0H
0A18q(E600002A): BLE 42 [0A43H]
0A19r(40E80068): ADD R0, SP, 68H
0A1Ar(41000020): MOV R1, R0, 20H
0A1Bs .FIXUP P
0A1Bs(F7203007): BL MOD2 [Files] PROC3
0A1Cs(A0E00008): STR R0, SP, 8H
IF of # NIL THENt
0A1Dt(80E00008): LDR R0, SP, 8H
0A1Et(E1000023): BEQ 35 [0A42H]
IF blksize = 0 THENu blksize := len ENDv ;
0A1Fu(80E00040): LDR R0, SP, 40H
0A20u(E9000002): BNE 2 [0A23H]
0A21v(80E0003C): LDR R0, SP, 3CH
0A22v(A0E00040): STR R0, SP, 40H
Files.Set(ir,w if,x 0)y;z Files.Set(or,a of,b 0)c;d MakeStream(ir,e or,f blksize,g S.i)h;i
0A23w(40E8000C): ADD R0, SP, CH
0A24w .FIXUP D
0A24w(8D200022): LDR SB, MT, MOD2 [Files]
0A25w(41D80001): ADD R1, SB, VAR1
0A26x(82E00004): LDR R2, SP, 4H
0A27y(43000000): MOV R3, R0, 0H
0A28z .FIXUP P
0A28z(F720B00D): BL MOD2 [Files] PROC11
0A29a(40E80024): ADD R0, SP, 24H
0A2Aa .FIXUP D
0A2Aa(8D200006): LDR SB, MT, MOD2 [Files]
0A2Ba(41D80001): ADD R1, SB, VAR1
0A2Cb(82E00008): LDR R2, SP, 8H
0A2Dc(43000000): MOV R3, R0, 0H
0A2Ed .FIXUP P
0A2Ed(F720B006): BL MOD2 [Files] PROC11
0A2Fe(40E8000C): ADD R0, SP, CH
0A30e .FIXUP D
0A30e(8D200006): LDR SB, MT, MOD2 [Files]
0A31e(41D80001): ADD R1, SB, VAR1
0A32f(42E80024): ADD R2, SP, 24H
0A33f .FIXUP D
0A33f(8D200003): LDR SB, MT, MOD2 [Files]
0A34f(43D80001): ADD R3, SB, VAR1
0A35g(84E00040): LDR R4, SP, 40H
0A36h(85E000C8): LDR R5, SP, C8H
0A37i(F7FFFF18): BL -232 [0950H]
Files.Register(of)j;k Texts.WriteString(W,l " done")m
0A38j(80E00008): LDR R0, SP, 8H
0A39k .FIXUP P
0A39k(F720400B): BL MOD2 [Files] PROC4
0A3Al .FIXUP D
0A3Al(8D000007): LDR SB, MT, MOD0 [Boot]
0A3Bl(40D80070): ADD R0, SB, 70H [data]
0A3Cl .FIXUP D
0A3Cl(8D400002): LDR SB, MT, MOD4 [Texts]
0A3Dl(41D80005): ADD R1, SB, VAR5
0A3Em .FIXUP D
0A3Em(8D000002): LDR SB, MT, MOD0 [Boot]
0A3Fm(42D80308): ADD R2, SB, 308H [" done"]
0A40m(43000007): MOV R3, R0, 7H
ENDn
0A41n .FIXUP P
0A41n(F741D008): BL MOD4 [Texts] PROC29
ELSE Textso.WriteString(W,p " input file empty")q
0A42o(E7000008): B 8 [0A4BH]
0A43p .FIXUP D
0A43p(8D000005): LDR SB, MT, MOD0 [Boot]
0A44p(40D80070): ADD R0, SB, 70H [data]
0A45p .FIXUP D
0A45p(8D400002): LDR SB, MT, MOD4 [Texts]
0A46p(41D80005): ADD R1, SB, VAR5
0A47q .FIXUP D
0A47q(8D000002): LDR SB, MT, MOD0 [Boot]
0A48q(42D80310): ADD R2, SB, 310H [" input file empty"]
0A49q(43000013): MOV R3, R0, 13H
ENDr
0A4Ar .FIXUP P
0A4Ar(F741D009): BL MOD4 [Texts] PROC29
ELSE Textss.WriteString(W,t " input file not found")u
0A4Bs(E7000008): B 8 [0A54H]
0A4Ct .FIXUP D
0A4Ct(8D000005): LDR SB, MT, MOD0 [Boot]
0A4Dt(40D80070): ADD R0, SB, 70H [data]
0A4Et .FIXUP D
0A4Et(8D400002): LDR SB, MT, MOD4 [Texts]
0A4Ft(41D80005): ADD R1, SB, VAR5
0A50u .FIXUP D
0A50u(8D000002): LDR SB, MT, MOD0 [Boot]
0A51u(42D80324): ADD R2, SB, 324H [" input file not found"]
0A52u(43000017): MOV R3, R0, 17H
ENDv
0A53v .FIXUP P
0A53v(F741D009): BL MOD4 [Texts] PROC29
ELSE Textsw.WriteString(W,x " destaddr must be >= 0")y
0A54w(E7000008): B 8 [0A5DH]
0A55x .FIXUP D
0A55x(8D000005): LDR SB, MT, MOD0 [Boot]
0A56x(40D80070): ADD R0, SB, 70H [data]
0A57x .FIXUP D
0A57x(8D400002): LDR SB, MT, MOD4 [Texts]
0A58x(41D80005): ADD R1, SB, VAR5
0A59y .FIXUP D
0A59y(8D000002): LDR SB, MT, MOD0 [Boot]
0A5Ay(42D8033C): ADD R2, SB, 33CH [" destaddr must be >= 0"]
0A5By(43000018): MOV R3, R0, 18H
ENDz
0A5Cz .FIXUP P
0A5Cz(F741D009): BL MOD4 [Texts] PROC29
ELSE Textsa.WriteString(W,b " blocksize must be >= 0")c
0A5Da(E7000008): B 8 [0A66H]
0A5Eb .FIXUP D
0A5Eb(8D000005): LDR SB, MT, MOD0 [Boot]
0A5Fb(40D80070): ADD R0, SB, 70H [data]
0A60b .FIXUP D
0A60b(8D400002): LDR SB, MT, MOD4 [Texts]
0A61b(41D80005): ADD R1, SB, VAR5
0A62c .FIXUP D
0A62c(8D000002): LDR SB, MT, MOD0 [Boot]
0A63c(42D80354): ADD R2, SB, 354H [" blocksize must be >= 0"]
0A64c(43000019): MOV R3, R0, 19H
ENDd
0A65d .FIXUP P
0A65d(F741D009): BL MOD4 [Texts] PROC29
END
END
END
END ;
IF res = -1 THENe Texts.WriteString(W,f "Usage: Boot.WriteStream M.bin M.stream blocksize destaddr")g ENDh ;
0A66e(80E00044): LDR R0, SP, 44H
0A67e(5009FFFF): SUB R0, R0, FFFFFFFFH
0A68e(E9000008): BNE 8 [0A71H]
0A69f .FIXUP D
0A69f(8D000007): LDR SB, MT, MOD0 [Boot]
0A6Af(40D80070): ADD R0, SB, 70H [data]
0A6Bf .FIXUP D
0A6Bf(8D400002): LDR SB, MT, MOD4 [Texts]
0A6Cf(41D80005): ADD R1, SB, VAR5
0A6Dg .FIXUP D
0A6Dg(8D000002): LDR SB, MT, MOD0 [Boot]
0A6Eg(42D80370): ADD R2, SB, 370H ["Usage: Boot.WriteStream M.bin M.stream blocksize destaddr"]
0A6Fg(4300003A): MOV R3, R0, 3AH
0A70h .FIXUP P
0A70h(F741D00B): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)i;j Texts.Append(Oberon.Log,k W.buf)l
0A71i .FIXUP D
0A71i(8D000004): LDR SB, MT, MOD0 [Boot]
0A72i(40D80070): ADD R0, SB, 70H [data]
0A73i .FIXUP D
0A73i(8D400002): LDR SB, MT, MOD4 [Texts]
0A74i(41D80005): ADD R1, SB, VAR5
0A75j .FIXUP P
0A75j(F741C005): BL MOD4 [Texts] PROC28
0A76k .FIXUP D
0A76k(8D600003): LDR SB, MT, MOD6 [Oberon]
0A77k(80D0000D): LDR R0, SB, VAR13
0A78l .FIXUP D
0A78l(8D000002): LDR SB, MT, MOD0 [Boot]
0A79l(81D00070): LDR R1, SB, 70H [data]
ENDm WriteStream;
0A7Am .FIXUP P
0A7Am(F740E005): BL MOD4 [Texts] PROC14
0A7Bm(8FE00000): LDR LNK, SP, 0H
0A7Cm(4EE800FC): ADD SP, SP, FCH
0A7Dm(C700000F): B LNK
BEGINn Texts.OpenWriter(W)o;p Texts.WriteString(W,q "OR Boot linker/loader AP 1.9.18")r;s
0A7En .PROC 0
0A7En .ENTRYPOINT
0A7En(4EE90004): SUB SP, SP, 4H
0A7Fn(AFE00000): STR LNK, SP, 0H
0A80o .FIXUP D
0A80o(8D000008): LDR SB, MT, MOD0 [Boot]
0A81o(40D80070): ADD R0, SB, 70H [data]
0A82o .FIXUP D
0A82o(8D400002): LDR SB, MT, MOD4 [Texts]
0A83o(41D80005): ADD R1, SB, VAR5
0A84p .FIXUP P
0A84p(F741700A): BL MOD4 [Texts] PROC23
0A85q .FIXUP D
0A85q(8D000003): LDR SB, MT, MOD0 [Boot]
0A86q(40D80070): ADD R0, SB, 70H [data]
0A87q .FIXUP D
0A87q(8D400002): LDR SB, MT, MOD4 [Texts]
0A88q(41D80005): ADD R1, SB, VAR5
0A89r .FIXUP D
0A89r(8D000002): LDR SB, MT, MOD0 [Boot]
0A8Ar(42D803AC): ADD R2, SB, 3ACH ["OR Boot linker/loader AP 1.9.18"]
0A8Br(43000021): MOV R3, R0, 21H
0A8Cs .FIXUP P
0A8Cs(F741D008): BL MOD4 [Texts] PROC29
Texts.WriteLn(W)t;u Texts.Append(Oberon.Log,v W.buf)w;x limit := Kernel.heapOrg;y DEC(limit, 8000H)
0A8Dt .FIXUP D
0A8Dt(8D000004): LDR SB, MT, MOD0 [Boot]
0A8Et(40D80070): ADD R0, SB, 70H [data]
0A8Ft .FIXUP D
0A8Ft(8D400002): LDR SB, MT, MOD4 [Texts]
0A90t(41D80005): ADD R1, SB, VAR5
0A91u .FIXUP P
0A91u(F741C005): BL MOD4 [Texts] PROC28
0A92v .FIXUP D
0A92v(8D600003): LDR SB, MT, MOD6 [Oberon]
0A93v(80D0000D): LDR R0, SB, VAR13
0A94w .FIXUP D
0A94w(8D000002): LDR SB, MT, MOD0 [Boot]
0A95w(81D00070): LDR R1, SB, 70H [data]
0A96x .FIXUP P
0A96x(F740E005): BL MOD4 [Texts] PROC14
0A97y .FIXUP D
0A97y(8D100003): LDR SB, MT, MOD1 [Kernel]
0A98y(80D00003): LDR R0, SB, VAR3
0A99y .FIXUP D
0A99y(8D000002): LDR SB, MT, MOD0 [Boot]
0A9Ay(A0D00028): STR R0, SB, 28H [data]
ENDz Boot.a
0A9Bz(40D80028): ADD R0, SB, 28H
0A9Cz(81000000): LDR R1, R0, 0H
0A9Dz(41198000): SUB R1, R1, FFFF8000H
0A9Ez(A1000000): STR R1, R0, 0H
0A9Fa(8FE00000): LDR LNK, SP, 0H
0AA0a(4EE80004): ADD SP, SP, 4H
0AA1a(C700000F): B LNK