Modules

Used Exports

BUILTINS: CHAR DEC INC INTEGER LED ODD
Files: File Init Old Read ReadInt ReadString Rider Set
SYSTEM: GET PUT REG VAL

MODULE Modules; (*Link and load on RISC; NW 20.10.2013 / 9.4.2016*)
.MODULE Modules (KEY 41C6A19A, VERSION 1, SIZE 00001404)
.IMPORT Files (KEY 73F5D686)
.TYPEDESC 00000080 FFFFFFFF FFFFFFFF FFFFFFFF 00000020 FFFFFFFF
.DATA 58H
.STRING 70H "Oberon"
.POINTER_REFERENCES 18H 1CH
.FIXUP T 0H
IMPORT SYSTEM, Files;
CONST versionkey = 1X; MT = 12; DescSize = 80;
TYPE 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*, M: Module;
MTOrg*, AllocPtr*, res*: INTEGER;
importing*, imported*: ModuleName;
limit: INTEGER;
PROCEDURE ThisFile(name: ARRAY OF CHAR): Files.File;
VAR i: INTEGER;
filename: ModuleName;
BEGINa i := 0;b
0000a .PROC 1
0000a(4EE90030): SUB SP, SP, 30H
0001a(AFE00000): STR LNK, SP, 0H
0002a(A0E00004): STR R0, SP, 4H
0003a(A1E00008): STR R1, SP, 8H
0004b(40000000): MOV R0, R0, 0H
0005b(A0E0000C): STR R0, SP, CH
WHILE name[i]c # 0X DOd filename[i]e := name[i]f;g INC(i) ENDh ;
0006c .PROC 2
0006c(80E0000C): LDR R0, SP, CH
0007c(81E00008): LDR R1, SP, 8H
0008c .PROC 3
0008c(01090001): SUB R1, R0, R1
0009c .PROC 4
0009c(DA02C41C): BLCC MT [trap=1, pos=708]
000Ac .PROC 5
000Ac(81E00004): LDR R1, SP, 4H
000Bc .PROC 6
000Bc(00180000): ADD R0, R1, R0
000Cd(90000000): LDR R0, R0, 0H
000Dd(E1000010): BEQ 16 [001EH]
000Ee(80E0000C): LDR R0, SP, CH
000Fe(41090020): SUB R1, R0, 20H
0010e(DA02D81C): BLCC MT [trap=1, pos=728]
0011e(00E80000): ADD R0, SP, R0
0012f(81E0000C): LDR R1, SP, CH
0013f .PROC 7
0013f(82E00008): LDR R2, SP, 8H
0014f(02190002): SUB R2, R1, R2
0015f(DA02E31C): BLCC MT [trap=1, pos=739]
0016f(82E00004): LDR R2, SP, 4H
0017f(01280001): ADD R1, R2, R1
0018g(91100000): LDR R1, R1, 0H
0019g(B1000010): STR R1, R0, 10H
001Ah(80E0000C): LDR R0, SP, CH
001Bh(40080001): ADD R0, R0, 1H
001Ch(A0E0000C): STR R0, SP, CH
001Dh(E7FFFFE8): B -24 [0006H]
filename[i]i := ".";j filename[i+1]k := "r";l filename[i+2]m := "s";n filename[i+3]o := "c";p filename[i+4]q := 0X;r
001Ei(80E0000C): LDR R0, SP, CH
001Fi(41090020): SUB R1, R0, 20H
0020i(DA03011C): BLCC MT [trap=1, pos=769]
0021i(00E80000): ADD R0, SP, R0
0022j(4100002E): MOV R1, R0, 2EH
0023j(B1000010): STR R1, R0, 10H
0024k(80E0000C): LDR R0, SP, CH
0025k(40080001): ADD R0, R0, 1H
0026k(41090020): SUB R1, R0, 20H
0027k(DA03171C): BLCC MT [trap=1, pos=791]
0028k(00E80000): ADD R0, SP, R0
0029l(41000072): MOV R1, R0, 72H
002Al(B1000010): STR R1, R0, 10H
002Bm(80E0000C): LDR R0, SP, CH
002Cm(40080002): ADD R0, R0, 2H
002Dm(41090020): SUB R1, R0, 20H
002Em(DA032D1C): BLCC MT [trap=1, pos=813]
002Fm(00E80000): ADD R0, SP, R0
0030n(41000073): MOV R1, R0, 73H
0031n(B1000010): STR R1, R0, 10H
0032o(80E0000C): LDR R0, SP, CH
0033o(40080003): ADD R0, R0, 3H
0034o(41090020): SUB R1, R0, 20H
0035o(DA03431C): BLCC MT [trap=1, pos=835]
0036o(00E80000): ADD R0, SP, R0
0037p(41000063): MOV R1, R0, 63H
0038p(B1000010): STR R1, R0, 10H
0039q(80E0000C): LDR R0, SP, CH
003Aq(40080004): ADD R0, R0, 4H
003Bq(41090020): SUB R1, R0, 20H
003Cq(DA03591C): BLCC MT [trap=1, pos=857]
003Dq(00E80000): ADD R0, SP, R0
003Er(41000000): MOV R1, R0, 0H
003Fr(B1000010): STR R1, R0, 10H
RETURN Files.Old(filename)s
0040s(40E80010): ADD R0, SP, 10H
0041s(41000020): MOV R1, R0, 20H
ENDt ThisFile;
0042t .FIXUP P
0042t(F7102042): BL MOD1 [Files] PROC2
0043t(8FE00000): LDR LNK, SP, 0H
0044t(4EE80030): ADD SP, SP, 30H
0045t(C700000F): B LNK
PROCEDURE error(n: INTEGER; name: ARRAY OF CHAR);
BEGINu res := n;v importing := name
0046u(4EE90010): SUB SP, SP, 10H
0047u(AFE00000): STR LNK, SP, 0H
0048u(A0E00004): STR R0, SP, 4H
0049u(A1E00008): STR R1, SP, 8H
004Au(A2E0000C): STR R2, SP, CH
004Bv(80E00004): LDR R0, SP, 4H
004Cv .FIXUP D
004Cv(8D00004C): LDR SB, MT, MOD0 [Modules]
004Dv(A0D00028): STR R0, SB, 28H [data]
ENDw error;
004Ew(40D8002C): ADD R0, SB, 2CH
004Fw(81E00008): LDR R1, SP, 8H
0050w(82E0000C): LDR R2, SP, CH
0051w(E100000B): BEQ 11 [005DH]
0052w(42280003): ADD R2, R2, 3H
0053w(42220002): ASR R2, R2, 2H
0054w(43000008): MOV R3, R0, 8H
0055w(03290003): SUB R3, R2, R3
0056w(DE03EE3C): BLGT MT [trap=3, pos=1006]
0057w(83100000): LDR R3, R1, 0H
0058w(41180004): ADD R1, R1, 4H
0059w(A3000000): STR R3, R0, 0H
005Aw(40080004): ADD R0, R0, 4H
005Bw(42290001): SUB R2, R2, 1H
005Cw(E9FFFFFA): BNE -6 [0057H]
005Dw(8FE00000): LDR LNK, SP, 0H
005Ew(4EE80010): ADD SP, SP, 10H
005Fw(C700000F): B LNK
PROCEDURE Check(s: ARRAY OF CHAR);
VAR i: INTEGER; ch: CHAR;
BEGINx ch := s[0]y;z res := 1;a i := 1;b
0060x(4EE90014): SUB SP, SP, 14H
0061x(AFE00000): STR LNK, SP, 0H
0062x(A0E00004): STR R0, SP, 4H
0063x(A1E00008): STR R1, SP, 8H
0064y(40000000): MOV R0, R0, 0H
0065y(81E00008): LDR R1, SP, 8H
0066y(01090001): SUB R1, R0, R1
0067y(DA044C1C): BLCC MT [trap=1, pos=1100]
0068y(81E00004): LDR R1, SP, 4H
0069y(00180000): ADD R0, R1, R0
006Az(90000000): LDR R0, R0, 0H
006Bz(B0E00010): STR R0, SP, 10H
006Ca(40000001): MOV R0, R0, 1H
006Da .FIXUP D
006Da(8D000021): LDR SB, MT, MOD0 [Modules]
006Ea(A0D00028): STR R0, SB, 28H [data]
006Fb(40000001): MOV R0, R0, 1H
0070b(A0E0000C): STR R0, SP, CH
IF (ch >= "A")c & (dch <= "Z")e OR (fch >= "a")g & (hch <= "z")i THENj
0071c(90E00010): LDR R0, SP, 10H
0072c(40090041): SUB R0, R0, 41H
0073d(E5000003): BLT 3 [0077H]
0074e(90E00010): LDR R0, SP, 10H
0075e(4009005A): SUB R0, R0, 5AH
0076f(E6000006): BLE 6 [007DH]
0077g(90E00010): LDR R0, SP, 10H
0078g(40090061): SUB R0, R0, 61H
0079h(E500002E): BLT 46 [00A8H]
007Ai(90E00010): LDR R0, SP, 10H
007Bi(4009007A): SUB R0, R0, 7AH
007Cj(EE00002B): BGT 43 [00A8H]
REPEAT ch := s[i]k;l INC(i)
007Dk(80E0000C): LDR R0, SP, CH
007Ek(81E00008): LDR R1, SP, 8H
007Fk(01090001): SUB R1, R0, R1
0080k(DA04BA1C): BLCC MT [trap=1, pos=1210]
0081k(81E00004): LDR R1, SP, 4H
0082k(00180000): ADD R0, R1, R0
0083l(90000000): LDR R0, R0, 0H
0084l(B0E00010): STR R0, SP, 10H
UNTILm ~((ch >= "0")n & (och <= "9")p OR (qch >= "A")r & (sch <= "Z")t
0085m(80E0000C): LDR R0, SP, CH
0086m(40080001): ADD R0, R0, 1H
0087m(A0E0000C): STR R0, SP, CH
0088n(90E00010): LDR R0, SP, 10H
0089n(40090030): SUB R0, R0, 30H
008Ao(E5000003): BLT 3 [008EH]
008Bp(90E00010): LDR R0, SP, 10H
008Cp(40090039): SUB R0, R0, 39H
008Dq(E600000F): BLE 15 [009DH]
008Er(90E00010): LDR R0, SP, 10H
008Fr(40090041): SUB R0, R0, 41H
0090s(E5000003): BLT 3 [0094H]
0091t(90E00010): LDR R0, SP, 10H
0092t(4009005A): SUB R0, R0, 5AH
OR (uch >= "a")v & (wch <= "z")x OR (ych = ".")z) OR (ai = 32)b;c
0093u(E6000009): BLE 9 [009DH]
0094v(90E00010): LDR R0, SP, 10H
0095v(40090061): SUB R0, R0, 61H
0096w(E5000003): BLT 3 [009AH]
0097x(90E00010): LDR R0, SP, 10H
0098x(4009007A): SUB R0, R0, 7AH
0099y(E6000003): BLE 3 [009DH]
009Az(90E00010): LDR R0, SP, 10H
009Bz(4009002E): SUB R0, R0, 2EH
009Ca(E9000003): BNE 3 [00A0H]
009Db(80E0000C): LDR R0, SP, CH
009Eb(40090020): SUB R0, R0, 20H
009Fc(E9FFFFDD): BNE -35 [007DH]
IF (i < 32)d & (ech = 0X)f THENg res := 0 ENDh
00A0d(80E0000C): LDR R0, SP, CH
00A1d(40090020): SUB R0, R0, 20H
00A2e(ED000005): BGE 5 [00A8H]
00A3f(90E00010): LDR R0, SP, 10H
00A4g(E9000003): BNE 3 [00A8H]
00A5h(40000000): MOV R0, R0, 0H
00A6h .FIXUP D
00A6h(8D000039): LDR SB, MT, MOD0 [Modules]
00A7h(A0D00028): STR R0, SB, 28H [data]
END
ENDi Check;
00A8i(8FE00000): LDR LNK, SP, 0H
00A9i(4EE80014): ADD SP, SP, 14H
00AAi(C700000F): B LNK
PROCEDURE Load*(name: ARRAY OF CHAR; VAR newmod: Module);
(*search module in list; if not found, load module.
res = 0: already present or loaded; res = 2: file not available; res = 3: key conflict;
res = 4: bad file version; res = 5: corrupted file; res = 7: no space*)
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;
BEGINj mod := root;k res := 0;l nofimps := 0;m
00ABj .PROC 8
00ABj(4EE90110): SUB SP, SP, 110H
00ACj(AFE00000): STR LNK, SP, 0H
00ADj(A0E00004): STR R0, SP, 4H
00AEj(A1E00008): STR R1, SP, 8H
00AFj(A2E0000C): STR R2, SP, CH
00B0k .FIXUP D
00B0k(8D00000A): LDR SB, MT, MOD0 [Modules]
00B1k(80D00018): LDR R0, SB, 18H [data]
00B2k(A0E00010): STR R0, SP, 10H
00B3l(40000000): MOV R0, R0, 0H
00B4l(A0D00028): STR R0, SB, 28H
00B5m(40000000): MOV R0, R0, 0H
00B6m(A0E0002C): STR R0, SP, 2CH
WHILE (mod # NIL)n & (oname # mod.namep)q DOr mod := mod.nexts ENDt ;
00B7n(80E00010): LDR R0, SP, 10H
00B8o(E1000011): BEQ 17 [00CAH]
00B9p(80E00010): LDR R0, SP, 10H
00BAp(D108714C): BLEQ MT [trap=4, pos=2161]
00BBq(81E00004): LDR R1, SP, 4H
00BCq(92100000): LDR R2, R1, 0H
00BDq(41180001): ADD R1, R1, 1H
00BEq(93000000): LDR R3, R0, 0H
00BFq(40080001): ADD R0, R0, 1H
00C0q(04290003): SUB R4, R2, R3
00C1q(E9000002): BNE 2 [00C4H]
00C2q(44290000): SUB R4, R2, 0H
00C3q(E9FFFFF8): BNE -8 [00BCH]
00C4r(E1000005): BEQ 5 [00CAH]
00C5s(80E00010): LDR R0, SP, 10H
00C6s(D108854C): BLEQ MT [trap=4, pos=2181]
00C7t(80000020): LDR R0, R0, 20H
00C8t(A0E00010): STR R0, SP, 10H
00C9t(E7FFFFED): B -19 [00B7H]
IF mod = NIL THENu (*load*)
00CAu(80E00010): LDR R0, SP, 10H
00CBu(E9000336): BNE 822 [0402H]
Check(name)v;w
00CCv(80E00004): LDR R0, SP, 4H
00CDv(81E00008): LDR R1, SP, 8H
00CEw(F7FFFF91): BL -111 [0060H]
IF res = 0 THENx F := ThisFile(name)y ELSEz Fa := NIL ENDb ;
00CFx .FIXUP D
00CFx(8D00001F): LDR SB, MT, MOD0 [Modules]
00D0x(80D00028): LDR R0, SB, 28H [data]
00D1x(E9000005): BNE 5 [00D7H]
00D2y(80E00004): LDR R0, SP, 4H
00D3y(81E00008): LDR R1, SP, 8H
00D4z(F7FFFF2B): BL -213 [0000H]
00D5z(A0E000B4): STR R0, SP, B4H
00D6a(E7000002): B 2 [00D9H]
00D7b(40000000): MOV R0, R0, 0H
00D8b(A0E000B4): STR R0, SP, B4H
IF F # NIL THENc
00D9c(80E000B4): LDR R0, SP, B4H
00DAc(E100007A): BEQ 122 [0155H]
Files.Set(R,d F,e 0)f;g Files.ReadString(R,h name1)i;j Files.ReadInt(R,k key)l;m Files.Read(R,n ch)o;p
00DBd(40E800B8): ADD R0, SP, B8H
00DCd .FIXUP D
00DCd(8D10000D): LDR SB, MT, MOD1 [Files]
00DDd(41D80001): ADD R1, SB, VAR1
00DEe(82E000B4): LDR R2, SP, B4H
00DFf(43000000): MOV R3, R0, 0H
00E0g .FIXUP P
00E0g(F710B09E): BL MOD1 [Files] PROC11
00E1h(40E800B8): ADD R0, SP, B8H
00E2h .FIXUP D
00E2h(8D100006): LDR SB, MT, MOD1 [Files]
00E3h(41D80001): ADD R1, SB, VAR1
00E4i(42E80074): ADD R2, SP, 74H
00E5i(43000020): MOV R3, R0, 20H
00E6j .FIXUP P
00E6j(F7114006): BL MOD1 [Files] PROC20
00E7k(40E800B8): ADD R0, SP, B8H
00E8k .FIXUP D
00E8k(8D100006): LDR SB, MT, MOD1 [Files]
00E9k(41D80001): ADD R1, SB, VAR1
00EAl(42E80020): ADD R2, SP, 20H
00EBm .FIXUP P
00EBm(F7111005): BL MOD1 [Files] PROC17
00ECn(40E800B8): ADD R0, SP, B8H
00EDn .FIXUP D
00EDn(8D100005): LDR SB, MT, MOD1 [Files]
00EEn(41D80001): ADD R1, SB, VAR1
00EFo(42E80044): ADD R2, SP, 44H
00F0p .FIXUP P
00F0p(F7110005): BL MOD1 [Files] PROC16
Files.ReadInt(R,q size)r;s importing := name1;t
00F1q(40E800B8): ADD R0, SP, B8H
00F2q .FIXUP D
00F2q(8D100005): LDR SB, MT, MOD1 [Files]
00F3q(41D80001): ADD R1, SB, VAR1
00F4r(42E80030): ADD R2, SP, 30H
00F5s .FIXUP P
00F5s(F7111005): BL MOD1 [Files] PROC17
00F6t .FIXUP D
00F6t(8D000004): LDR SB, MT, MOD0 [Modules]
00F7t(40D8002C): ADD R0, SB, 2CH [data]
00F8t(41E80074): ADD R1, SP, 74H
00F9t(42000008): MOV R2, R0, 8H
00FAt(83100000): LDR R3, R1, 0H
00FBt(41180004): ADD R1, R1, 4H
00FCt(A3000000): STR R3, R0, 0H
00FDt(40080004): ADD R0, R0, 4H
00FEt(42290001): SUB R2, R2, 1H
00FFt(E9FFFFFA): BNE -6 [00FAH]
IF ch = versionkey THENu
0100u(90E00044): LDR R0, SP, 44H
0101u(40090001): SUB R0, R0, 1H
0102u(E900004D): BNE 77 [0150H]
Files.ReadString(R,v impname)w;x (*imports*)
0103v(40E800B8): ADD R0, SP, B8H
0104v .FIXUP D
0104v(8D10000E): LDR SB, MT, MOD1 [Files]
0105v(41D80001): ADD R1, SB, VAR1
0106w(42E80094): ADD R2, SP, 94H
0107w(43000020): MOV R3, R0, 20H
0108x .FIXUP P
0108x(F7114013): BL MOD1 [Files] PROC20
WHILE (impname[0] # 0X)y & (zres = 0)a DOb
0109y(90E00094): LDR R0, SP, 94H
010Az(E1000044): BEQ 68 [014FH]
010Ba .FIXUP D
010Ba(8D000007): LDR SB, MT, MOD0 [Modules]
010Ca(80D00028): LDR R0, SB, 28H [data]
010Db(E9000041): BNE 65 [014FH]
Files.ReadInt(R,c impkey)d;e
010Ec(40E800B8): ADD R0, SP, B8H
010Fc .FIXUP D
010Fc(8D100004): LDR SB, MT, MOD1 [Files]
0110c(41D80001): ADD R1, SB, VAR1
0111d(42E80024): ADD R2, SP, 24H
0112e .FIXUP P
0112e(F711100A): BL MOD1 [Files] PROC17
Load(impname,f impmod)g;h import[nofimps]i := impmod;j importing := name1;k
0113f(40E80094): ADD R0, SP, 94H
0114f(41000020): MOV R1, R0, 20H
0115g(42E80014): ADD R2, SP, 14H
0116h(F7FFFF94): BL -108 [00ABH]
0117i(80E0002C): LDR R0, SP, 2CH
0118i(41090010): SUB R1, R0, 10H
0119i(DA0A871C): BLCC MT [trap=1, pos=2695]
011Ai(40010002): LSL R0, R0, 2H
011Bi(00E80000): ADD R0, SP, R0
011Cj(81E00014): LDR R1, SP, 14H
011Dj(A10000D0): STR R1, R0, D0H
011Ek .FIXUP D
011Ek(8D00000F): LDR SB, MT, MOD0 [Modules]
011Fk(40D8002C): ADD R0, SB, 2CH [data]
0120k(41E80074): ADD R1, SP, 74H
0121k(42000008): MOV R2, R0, 8H
0122k(83100000): LDR R3, R1, 0H
0123k(41180004): ADD R1, R1, 4H
0124k(A3000000): STR R3, R0, 0H
0125k(40080004): ADD R0, R0, 4H
0126k(42290001): SUB R2, R2, 1H
0127k(E9FFFFFA): BNE -6 [0122H]
IF res = 0 THENl
0128l(80D00028): LDR R0, SB, 28H
0129l(E900001E): BNE 30 [0148H]
IF impmod.keym = impkey THENn INC(impmod.refcnto);p INC(nofimps)
012Am(80E00014): LDR R0, SP, 14H
012Bm(D10ADE4C): BLEQ MT [trap=4, pos=2782]
012Cn(80000024): LDR R0, R0, 24H
012Dn(81E00024): LDR R1, SP, 24H
012En(00090001): SUB R0, R0, R1
012Fn(E900000A): BNE 10 [013AH]
0130o(80E00014): LDR R0, SP, 14H
0131o(D10AFE4C): BLEQ MT [trap=4, pos=2814]
0132p(40080030): ADD R0, R0, 30H
0133p(81000000): LDR R1, R0, 0H
0134p(41180001): ADD R1, R1, 1H
0135p(A1000000): STR R1, R0, 0H
ELSEq errorr(3,s name1)t;u imported := impname
0136q(80E0002C): LDR R0, SP, 2CH
0137q(40080001): ADD R0, R0, 1H
0138q(A0E0002C): STR R0, SP, 2CH
0139r(E700000E): B 14 [0148H]
013As(40000003): MOV R0, R0, 3H
013Bt(41E80074): ADD R1, SP, 74H
013Ct(42000020): MOV R2, R0, 20H
013Du(F7FFFF08): BL -248 [0046H]
ENDv
013Ev .FIXUP D
013Ev(8D000020): LDR SB, MT, MOD0 [Modules]
013Fv(40D8004C): ADD R0, SB, 4CH [data]
0140v(41E80094): ADD R1, SP, 94H
0141v(42000008): MOV R2, R0, 8H
0142v(83100000): LDR R3, R1, 0H
0143v(41180004): ADD R1, R1, 4H
0144v(A3000000): STR R3, R0, 0H
0145v(40080004): ADD R0, R0, 4H
0146v(42290001): SUB R2, R2, 1H
0147v(E9FFFFFA): BNE -6 [0142H]
END ;
Files.ReadString(R,w impname)x
0148w(40E800B8): ADD R0, SP, B8H
0149w .FIXUP D
0149w(8D10000B): LDR SB, MT, MOD1 [Files]
014Aw(41D80001): ADD R1, SB, VAR1
014Bx(42E80094): ADD R2, SP, 94H
014Cx(43000020): MOV R3, R0, 20H
ENDy
014Dy .FIXUP P
014Dy(F711403B): BL MOD1 [Files] PROC20
014Ey(E7FFFFBA): B -70 [0109H]
ELSE errorz(2,a name1)b
014Fz(E7000004): B 4 [0154H]
0150a(40000002): MOV R0, R0, 2H
0151b(41E80074): ADD R1, SP, 74H
0152b(42000020): MOV R2, R0, 20H
ENDc
0153c(F7FFFEF2): BL -270 [0046H]
ELSE errord(1,e name)f
0154d(E7000004): B 4 [0159H]
0155e(40000001): MOV R0, R0, 1H
0156f(81E00004): LDR R1, SP, 4H
0157f(82E00008): LDR R2, SP, 8H
ENDg ;
0158g(F7FFFEED): BL -275 [0046H]
IF res = 0 THENh (*search for a hole in the list allocate and link*)
0159h .FIXUP D
0159h(8D000010): LDR SB, MT, MOD0 [Modules]
015Ah(80D00028): LDR R0, SB, 28H [data]
015Bh(E9000047): BNE 71 [01A3H]
INC(size, DescSize);i mod := root;j
015Ci(80E00030): LDR R0, SP, 30H
015Di(40080050): ADD R0, R0, 50H
015Ei(A0E00030): STR R0, SP, 30H
015Fj .FIXUP D
015Fj(8D000006): LDR SB, MT, MOD0 [Modules]
0160j(80D00018): LDR R0, SB, 18H [data]
0161j(A0E00010): STR R0, SP, 10H
WHILE (mod # NIL)k & ~l((mod.namem[0] = 0X)n & (omod.sizep >= size)q) DOr mod := mod.nexts ENDt ;
0162k(80E00010): LDR R0, SP, 10H
0163l(E100000F): BEQ 15 [0173H]
0164m(80E00010): LDR R0, SP, 10H
0165m(D10C8B4C): BLEQ MT [trap=4, pos=3211]
0166n(90000000): LDR R0, R0, 0H
0167o(E9000006): BNE 6 [016EH]
0168p(80E00010): LDR R0, SP, 10H
0169p(D10CA04C): BLEQ MT [trap=4, pos=3232]
016Aq(8000002C): LDR R0, R0, 2CH
016Bq(81E00030): LDR R1, SP, 30H
016Cq(00090001): SUB R0, R0, R1
016Dr(ED000005): BGE 5 [0173H]
016Es(80E00010): LDR R0, SP, 10H
016Fs(D10CBD4C): BLEQ MT [trap=4, pos=3261]
0170t(80000020): LDR R0, R0, 20H
0171t(A0E00010): STR R0, SP, 10H
0172t(E7FFFFEF): B -17 [0162H]
IF mod = NIL THENu (*no large enough hole was found*)
0173u(80E00010): LDR R0, SP, 10H
0174u(E900002C): BNE 44 [01A1H]
IF AllocPtr + size <v limit THENw (*allocate*)
0175v .FIXUP D
0175v(8D000016): LDR SB, MT, MOD0 [Modules]
0176v(80D00024): LDR R0, SB, 24H [data]
0177v(81E00030): LDR R1, SP, 30H
0178v(00080001): ADD R0, R0, R1
0179w(81D0006C): LDR R1, SB, 6CH
017Aw(00090001): SUB R0, R0, R1
017Bw(ED000020): BGE 32 [019CH]
p := AllocPtr;x mod := SYSTEM.VAL(Module, p);y
017Cx .FIXUP D
017Cx(8D000007): LDR SB, MT, MOD0 [Modules]
017Dx(80D00024): LDR R0, SB, 24H [data]
017Ex(A0E00034): STR R0, SP, 34H
017Fy(80E00034): LDR R0, SP, 34H
0180y(A0E00010): STR R0, SP, 10H
AllocPtr := (p + size +z 100H)a DIV 20H *b 20H;c mod.sized := AllocPtr - p;e mod.numf := root.numg + 1;h
0181z(80E00034): LDR R0, SP, 34H
0182z(81E00030): LDR R1, SP, 30H
0183z(00080001): ADD R0, R0, R1
0184a(40080100): ADD R0, R0, 100H
0185b(40020005): ASR R0, R0, 5H
0186c(40010005): LSL R0, R0, 5H
0187c(A0D00024): STR R0, SB, 24H
0188d(80E00010): LDR R0, SP, 10H
0189d(D10DB24C): BLEQ MT [trap=4, pos=3506]
018Ae(81D00024): LDR R1, SB, 24H
018Be(82E00034): LDR R2, SP, 34H
018Ce(01190002): SUB R1, R1, R2
018De(A100002C): STR R1, R0, 2CH
018Ef(80E00010): LDR R0, SP, 10H
018Ff(D10DCB4C): BLEQ MT [trap=4, pos=3531]
0190g(81D00018): LDR R1, SB, 18H
0191g(D10DD74C): BLEQ MT [trap=4, pos=3543]
0192h(81100028): LDR R1, R1, 28H
0193h(41180001): ADD R1, R1, 1H
0194h(A1000028): STR R1, R0, 28H
mod.nexti := root;j root := mod
0195i(80E00010): LDR R0, SP, 10H
0196i(D10DF14C): BLEQ MT [trap=4, pos=3569]
0197j(81D00018): LDR R1, SB, 18H
0198j(A1000020): STR R1, R0, 20H
ELSEk errorl(7,m name1)n
0199k(80E00010): LDR R0, SP, 10H
019Ak(A0D00018): STR R0, SB, 18H
019Bl(E7000004): B 4 [01A0H]
019Cm(40000007): MOV R0, R0, 7H
019Dn(41E80074): ADD R1, SP, 74H
019En(42000020): MOV R2, R0, 20H
ENDo
019Fo(F7FFFEA6): BL -346 [0046H]
ELSE (*fill hole*) pp := SYSTEM.VAL(INTEGER, mod)
01A0p(E7000002): B 2 [01A3H]
ENDq
01A1q(80E00010): LDR R0, SP, 10H
01A2q(A0E00034): STR R0, SP, 34H
END ;
IF res = 0 THENr (*read file*)
01A3r .FIXUP D
01A3r(8D000027): LDR SB, MT, MOD0 [Modules]
01A4r(80D00028): LDR R0, SB, 28H [data]
01A5r(E900013E): BNE 318 [02E4H]
INC(p, DescSize);s (*allocate descriptor*)
01A6s(80E00034): LDR R0, SP, 34H
01A7s(40080050): ADD R0, R0, 50H
01A8s(A0E00034): STR R0, SP, 34H
mod.namet := name;u mod.keyv := key;w mod.refcntx := 0;y
01A9t(80E00010): LDR R0, SP, 10H
01AAt(D10EEC4C): BLEQ MT [trap=4, pos=3820]
01ABu(81E00004): LDR R1, SP, 4H
01ACu(82E00008): LDR R2, SP, 8H
01ADu(E100000B): BEQ 11 [01B9H]
01AEu(42280003): ADD R2, R2, 3H
01AFu(42220002): ASR R2, R2, 2H
01B0u(43000008): MOV R3, R0, 8H
01B1u(03290003): SUB R3, R2, R3
01B2u(DE0EF53C): BLGT MT [trap=3, pos=3829]
01B3u(83100000): LDR R3, R1, 0H
01B4u(41180004): ADD R1, R1, 4H
01B5u(A3000000): STR R3, R0, 0H
01B6u(40080004): ADD R0, R0, 4H
01B7u(42290001): SUB R2, R2, 1H
01B8u(E9FFFFFA): BNE -6 [01B3H]
01B9v(80E00010): LDR R0, SP, 10H
01BAv(D10EFD4C): BLEQ MT [trap=4, pos=3837]
01BBw(81E00020): LDR R1, SP, 20H
01BCw(A1000024): STR R1, R0, 24H
01BDx(80E00010): LDR R0, SP, 10H
01BEx(D10F104C): BLEQ MT [trap=4, pos=3856]
01BFy(41000000): MOV R1, R0, 0H
01C0y(A1000030): STR R1, R0, 30H
mod.dataz := p;a (*data*)
01C1z(80E00010): LDR R0, SP, 10H
01C2z(D10F274C): BLEQ MT [trap=4, pos=3879]
01C3a(81E00034): LDR R1, SP, 34H
01C4a(A1000034): STR R1, R0, 34H
SYSTEM.PUT(mod.numb * 4 +c MTOrg,d p);e (*module table entry*)
01C5b(80E00010): LDR R0, SP, 10H
01C6b(D10F524C): BLEQ MT [trap=4, pos=3922]
01C7c(80000028): LDR R0, R0, 28H
01C8c(40010002): LSL R0, R0, 2H
01C9d .FIXUP D
01C9d(8D000026): LDR SB, MT, MOD0 [Modules]
01CAd(81D00020): LDR R1, SB, 20H [data]
01CBd(00080001): ADD R0, R0, R1
01CCe(81E00034): LDR R1, SP, 34H
01CDe(A1000000): STR R1, R0, 0H
Files.ReadInt(R,f n)g;h
01CEf(40E800B8): ADD R0, SP, B8H
01CFf .FIXUP D
01CFf(8D100006): LDR SB, MT, MOD1 [Files]
01D0f(41D80001): ADD R1, SB, VAR1
01D1g(42E8001C): ADD R2, SP, 1CH
01D2h .FIXUP P
01D2h(F7111085): BL MOD1 [Files] PROC17
WHILE n > 0 DOi Files.ReadInt(R,j w)k;l SYSTEM.PUT(p, w);m INC(p, 4);n DEC(n, 4) ENDo ; (*type descriptors*)
01D3i(80E0001C): LDR R0, SP, 1CH
01D4i(40090000): SUB R0, R0, 0H
01D5i(E600000F): BLE 15 [01E5H]
01D6j(40E800B8): ADD R0, SP, B8H
01D7j .FIXUP D
01D7j(8D100008): LDR SB, MT, MOD1 [Files]
01D8j(41D80001): ADD R1, SB, VAR1
01D9k(42E80040): ADD R2, SP, 40H
01DAl .FIXUP P
01DAl(F7111008): BL MOD1 [Files] PROC17
01DBm(80E00034): LDR R0, SP, 34H
01DCm(81E00040): LDR R1, SP, 40H
01DDm(A1000000): STR R1, R0, 0H
01DEn(80E00034): LDR R0, SP, 34H
01DFn(40080004): ADD R0, R0, 4H
01E0n(A0E00034): STR R0, SP, 34H
01E1o(80E0001C): LDR R0, SP, 1CH
01E2o(40090004): SUB R0, R0, 4H
01E3o(A0E0001C): STR R0, SP, 1CH
01E4o(E7FFFFEE): B -18 [01D3H]
Files.ReadInt(R,p n)q;r
01E5p(40E800B8): ADD R0, SP, B8H
01E6p .FIXUP D
01E6p(8D10000F): LDR SB, MT, MOD1 [Files]
01E7p(41D80001): ADD R1, SB, VAR1
01E8q(42E8001C): ADD R2, SP, 1CH
01E9r .FIXUP P
01E9r(F711100F): BL MOD1 [Files] PROC17
WHILE n > 0 DOs SYSTEM.PUT(p, 0);t INC(p, 4);u DEC(n, 4) ENDv ; (*variable space*)
01EAs(80E0001C): LDR R0, SP, 1CH
01EBs(40090000): SUB R0, R0, 0H
01ECs(E600000A): BLE 10 [01F7H]
01EDt(80E00034): LDR R0, SP, 34H
01EEt(41000000): MOV R1, R0, 0H
01EFt(A1000000): STR R1, R0, 0H
01F0u(80E00034): LDR R0, SP, 34H
01F1u(40080004): ADD R0, R0, 4H
01F2u(A0E00034): STR R0, SP, 34H
01F3v(80E0001C): LDR R0, SP, 1CH
01F4v(40090004): SUB R0, R0, 4H
01F5v(A0E0001C): STR R0, SP, 1CH
01F6v(E7FFFFF3): B -13 [01EAH]
Files.ReadInt(R,w n)x;y
01F7w(40E800B8): ADD R0, SP, B8H
01F8w .FIXUP D
01F8w(8D100012): LDR SB, MT, MOD1 [Files]
01F9w(41D80001): ADD R1, SB, VAR1
01FAx(42E8001C): ADD R2, SP, 1CH
01FBy .FIXUP P
01FBy(F7111012): BL MOD1 [Files] PROC17
WHILE n > 0 DOz Files.Read(R,a ch)b;c SYSTEM.PUT(p, ch);d INC(p);e DEC(n) ENDf ; (*strings*)
01FCz(80E0001C): LDR R0, SP, 1CH
01FDz(40090000): SUB R0, R0, 0H
01FEz(E600000F): BLE 15 [020EH]
01FFa(40E800B8): ADD R0, SP, B8H
0200a .FIXUP D
0200a(8D100008): LDR SB, MT, MOD1 [Files]
0201a(41D80001): ADD R1, SB, VAR1
0202b(42E80044): ADD R2, SP, 44H
0203c .FIXUP P
0203c(F7110008): BL MOD1 [Files] PROC16
0204d(80E00034): LDR R0, SP, 34H
0205d(91E00044): LDR R1, SP, 44H
0206d(B1000000): STR R1, R0, 0H
0207e(80E00034): LDR R0, SP, 34H
0208e(40080001): ADD R0, R0, 1H
0209e(A0E00034): STR R0, SP, 34H
020Af(80E0001C): LDR R0, SP, 1CH
020Bf(40090001): SUB R0, R0, 1H
020Cf(A0E0001C): STR R0, SP, 1CH
020Df(E7FFFFEE): B -18 [01FCH]
mod.codeg := p;h (*program*)
020Eg(80E00010): LDR R0, SP, 10H
020Fg(D1110A4C): BLEQ MT [trap=4, pos=4362]
0210h(81E00034): LDR R1, SP, 34H
0211h(A1000038): STR R1, R0, 38H
Files.ReadInt(R,i n)j;k
0212i(40E800B8): ADD R0, SP, B8H
0213i .FIXUP D
0213i(8D100013): LDR SB, MT, MOD1 [Files]
0214i(41D80001): ADD R1, SB, VAR1
0215j(42E8001C): ADD R2, SP, 1CH
0216k .FIXUP P
0216k(F7111013): BL MOD1 [Files] PROC17
WHILE n > 0 DOl Files.ReadInt(R,m w)n;o SYSTEM.PUT(p, w);p INC(p, 4);q DEC(n) ENDr ; (*program code*)
0217l(80E0001C): LDR R0, SP, 1CH
0218l(40090000): SUB R0, R0, 0H
0219l(E600000F): BLE 15 [0229H]
021Am(40E800B8): ADD R0, SP, B8H
021Bm .FIXUP D
021Bm(8D100008): LDR SB, MT, MOD1 [Files]
021Cm(41D80001): ADD R1, SB, VAR1
021Dn(42E80040): ADD R2, SP, 40H
021Eo .FIXUP P
021Eo(F7111008): BL MOD1 [Files] PROC17
021Fp(80E00034): LDR R0, SP, 34H
0220p(81E00040): LDR R1, SP, 40H
0221p(A1000000): STR R1, R0, 0H
0222q(80E00034): LDR R0, SP, 34H
0223q(40080004): ADD R0, R0, 4H
0224q(A0E00034): STR R0, SP, 34H
0225r(80E0001C): LDR R0, SP, 1CH
0226r(40090001): SUB R0, R0, 1H
0227r(A0E0001C): STR R0, SP, 1CH
0228r(E7FFFFEE): B -18 [0217H]
mod.imps := p;t (*copy imports*)
0229s(80E00010): LDR R0, SP, 10H
022As(D111B24C): BLEQ MT [trap=4, pos=4530]
022Bt(81E00034): LDR R1, SP, 34H
022Ct(A100003C): STR R1, R0, 3CH
i := 0;u
022Du(40000000): MOV R0, R0, 0H
022Eu(A0E00018): STR R0, SP, 18H
WHILE i < nofimps DOv
022Fv(80E00018): LDR R0, SP, 18H
0230v(81E0002C): LDR R1, SP, 2CH
0231v(00090001): SUB R0, R0, R1
0232v(ED00000F): BGE 15 [0242H]
SYSTEM.PUT(p, import[i]w);x INC(p, 4);y INC(i)
0233w(80E00018): LDR R0, SP, 18H
0234w(41090010): SUB R1, R0, 10H
0235w(DA12191C): BLCC MT [trap=1, pos=4633]
0236w(40010002): LSL R0, R0, 2H
0237w(00E80000): ADD R0, SP, R0
0238x(81E00034): LDR R1, SP, 34H
0239x(800000D0): LDR R0, R0, D0H
023Ax(A0100000): STR R0, R1, 0H
023By(80E00034): LDR R0, SP, 34H
023Cy(40080004): ADD R0, R0, 4H
023Dy(A0E00034): STR R0, SP, 34H
ENDz ;
023Ez(80E00018): LDR R0, SP, 18H
023Fz(40080001): ADD R0, R0, 1H
0240z(A0E00018): STR R0, SP, 18H
0241z(E7FFFFED): B -19 [022FH]
mod.cmda := p;b (*commands*) Files.Read(R,c ch)d;e
0242a(80E00010): LDR R0, SP, 10H
0243a(D1124B4C): BLEQ MT [trap=4, pos=4683]
0244b(81E00034): LDR R1, SP, 34H
0245b(A1000040): STR R1, R0, 40H
0246c(40E800B8): ADD R0, SP, B8H
0247c .FIXUP D
0247c(8D10002C): LDR SB, MT, MOD1 [Files]
0248c(41D80001): ADD R1, SB, VAR1
0249d(42E80044): ADD R2, SP, 44H
024Ae .FIXUP P
024Ae(F711002C): BL MOD1 [Files] PROC16
WHILE ch # 0X DOf
024Bf(90E00044): LDR R0, SP, 44H
024Cf(E1000028): BEQ 40 [0275H]
REPEAT SYSTEM.PUT(p, ch);g INC(p);h Files.Read(R,i ch)j UNTILk ch = 0X;l
024Dg(80E00034): LDR R0, SP, 34H
024Eg(91E00044): LDR R1, SP, 44H
024Fg(B1000000): STR R1, R0, 0H
0250h(80E00034): LDR R0, SP, 34H
0251h(40080001): ADD R0, R0, 1H
0252h(A0E00034): STR R0, SP, 34H
0253i(40E800B8): ADD R0, SP, B8H
0254i .FIXUP D
0254i(8D10000D): LDR SB, MT, MOD1 [Files]
0255i(41D80001): ADD R1, SB, VAR1
0256j(42E80044): ADD R2, SP, 44H
0257k .FIXUP P
0257k(F711000D): BL MOD1 [Files] PROC16
0258l(90E00044): LDR R0, SP, 44H
0259l(E9FFFFF3): BNE -13 [024DH]
REPEAT SYSTEM.PUT(p, 0X);m INC(p) UNTILn p MOD 4 =o 0;p
025Am(80E00034): LDR R0, SP, 34H
025Bm(41000000): MOV R1, R0, 0H
025Cm(B1000000): STR R1, R0, 0H
025Dn(80E00034): LDR R0, SP, 34H
025En(40080001): ADD R0, R0, 1H
025Fn(A0E00034): STR R0, SP, 34H
0260o(80E00034): LDR R0, SP, 34H
0261o(40040003): AND R0, R0, 3H
0262p(40090000): SUB R0, R0, 0H
0263p(E9FFFFF6): BNE -10 [025AH]
Files.ReadInt(R,q n)r;s SYSTEM.PUT(p, n);t INC(p, 4);u Files.Read(R,v ch)w
0264q(40E800B8): ADD R0, SP, B8H
0265q .FIXUP D
0265q(8D100011): LDR SB, MT, MOD1 [Files]
0266q(41D80001): ADD R1, SB, VAR1
0267r(42E8001C): ADD R2, SP, 1CH
0268s .FIXUP P
0268s(F7111011): BL MOD1 [Files] PROC17
0269t(80E00034): LDR R0, SP, 34H
026At(81E0001C): LDR R1, SP, 1CH
026Bt(A1000000): STR R1, R0, 0H
026Cu(80E00034): LDR R0, SP, 34H
026Du(40080004): ADD R0, R0, 4H
026Eu(A0E00034): STR R0, SP, 34H
026Fv(40E800B8): ADD R0, SP, B8H
0270v .FIXUP D
0270v(8D10000B): LDR SB, MT, MOD1 [Files]
0271v(41D80001): ADD R1, SB, VAR1
0272w(42E80044): ADD R2, SP, 44H
ENDx ;
0273x .FIXUP P
0273x(F711000B): BL MOD1 [Files] PROC16
0274x(E7FFFFD6): B -42 [024BH]
REPEAT SYSTEM.PUT(p, 0X);y INC(p) UNTILz p MOD 4 =a 0;b
0275y(80E00034): LDR R0, SP, 34H
0276y(41000000): MOV R1, R0, 0H
0277y(B1000000): STR R1, R0, 0H
0278z(80E00034): LDR R0, SP, 34H
0279z(40080001): ADD R0, R0, 1H
027Az(A0E00034): STR R0, SP, 34H
027Ba(80E00034): LDR R0, SP, 34H
027Ca(40040003): AND R0, R0, 3H
027Db(40090000): SUB R0, R0, 0H
027Eb(E9FFFFF6): BNE -10 [0275H]
mod.entc := p;d (*entries*)
027Fc(80E00010): LDR R0, SP, 10H
0280c(D113BE4C): BLEQ MT [trap=4, pos=5054]
0281d(81E00034): LDR R1, SP, 34H
0282d(A1000044): STR R1, R0, 44H
Files.ReadInt(R,e n)f;g
0283e(40E800B8): ADD R0, SP, B8H
0284e .FIXUP D
0284e(8D100014): LDR SB, MT, MOD1 [Files]
0285e(41D80001): ADD R1, SB, VAR1
0286f(42E8001C): ADD R2, SP, 1CH
0287g .FIXUP P
0287g(F7111014): BL MOD1 [Files] PROC17
WHILE n > 0 DOh Files.ReadInt(R,i w)j;k SYSTEM.PUT(p, w);l INC(p, 4);m DEC(n) ENDn ;
0288h(80E0001C): LDR R0, SP, 1CH
0289h(40090000): SUB R0, R0, 0H
028Ah(E600000F): BLE 15 [029AH]
028Bi(40E800B8): ADD R0, SP, B8H
028Ci .FIXUP D
028Ci(8D100008): LDR SB, MT, MOD1 [Files]
028Di(41D80001): ADD R1, SB, VAR1
028Ej(42E80040): ADD R2, SP, 40H
028Fk .FIXUP P
028Fk(F7111008): BL MOD1 [Files] PROC17
0290l(80E00034): LDR R0, SP, 34H
0291l(81E00040): LDR R1, SP, 40H
0292l(A1000000): STR R1, R0, 0H
0293m(80E00034): LDR R0, SP, 34H
0294m(40080004): ADD R0, R0, 4H
0295m(A0E00034): STR R0, SP, 34H
0296n(80E0001C): LDR R0, SP, 1CH
0297n(40090001): SUB R0, R0, 1H
0298n(A0E0001C): STR R0, SP, 1CH
0299n(E7FFFFEE): B -18 [0288H]
mod.ptro := p;p (*pointer references*)
029Ao(80E00010): LDR R0, SP, 10H
029Bo(D114544C): BLEQ MT [trap=4, pos=5204]
029Cp(81E00034): LDR R1, SP, 34H
029Dp(A1000048): STR R1, R0, 48H
Files.ReadInt(R,q w)r;s
029Eq(40E800B8): ADD R0, SP, B8H
029Fq .FIXUP D
029Fq(8D100013): LDR SB, MT, MOD1 [Files]
02A0q(41D80001): ADD R1, SB, VAR1
02A1r(42E80040): ADD R2, SP, 40H
02A2s .FIXUP P
02A2s(F7111013): BL MOD1 [Files] PROC17
WHILE w >= 0 DOt SYSTEM.PUT(p, mod.datau + w)v;w INC(p, 4);x Files.ReadInt(R,y w)z ENDa ;
02A3t(80E00040): LDR R0, SP, 40H
02A4t(40090000): SUB R0, R0, 0H
02A5t(E5000010): BLT 16 [02B6H]
02A6u(80E00010): LDR R0, SP, 10H
02A7u(D114BE4C): BLEQ MT [trap=4, pos=5310]
02A8v(80000034): LDR R0, R0, 34H
02A9v(81E00040): LDR R1, SP, 40H
02AAv(00080001): ADD R0, R0, R1
02ABw(81E00034): LDR R1, SP, 34H
02ACw(A0100000): STR R0, R1, 0H
02ADx(80E00034): LDR R0, SP, 34H
02AEx(40080004): ADD R0, R0, 4H
02AFx(A0E00034): STR R0, SP, 34H
02B0y(40E800B8): ADD R0, SP, B8H
02B1y .FIXUP D
02B1y(8D100012): LDR SB, MT, MOD1 [Files]
02B2y(41D80001): ADD R1, SB, VAR1
02B3z(42E80040): ADD R2, SP, 40H
02B4a .FIXUP P
02B4a(F7111012): BL MOD1 [Files] PROC17
02B5a(E7FFFFED): B -19 [02A3H]
SYSTEM.PUT(p, 0);b INC(p, 4);c
02B6b(80E00034): LDR R0, SP, 34H
02B7b(41000000): MOV R1, R0, 0H
02B8b(A1000000): STR R1, R0, 0H
02B9c(80E00034): LDR R0, SP, 34H
02BAc(40080004): ADD R0, R0, 4H
02BBc(A0E00034): STR R0, SP, 34H
Files.ReadInt(R,d fixorgP)e;f Files.ReadInt(R,g fixorgD)h;i Files.ReadInt(R,j fixorgT)k;l
02BCd(40E800B8): ADD R0, SP, B8H
02BDd .FIXUP D
02BDd(8D10000C): LDR SB, MT, MOD1 [Files]
02BEd(41D80001): ADD R1, SB, VAR1
02BFe(42E8004C): ADD R2, SP, 4CH
02C0f .FIXUP P
02C0f(F711100C): BL MOD1 [Files] PROC17
02C1g(40E800B8): ADD R0, SP, B8H
02C2g .FIXUP D
02C2g(8D100005): LDR SB, MT, MOD1 [Files]
02C3g(41D80001): ADD R1, SB, VAR1
02C4h(42E80050): ADD R2, SP, 50H
02C5i .FIXUP P
02C5i(F7111005): BL MOD1 [Files] PROC17
02C6j(40E800B8): ADD R0, SP, B8H
02C7j .FIXUP D
02C7j(8D100005): LDR SB, MT, MOD1 [Files]
02C8j(41D80001): ADD R1, SB, VAR1
02C9k(42E80054): ADD R2, SP, 54H
02CAl .FIXUP P
02CAl(F7111005): BL MOD1 [Files] PROC17
Files.ReadInt(R,m w)n;o body := SYSTEM.VAL(Command, mod.codep + w)q;r
02CBm(40E800B8): ADD R0, SP, B8H
02CCm .FIXUP D
02CCm(8D100005): LDR SB, MT, MOD1 [Files]
02CDm(41D80001): ADD R1, SB, VAR1
02CEn(42E80040): ADD R2, SP, 40H
02CFo .FIXUP P
02CFo(F7111005): BL MOD1 [Files] PROC17
02D0p(80E00010): LDR R0, SP, 10H
02D1p(D115A94C): BLEQ MT [trap=4, pos=5545]
02D2q(80000038): LDR R0, R0, 38H
02D3q(81E00040): LDR R1, SP, 40H
02D4q(00080001): ADD R0, R0, R1
02D5r(A0E00048): STR R0, SP, 48H
Files.Read(R,s ch)t;u
02D6s(40E800B8): ADD R0, SP, B8H
02D7s .FIXUP D
02D7s(8D10000B): LDR SB, MT, MOD1 [Files]
02D8s(41D80001): ADD R1, SB, VAR1
02D9t(42E80044): ADD R2, SP, 44H
02DAu .FIXUP P
02DAu(F711000B): BL MOD1 [Files] PROC16
IF ch # "O" THENv (*corrupted file*) mod := NIL;w error(4,x name)y ENDz
02DBv(90E00044): LDR R0, SP, 44H
02DCv(4009004F): SUB R0, R0, 4FH
02DDv(E1000006): BEQ 6 [02E4H]
02DEw(40000000): MOV R0, R0, 0H
02DFw(A0E00010): STR R0, SP, 10H
02E0x(40000004): MOV R0, R0, 4H
02E1y(81E00004): LDR R1, SP, 4H
02E2y(82E00008): LDR R2, SP, 8H
02E3z(F7FFFD62): BL -670 [0046H]
END ;
IF res = 0 THENa (*fixup of BL*)
02E4a .FIXUP D
02E4a(8D00000D): LDR SB, MT, MOD0 [Modules]
02E5a(80D00028): LDR R0, SB, 28H [data]
02E6a(E90000F5): BNE 245 [03DCH]
adr := mod.codeb + fixorgP*4;c
02E7b(80E00010): LDR R0, SP, 10H
02E8b(D116604C): BLEQ MT [trap=4, pos=5728]
02E9c(81E0004C): LDR R1, SP, 4CH
02EAc(41110002): LSL R1, R1, 2H
02EBc(80000038): LDR R0, R0, 38H
02ECc(00080001): ADD R0, R0, R1
02EDc(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.coded DOe
02EEd(80E00010): LDR R0, SP, 10H
02EFd(D1168A4C): BLEQ MT [trap=4, pos=5770]
02F0e(81E0005C): LDR R1, SP, 5CH
02F1e(80000038): LDR R0, R0, 38H
02F2e(01190000): SUB R1, R1, R0
02F3e(E1000038): BEQ 56 [032CH]
SYSTEM.GET(adr, inst);f
02F4f(80E0005C): LDR R0, SP, 5CH
02F5f(80000000): LDR R0, R0, 0H
02F6f(A0E00060): STR R0, SP, 60H
mno := inst DIV 100000H MODg 10H;h
02F7g(80E00060): LDR R0, SP, 60H
02F8g(40020014): ASR R0, R0, 14H
02F9h(4004000F): AND R0, R0, FH
02FAh(A0E00028): STR R0, SP, 28H
pno := inst DIV 1000H MODi 100H;j
02FBi(80E00060): LDR R0, SP, 60H
02FCi(4002000C): ASR R0, R0, CH
02FDj(400400FF): AND R0, R0, FFH
02FEj(A0E00064): STR R0, SP, 64H
disp := inst MOD 1000H;k
02FFk(80E00060): LDR R0, SP, 60H
0300k(40040FFF): AND R0, R0, FFFH
0301k(A0E00058): STR R0, SP, 58H
SYSTEM.GET(mod.impl + (mno-1)m*4,n impmod);o
0302l(80E00010): LDR R0, SP, 10H
0303l(D117424C): BLEQ MT [trap=4, pos=5954]
0304m(81E00028): LDR R1, SP, 28H
0305m(41190001): SUB R1, R1, 1H
0306n(41110002): LSL R1, R1, 2H
0307n(8000003C): LDR R0, R0, 3CH
0308n(00080001): ADD R0, R0, R1
0309o(80000000): LDR R0, R0, 0H
030Ao(A0E00014): STR R0, SP, 14H
SYSTEM.GET(impmod.entp + pno*4,q dest);r dest := dest + impmod.codes;t
030Bp(80E00014): LDR R0, SP, 14H
030Cp(D117784C): BLEQ MT [trap=4, pos=6008]
030Dq(81E00064): LDR R1, SP, 64H
030Eq(41110002): LSL R1, R1, 2H
030Fq(80000044): LDR R0, R0, 44H
0310q(00080001): ADD R0, R0, R1
0311r(80000000): LDR R0, R0, 0H
0312r(A0E0006C): STR R0, SP, 6CH
0313s(80E00014): LDR R0, SP, 14H
0314s(D117A34C): BLEQ MT [trap=4, pos=6051]
0315t(81E0006C): LDR R1, SP, 6CH
0316t(80000038): LDR R0, R0, 38H
0317t(00180000): ADD R0, R1, R0
0318t(A0E0006C): STR R0, SP, 6CH
offset := (dest - adr -u 4)v DIV 4;w
0319u(80E0006C): LDR R0, SP, 6CH
031Au(81E0005C): LDR R1, SP, 5CH
031Bu(00090001): SUB R0, R0, R1
031Cv(40090004): SUB R0, R0, 4H
031Dw(40020002): ASR R0, R0, 2H
031Ew(A0E00070): STR R0, SP, 70H
SYSTEM.PUT(adr, (offset MOD 1000000H)x + 0F7000000H)y;z
031Fx(80E00070): LDR R0, SP, 70H
0320x(40010008): LSL R0, R0, 8H
0321x(40030008): ROR R0, R0, 8H
0322y(7100F700): MOV' R1, R0, FFFFF700H
0323y(00080001): ADD R0, R0, R1
0324z(81E0005C): LDR R1, SP, 5CH
0325z(A0100000): STR R0, R1, 0H
adr := adr - disp*4
ENDa ;
0326a(80E00058): LDR R0, SP, 58H
0327a(40010002): LSL R0, R0, 2H
0328a(81E0005C): LDR R1, SP, 5CH
0329a(00190000): SUB R0, R1, R0
032Aa(A0E0005C): STR R0, SP, 5CH
032Ba(E7FFFFC2): B -62 [02EEH]
(*fixup of LDR/STR/ADD*)
adr := mod.codeb + fixorgD*4;c
032Cb(80E00010): LDR R0, SP, 10H
032Db(D118744C): BLEQ MT [trap=4, pos=6260]
032Ec(81E00050): LDR R1, SP, 50H
032Fc(41110002): LSL R1, R1, 2H
0330c(80000038): LDR R0, R0, 38H
0331c(00080001): ADD R0, R0, R1
0332c(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.coded DOe
0333d(80E00010): LDR R0, SP, 10H
0334d(D1189E4C): BLEQ MT [trap=4, pos=6302]
0335e(81E0005C): LDR R1, SP, 5CH
0336e(80000038): LDR R0, R0, 38H
0337e(01190000): SUB R1, R1, R0
0338e(E100005B): BEQ 91 [0394H]
SYSTEM.GET(adr, inst);f
0339f(80E0005C): LDR R0, SP, 5CH
033Af(80000000): LDR R0, R0, 0H
033Bf(A0E00060): STR R0, SP, 60H
mno := inst DIV 100000H MODg 10H;h
033Cg(80E00060): LDR R0, SP, 60H
033Dg(40020014): ASR R0, R0, 14H
033Eh(4004000F): AND R0, R0, FH
033Fh(A0E00028): STR R0, SP, 28H
disp := inst MOD 1000H;i
0340i(80E00060): LDR R0, SP, 60H
0341i(40040FFF): AND R0, R0, FFFH
0342i(A0E00058): STR R0, SP, 58H
IF mno = 0 THENj (*global*)
0343j(80E00028): LDR R0, SP, 28H
0344j(E900000D): BNE 13 [0352H]
SYSTEM.PUT(adr, (inst DIV 1000000H *k 10H +l MT)m * 100000H +n mod.numo * 4)p
0345k(80E00060): LDR R0, SP, 60H
0346k(40020018): ASR R0, R0, 18H
0347l(40010004): LSL R0, R0, 4H
0348m(4008000C): ADD R0, R0, CH
0349n(40010014): LSL R0, R0, 14H
034Ao(81E00010): LDR R1, SP, 10H
034Bo(D119834C): BLEQ MT [trap=4, pos=6531]
034Cp(81100028): LDR R1, R1, 28H
034Dp(41110002): LSL R1, R1, 2H
034Ep(00080001): ADD R0, R0, R1
ELSEq (*import*)
034Fq(81E0005C): LDR R1, SP, 5CH
0350q(A0100000): STR R0, R1, 0H
SYSTEMr.GET(mod.imps + (mno-1)t*4,u impmod);v v := impmod.numw;x
0351r(E700003C): B 60 [038EH]
0352s(80E00010): LDR R0, SP, 10H
0353s(D119C14C): BLEQ MT [trap=4, pos=6593]
0354t(81E00028): LDR R1, SP, 28H
0355t(41190001): SUB R1, R1, 1H
0356u(41110002): LSL R1, R1, 2H
0357u(8000003C): LDR R0, R0, 3CH
0358u(00080001): ADD R0, R0, R1
0359v(80000000): LDR R0, R0, 0H
035Av(A0E00014): STR R0, SP, 14H
035Bw(80E00014): LDR R0, SP, 14H
035Cw(D119E74C): BLEQ MT [trap=4, pos=6631]
035Dx(80000028): LDR R0, R0, 28H
035Ex(A0E0003C): STR R0, SP, 3CH
SYSTEM.PUT(adr, (inst DIV 1000000H *y 10H +z MT)a * 100000H +b v*4)c;d
035Fy(80E00060): LDR R0, SP, 60H
0360y(40020018): ASR R0, R0, 18H
0361z(40010004): LSL R0, R0, 4H
0362a(4008000C): ADD R0, R0, CH
0363b(40010014): LSL R0, R0, 14H
0364c(81E0003C): LDR R1, SP, 3CH
0365c(41110002): LSL R1, R1, 2H
0366c(00080001): ADD R0, R0, R1
0367d(81E0005C): LDR R1, SP, 5CH
0368d(A0100000): STR R0, R1, 0H
SYSTEM.GET(adr+4,e inst);f vno := inst MOD 100H;g
0369e(80E0005C): LDR R0, SP, 5CH
036Ae(40080004): ADD R0, R0, 4H
036Bf(80000000): LDR R0, R0, 0H
036Cf(A0E00060): STR R0, SP, 60H
036Dg(80E00060): LDR R0, SP, 60H
036Eg(400400FF): AND R0, R0, FFH
036Fg(A0E00068): STR R0, SP, 68H
SYSTEM.GET(impmod.enth + vno*4,i offset);j
0370h(80E00014): LDR R0, SP, 14H
0371h(D11A924C): BLEQ MT [trap=4, pos=6802]
0372i(81E00068): LDR R1, SP, 68H
0373i(41110002): LSL R1, R1, 2H
0374i(80000044): LDR R0, R0, 44H
0375i(00080001): ADD R0, R0, R1
0376j(80000000): LDR R0, R0, 0H
0377j(A0E00070): STR R0, SP, 70H
IF ODD(inst DIV 100H)k THENl offset := offset + impmod.codem -n impmod.datao ENDp ;
0378k(80E00060): LDR R0, SP, 60H
0379k(40020008): ASR R0, R0, 8H
037Al(40040001): AND R0, R0, 1H
037Bl(E100000A): BEQ 10 [0386H]
037Cm(80E00014): LDR R0, SP, 14H
037Dm(D11AEA4C): BLEQ MT [trap=4, pos=6890]
037En(81E00070): LDR R1, SP, 70H
037Fn(80000038): LDR R0, R0, 38H
0380n(00180000): ADD R0, R1, R0
0381o(81E00014): LDR R1, SP, 14H
0382o(D11AF84C): BLEQ MT [trap=4, pos=6904]
0383p(81100034): LDR R1, R1, 34H
0384p(00090001): SUB R0, R0, R1
0385p(A0E00070): STR R0, SP, 70H
SYSTEM.PUT(adr+4,q inst DIV 10000H *r 10000H +s offset)t
0386q(80E0005C): LDR R0, SP, 5CH
0387q(40080004): ADD R0, R0, 4H
0388r(81E00060): LDR R1, SP, 60H
0389r(41120010): ASR R1, R1, 10H
038As(41110010): LSL R1, R1, 10H
038Bt(82E00070): LDR R2, SP, 70H
038Ct(01180002): ADD R1, R1, R2
ENDu ;
038Du(A1000000): STR R1, R0, 0H
adr := adr - disp*4
ENDv ;
038Ev(80E00058): LDR R0, SP, 58H
038Fv(40010002): LSL R0, R0, 2H
0390v(81E0005C): LDR R1, SP, 5CH
0391v(00190000): SUB R0, R1, R0
0392v(A0E0005C): STR R0, SP, 5CH
0393v(E7FFFF9F): B -97 [0333H]
(*fixup of type descriptors*)
adr := mod.dataw + fixorgT*4;x
0394w(80E00010): LDR R0, SP, 10H
0395w(D11BB94C): BLEQ MT [trap=4, pos=7097]
0396x(81E00054): LDR R1, SP, 54H
0397x(41110002): LSL R1, R1, 2H
0398x(80000034): LDR R0, R0, 34H
0399x(00080001): ADD R0, R0, R1
039Ax(A0E0005C): STR R0, SP, 5CH
WHILE adr # mod.datay DOz
039By(80E00010): LDR R0, SP, 10H
039Cy(D11BE34C): BLEQ MT [trap=4, pos=7139]
039Dz(81E0005C): LDR R1, SP, 5CH
039Ez(80000034): LDR R0, R0, 34H
039Fz(01190000): SUB R1, R1, R0
03A0z(E1000037): BEQ 55 [03D8H]
SYSTEM.GET(adr, inst);a
03A1a(80E0005C): LDR R0, SP, 5CH
03A2a(80000000): LDR R0, R0, 0H
03A3a(A0E00060): STR R0, SP, 60H
mno := inst DIV 1000000H MODb 10H;c
03A4b(80E00060): LDR R0, SP, 60H
03A5b(40020018): ASR R0, R0, 18H
03A6c(4004000F): AND R0, R0, FH
03A7c(A0E00028): STR R0, SP, 28H
vno := inst DIV 1000H MODd 1000H;e
03A8d(80E00060): LDR R0, SP, 60H
03A9d(4002000C): ASR R0, R0, CH
03AAe(40040FFF): AND R0, R0, FFFH
03ABe(A0E00068): STR R0, SP, 68H
disp := inst MOD 1000H;f
03ACf(80E00060): LDR R0, SP, 60H
03ADf(40040FFF): AND R0, R0, FFFH
03AEf(A0E00058): STR R0, SP, 58H
IF mno = 0 THENg (*global*) inst := mod.datah + vno
03AFg(80E00028): LDR R0, SP, 28H
03B0g(E9000007): BNE 7 [03B8H]
03B1h(80E00010): LDR R0, SP, 10H
03B2h(D11CB64C): BLEQ MT [trap=4, pos=7350]
ELSEi (*import*)
03B3i(80000034): LDR R0, R0, 34H
03B4i(81E00068): LDR R1, SP, 68H
03B5i(00080001): ADD R0, R0, R1
03B6i(A0E00060): STR R0, SP, 60H
SYSTEMj.GET(mod.impk + (mno-1)l*4,m impmod);n
03B7j(E7000017): B 23 [03CFH]
03B8k(80E00010): LDR R0, SP, 10H
03B9k(D11CF54C): BLEQ MT [trap=4, pos=7413]
03BAl(81E00028): LDR R1, SP, 28H
03BBl(41190001): SUB R1, R1, 1H
03BCm(41110002): LSL R1, R1, 2H
03BDm(8000003C): LDR R0, R0, 3CH
03BEm(00080001): ADD R0, R0, R1
03BFn(80000000): LDR R0, R0, 0H
03C0n(A0E00014): STR R0, SP, 14H
SYSTEM.GET(impmod.ento + vno*4,p offset);q
03C1o(80E00014): LDR R0, SP, 14H
03C2o(D11D2D4C): BLEQ MT [trap=4, pos=7469]
03C3p(81E00068): LDR R1, SP, 68H
03C4p(41110002): LSL R1, R1, 2H
03C5p(80000044): LDR R0, R0, 44H
03C6p(00080001): ADD R0, R0, R1
03C7q(80000000): LDR R0, R0, 0H
03C8q(A0E00070): STR R0, SP, 70H
inst := impmod.datar + offset
03C9r(80E00014): LDR R0, SP, 14H
03CAr(D11D5F4C): BLEQ MT [trap=4, pos=7519]
ENDs ;
03CBs(80000034): LDR R0, R0, 34H
03CCs(81E00070): LDR R1, SP, 70H
03CDs(00080001): ADD R0, R0, R1
03CEs(A0E00060): STR R0, SP, 60H
SYSTEM.PUT(adr, inst);t adr := adr - disp*4
03CFt(80E0005C): LDR R0, SP, 5CH
03D0t(81E00060): LDR R1, SP, 60H
03D1t(A1000000): STR R1, R0, 0H
ENDu ;
03D2u(80E00058): LDR R0, SP, 58H
03D3u(40010002): LSL R0, R0, 2H
03D4u(81E0005C): LDR R1, SP, 5CH
03D5u(00190000): SUB R0, R1, R0
03D6u(A0E0005C): STR R0, SP, 5CH
03D7u(E7FFFFC3): B -61 [039BH]
body (*initialize module*)
ELSIFv resw = 3 THENx importing := name;y
03D8v(80E00048): LDR R0, SP, 48H
03D9v(D11DEC5C): BLEQ MT [trap=5, pos=7660]
03DAv(D7000000): BL R0
03DBw(E7000026): B 38 [0402H]
03DCx .FIXUP D
03DCx(8D0000F8): LDR SB, MT, MOD0 [Modules]
03DDx(80D00028): LDR R0, SB, 28H [data]
03DEx(40090003): SUB R0, R0, 3H
03DFx(E9000022): BNE 34 [0402H]
03E0y .FIXUP D
03E0y(8D000004): LDR SB, MT, MOD0 [Modules]
03E1y(40D8002C): ADD R0, SB, 2CH [data]
03E2y(81E00004): LDR R1, SP, 4H
03E3y(82E00008): LDR R2, SP, 8H
03E4y(E100000B): BEQ 11 [03F0H]
03E5y(42280003): ADD R2, R2, 3H
03E6y(42220002): ASR R2, R2, 2H
03E7y(43000008): MOV R3, R0, 8H
03E8y(03290003): SUB R3, R2, R3
03E9y(DE1E0C3C): BLGT MT [trap=3, pos=7692]
03EAy(83100000): LDR R3, R1, 0H
03EBy(41180004): ADD R1, R1, 4H
03ECy(A3000000): STR R3, R0, 0H
03EDy(40080004): ADD R0, R0, 4H
03EEy(42290001): SUB R2, R2, 1H
03EFy(E9FFFFFA): BNE -6 [03EAH]
WHILE nofimps > 0 DOz DEC(nofimps);a DEC(import[nofimps]b.refcntc) ENDd
03F0z(80E0002C): LDR R0, SP, 2CH
03F1z(40090000): SUB R0, R0, 0H
03F2z(E600000F): BLE 15 [0402H]
03F3a(80E0002C): LDR R0, SP, 2CH
03F4a(40090001): SUB R0, R0, 1H
03F5a(A0E0002C): STR R0, SP, 2CH
03F6b(80E0002C): LDR R0, SP, 2CH
03F7b(41090010): SUB R1, R0, 10H
03F8b(DA1E4B1C): BLCC MT [trap=1, pos=7755]
03F9b(40010002): LSL R0, R0, 2H
03FAb(00E80000): ADD R0, SP, R0
03FBc(800000D0): LDR R0, R0, D0H
03FCc(D11E524C): BLEQ MT [trap=4, pos=7762]
03FDd(40080030): ADD R0, R0, 30H
03FEd(81000000): LDR R1, R0, 0H
03FFd(41190001): SUB R1, R1, 1H
0400d(A1000000): STR R1, R0, 0H
0401d(E7FFFFEE): B -18 [03F0H]
END
END ;
newmod := mod
ENDe Load;
0402e(80E00010): LDR R0, SP, 10H
0403e(81E0000C): LDR R1, SP, CH
0404e(A0100000): STR R0, R1, 0H
0405e(8FE00000): LDR LNK, SP, 0H
0406e(4EE80110): ADD SP, SP, 110H
0407e(C700000F): B LNK
PROCEDURE ThisCommand*(mod: Module; name: ARRAY OF CHAR): Command;
VAR k, adr, w: INTEGER; ch: CHAR;
s: ARRAY 32 OF CHAR;
BEGINf res := 5;g w := 0;h
0408f .PROC 9
0408f(4EE90040): SUB SP, SP, 40H
0409f(AFE00000): STR LNK, SP, 0H
040Af(A0E00004): STR R0, SP, 4H
040Bf(A1E00008): STR R1, SP, 8H
040Cf(A2E0000C): STR R2, SP, CH
040Dg(40000005): MOV R0, R0, 5H
040Eg .FIXUP D
040Eg(8D00002E): LDR SB, MT, MOD0 [Modules]
040Fg(A0D00028): STR R0, SB, 28H [data]
0410h(40000000): MOV R0, R0, 0H
0411h(A0E00018): STR R0, SP, 18H
IF mod # NIL THENi
0412i(80E00004): LDR R0, SP, 4H
0413i(E100004B): BEQ 75 [045FH]
adr := mod.cmdj;k SYSTEM.GET(adr, ch);l
0414j(80E00004): LDR R0, SP, 4H
0415j(D11F574C): BLEQ MT [trap=4, pos=8023]
0416k(80000040): LDR R0, R0, 40H
0417k(A0E00014): STR R0, SP, 14H
0418l(80E00014): LDR R0, SP, 14H
0419l(90000000): LDR R0, R0, 0H
041Al(B0E0001C): STR R0, SP, 1CH
WHILE (ch # 0X)m & (nres # 0)o DOp k := 0;q (*read command name*)
041Bm(90E0001C): LDR R0, SP, 1CH
041Cn(E1000042): BEQ 66 [045FH]
041Do .FIXUP D
041Do(8D00000F): LDR SB, MT, MOD0 [Modules]
041Eo(80D00028): LDR R0, SB, 28H [data]
041Fp(E100003F): BEQ 63 [045FH]
0420q(40000000): MOV R0, R0, 0H
0421q(A0E00010): STR R0, SP, 10H
REPEAT s[k]r := ch;s INC(k);t INC(adr);u SYSTEM.GET(adr, ch) UNTILv ch = 0X;w
0422r(80E00010): LDR R0, SP, 10H
0423r(41090020): SUB R1, R0, 20H
0424r(DA1FC41C): BLCC MT [trap=1, pos=8132]
0425r(00E80000): ADD R0, SP, R0
0426s(91E0001C): LDR R1, SP, 1CH
0427s(B1000020): STR R1, R0, 20H
0428t(80E00010): LDR R0, SP, 10H
0429t(40080001): ADD R0, R0, 1H
042At(A0E00010): STR R0, SP, 10H
042Bu(80E00014): LDR R0, SP, 14H
042Cu(40080001): ADD R0, R0, 1H
042Du(A0E00014): STR R0, SP, 14H
042Ev(80E00014): LDR R0, SP, 14H
042Fv(90000000): LDR R0, R0, 0H
0430v(B0E0001C): STR R0, SP, 1CH
0431w(90E0001C): LDR R0, SP, 1CH
0432w(E9FFFFEF): BNE -17 [0422H]
s[k]x := 0X;y
0433x(80E00010): LDR R0, SP, 10H
0434x(41090020): SUB R1, R0, 20H
0435x(DA200D1C): BLCC MT [trap=1, pos=8205]
0436x(00E80000): ADD R0, SP, R0
0437y(41000000): MOV R1, R0, 0H
0438y(B1000020): STR R1, R0, 20H
REPEAT INC(adr) UNTILz adr MOD 4 =a 0;b
0439z(80E00014): LDR R0, SP, 14H
043Az(40080001): ADD R0, R0, 1H
043Bz(A0E00014): STR R0, SP, 14H
043Ca(80E00014): LDR R0, SP, 14H
043Da(40040003): AND R0, R0, 3H
043Eb(40090000): SUB R0, R0, 0H
043Fb(E9FFFFF9): BNE -7 [0439H]
SYSTEM.GET(adr, k);c INC(adr, 4);d
0440c(80E00014): LDR R0, SP, 14H
0441c(80000000): LDR R0, R0, 0H
0442c(A0E00010): STR R0, SP, 10H
0443d(80E00014): LDR R0, SP, 14H
0444d(40080004): ADD R0, R0, 4H
0445d(A0E00014): STR R0, SP, 14H
IF s = name THENe res := 0;f w := mod.codeg + k ELSEh SYSTEMi.GET(adr, ch) ENDj
0446e(40E80020): ADD R0, SP, 20H
0447e(81E00008): LDR R1, SP, 8H
0448e(92000000): LDR R2, R0, 0H
0449e(40080001): ADD R0, R0, 1H
044Ae(93100000): LDR R3, R1, 0H
044Be(41180001): ADD R1, R1, 1H
044Ce(04290003): SUB R4, R2, R3
044De(E9000002): BNE 2 [0450H]
044Ee(44290000): SUB R4, R2, 0H
044Fe(E9FFFFF8): BNE -8 [0448H]
0450e(E900000A): BNE 10 [045BH]
0451f(40000000): MOV R0, R0, 0H
0452f .FIXUP D
0452f(8D000035): LDR SB, MT, MOD0 [Modules]
0453f(A0D00028): STR R0, SB, 28H [data]
0454g(80E00004): LDR R0, SP, 4H
0455g(D1209B4C): BLEQ MT [trap=4, pos=8347]
0456h(80000038): LDR R0, R0, 38H
0457h(81E00010): LDR R1, SP, 10H
0458h(00080001): ADD R0, R0, R1
0459h(A0E00018): STR R0, SP, 18H
045Ai(E7000003): B 3 [045EH]
045Bj(80E00014): LDR R0, SP, 14H
045Cj(90000000): LDR R0, R0, 0H
045Dj(B0E0001C): STR R0, SP, 1CH
ENDk
045Ek(E7FFFFBC): B -68 [041BH]
END
RETURN SYSTEM.VAL(Command, w)
ENDl ThisCommand;
045Fl(80E00018): LDR R0, SP, 18H
0460l(8FE00000): LDR LNK, SP, 0H
0461l(4EE80040): ADD SP, SP, 40H
0462l(C700000F): B LNK
PROCEDURE Free*(name: ARRAY OF CHAR);
VAR mod, imp: Module; p, q: INTEGER;
BEGINm mod := root;n res := 0;o
0463m .PROC 10
0463m(4EE9001C): SUB SP, SP, 1CH
0464m(AFE00000): STR LNK, SP, 0H
0465m(A0E00004): STR R0, SP, 4H
0466m(A1E00008): STR R1, SP, 8H
0467n .FIXUP D
0467n(8D000015): LDR SB, MT, MOD0 [Modules]
0468n(80D00018): LDR R0, SB, 18H [data]
0469n(A0E0000C): STR R0, SP, CH
046Ao(40000000): MOV R0, R0, 0H
046Bo(A0D00028): STR R0, SB, 28H
WHILE (mod # NIL)p & (qmod.namer # name)s DOt mod := mod.nextu ENDv ;
046Cp(80E0000C): LDR R0, SP, CH
046Dq(E1000011): BEQ 17 [047FH]
046Er(80E0000C): LDR R0, SP, CH
046Fr(D121964C): BLEQ MT [trap=4, pos=8598]
0470s(81E00004): LDR R1, SP, 4H
0471s(92000000): LDR R2, R0, 0H
0472s(40080001): ADD R0, R0, 1H
0473s(93100000): LDR R3, R1, 0H
0474s(41180001): ADD R1, R1, 1H
0475s(04290003): SUB R4, R2, R3
0476s(E9000002): BNE 2 [0479H]
0477s(44290000): SUB R4, R2, 0H
0478s(E9FFFFF8): BNE -8 [0471H]
0479t(E1000005): BEQ 5 [047FH]
047Au(80E0000C): LDR R0, SP, CH
047Bu(D121B14C): BLEQ MT [trap=4, pos=8625]
047Cv(80000020): LDR R0, R0, 20H
047Dv(A0E0000C): STR R0, SP, CH
047Ev(E7FFFFED): B -19 [046CH]
IF mod # NIL THENw
047Fw(80E0000C): LDR R0, SP, CH
0480w(E1000025): BEQ 37 [04A6H]
IF mod.refcntx = 0 THENy
0481x(80E0000C): LDR R0, SP, CH
0482x(D121E14C): BLEQ MT [trap=4, pos=8673]
0483y(80000030): LDR R0, R0, 30H
0484y(E900001E): BNE 30 [04A3H]
mod.namez[0] := 0X;a p := mod.impb;c q := mod.cmdd;e
0485z(80E0000C): LDR R0, SP, CH
0486z(D121FB4C): BLEQ MT [trap=4, pos=8699]
0487a(41000000): MOV R1, R0, 0H
0488a(B1000000): STR R1, R0, 0H
0489b(80E0000C): LDR R0, SP, CH
048Ab(D122124C): BLEQ MT [trap=4, pos=8722]
048Bc(8000003C): LDR R0, R0, 3CH
048Cc(A0E00014): STR R0, SP, 14H
048Dd(80E0000C): LDR R0, SP, CH
048Ed(D122204C): BLEQ MT [trap=4, pos=8736]
048Fe(80000040): LDR R0, R0, 40H
0490e(A0E00018): STR R0, SP, 18H
WHILE p < q DOf SYSTEM.GET(p, imp);g DEC(imp.refcnth);i INC(p, 4) ENDj ;
0491f(80E00014): LDR R0, SP, 14H
0492f(81E00018): LDR R1, SP, 18H
0493f(00090001): SUB R0, R0, R1
0494f(ED00000D): BGE 13 [04A2H]
0495g(80E00014): LDR R0, SP, 14H
0496g(80000000): LDR R0, R0, 0H
0497g(A0E00010): STR R0, SP, 10H
0498h(80E00010): LDR R0, SP, 10H
0499h(D1225B4C): BLEQ MT [trap=4, pos=8795]
049Ai(40080030): ADD R0, R0, 30H
049Bi(81000000): LDR R1, R0, 0H
049Ci(41190001): SUB R1, R1, 1H
049Di(A1000000): STR R1, R0, 0H
049Ej(80E00014): LDR R0, SP, 14H
049Fj(40080004): ADD R0, R0, 4H
04A0j(A0E00014): STR R0, SP, 14H
04A1j(E7FFFFEF): B -17 [0491H]
ELSE resk := 1
04A2k(E7000003): B 3 [04A6H]
ENDl
04A3l(40000001): MOV R0, R0, 1H
04A4l .FIXUP D
04A4l(8D00003D): LDR SB, MT, MOD0 [Modules]
04A5l(A0D00028): STR R0, SB, 28H [data]
END
ENDm Free;
04A6m(8FE00000): LDR LNK, SP, 0H
04A7m(4EE8001C): ADD SP, SP, 1CH
04A8m(C700000F): B LNK
PROCEDURE Init*;
BEGINn Files.Init;o MTOrg := SYSTEM.REG(MT);p
04A9n .PROC 11
04A9n .COMMAND Init
04A9n(4EE90004): SUB SP, SP, 4H
04AAn(AFE00000): STR LNK, SP, 0H
04ABo .FIXUP P
04ABo(F711E1D1): BL MOD1 [Files] PROC30
04ACp(0000000C): MOV R0, R0, MT
04ADp .FIXUP D
04ADp(8D000009): LDR SB, MT, MOD0 [Modules]
04AEp(A0D00020): STR R0, SB, 20H [data]
SYSTEM.GET(16, AllocPtr);q SYSTEM.GET(20, root);r SYSTEM.GET(24, limit);s DEC(limit, 8000H)
04AFq(40000010): MOV R0, R0, 10H
04B0q(80000000): LDR R0, R0, 0H
04B1q(A0D00024): STR R0, SB, 24H
04B2r(40000014): MOV R0, R0, 14H
04B3r(80000000): LDR R0, R0, 0H
04B4r(A0D00018): STR R0, SB, 18H
04B5s(40000018): MOV R0, R0, 18H
04B6s(80000000): LDR R0, R0, 0H
04B7s(A0D0006C): STR R0, SB, 6CH
ENDt Init;
04B8t(40D8006C): ADD R0, SB, 6CH
04B9t(81000000): LDR R1, R0, 0H
04BAt(41198000): SUB R1, R1, FFFF8000H
04BBt(A1000000): STR R1, R0, 0H
04BCt(8FE00000): LDR LNK, SP, 0H
04BDt(4EE80004): ADD SP, SP, 4H
04BEt(C700000F): B LNK
BEGINu Init;v Load("Oberon",w M)x;y
04BFu .PROC 0
04BFu .ENTRYPOINT
04BFu(4EE90004): SUB SP, SP, 4H
04C0u(AFE00000): STR LNK, SP, 0H
04C1v(F7FFFFE7): BL -25 [04A9H]
04C2w .FIXUP D
04C2w(8D000015): LDR SB, MT, MOD0 [Modules]
04C3w(40D80070): ADD R0, SB, 70H ["Oberon"]
04C4w(41000007): MOV R1, R0, 7H
04C5x(42D8001C): ADD R2, SB, 1CH
04C6y(F7FFFBE4): BL -1052 [00ABH]
LED(res);z REPEAT UNTIL FALSE (*only if load fails*)
04C7z .FIXUP D
04C7z(8D000005): LDR SB, MT, MOD0 [Modules]
04C8z(80D00028): LDR R0, SB, 28H [data]
04C9z(5100FFC4): MOV R1, R0, FFFFFFC4H
04CAz(A0100000): STR R0, R1, 0H
ENDa Modules.b
04CBa(E7FFFFFF): B -1 [04CBH]
04CCb(8FE00000): LDR LNK, SP, 0H
04CDb(4EE80004): ADD SP, SP, 4H
04CEb(C700000F): B LNK