Files

Used Exports

BUILTINS: ASR ASSERT BOOLEAN BYTE CHAR CHR DEC INC INTEGER LEN NEW ORD REAL ROR SET
FileDir: DataSector Delete ExTabSize FileHd FileHeader FileHeader.aleng FileHeader.bleng FileHeader.date FileHeader.ext FileHeader.mark FileHeader.name FileHeader.sec FileName FnLength HeaderMark HeaderSize IndexSector IndexSize Init Insert Search SecTabSize SectorSize SectorTable
Kernel: AllocSector Clock FreeSector GetSector Init PutSector
SYSTEM: ADR GET PUT VAL

MODULE Files; (*NW 11.1.86 / 22.9.93 / 25.5.95 / 25.12.95 / 15.8.2013*)
.MODULE Files (KEY 73F5D686, VERSION 1, SIZE 00002620)
.IMPORT Kernel (KEY 97E012DD)
.IMPORT FileDir (KEY AF8E65FF)
.TYPEDESC 00000020 FFFFFFFF FFFFFFFF FFFFFFFF 00000014 00000008 FFFFFFFF 00000200 FFFFFFFF FFFFFFFF FFFFFFFF 00000040 00000044 00000048 0000004C 00000050 00000054 00000058 0000005C 00000060 00000064 00000068 0000006C 00000014 FFFFFFFF 00000500 FFFFFFFF FFFFFFFF FFFFFFFF 0000000C FFFFFFFF 00000500 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
.DATA 4H
.FIXUP T 0H
IMPORT SYSTEM, Kernel, FileDir;
(*A file consists of a sequence of pages. The first page
contains the header. Part of the header is the page table, an array
of disk addresses to the pages. A file is referenced through riders.
A rider indicates a current position and refers to a file*)
CONST MaxBufs = 4;
HS = FileDir.HeaderSize;
SS = FileDir.SectorSize;
STS = FileDir.SecTabSize;
XS = FileDir.IndexSize;
TYPE DiskAdr = INTEGER;
File* = POINTER TO FileDesc;
Buffer = POINTER TO BufferRecord;
Index = POINTER TO IndexRecord;
Rider* =
RECORD eof*: BOOLEAN;
res*: INTEGER;
file: File;
apos, bpos: INTEGER;
buf: Buffer
END ;
FileDesc =
RECORD next: INTEGER; (*list of files invisible to the GC*)
nofbufs, aleng, bleng: INTEGER;
modH, registered: BOOLEAN;
firstbuf: Buffer;
sechint: DiskAdr;
name: FileDir.FileName;
date: INTEGER;
ext: ARRAY FileDir.ExTabSize OF Index;
sec: FileDir.SectorTable
END ;
BufferRecord =
RECORD apos, lim: INTEGER;
mod: BOOLEAN;
next: Buffer;
data: FileDir.DataSector
END ;
IndexRecord =
RECORD adr: DiskAdr;
mod: BOOLEAN;
sec: FileDir.IndexSector
END ;
(*aleng * SS + bleng = length (including header)
apos * SS + bpos = current position
0 <= bpos <= lim <= SS
0 <= apos <= aleng < PgTabSize
(apos < aleng) & (lim = SS) OR (apos = aleng) *)
VAR root: INTEGER (*File*); (*list of open files*)
PROCEDURE Check(s: ARRAY OF CHAR;
VAR name: FileDir.FileName; VAR res: INTEGER);
VAR i: INTEGER; ch: CHAR;
BEGINa ch := s[0]b;c i := 0;d
0000a .PROC 1
0000a(4EE9001C): SUB SP, SP, 1CH
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
0006b(40000000): MOV R0, R0, 0H
0007b(81E00008): LDR R1, SP, 8H
0008b(01090001): SUB R1, R0, R1
0009b(DA074D1C): BLCC MT [trap=1, pos=1869]
000Ab(81E00004): LDR R1, SP, 4H
000Bb(00180000): ADD R0, R1, R0
000Cc(90000000): LDR R0, R0, 0H
000Dc(B0E00018): STR R0, SP, 18H
000Ed(40000000): MOV R0, R0, 0H
000Fd(A0E00014): STR R0, SP, 14H
IF (ch >= "A")e & (fch <= "Z")g OR (hch >= "a")i & (jch <= "z")k THENl
0010e(90E00018): LDR R0, SP, 18H
0011e(40090041): SUB R0, R0, 41H
0012f(E5000003): BLT 3 [0016H]
0013g(90E00018): LDR R0, SP, 18H
0014g(4009005A): SUB R0, R0, 5AH
0015h(E6000006): BLE 6 [001CH]
0016i(90E00018): LDR R0, SP, 18H
0017i(40090061): SUB R0, R0, 61H
0018j(E500004C): BLT 76 [0065H]
0019k(90E00018): LDR R0, SP, 18H
001Ak(4009007A): SUB R0, R0, 7AH
001Bl(EE000049): BGT 73 [0065H]
REPEAT name[i]m := ch;n INC(i);o ch := s[i]p
001Cm(80E00014): LDR R0, SP, 14H
001Dm(41090020): SUB R1, R0, 20H
001Em(DA07AE1C): BLCC MT [trap=1, pos=1966]
001Fm(81E0000C): LDR R1, SP, CH
0020m(00180000): ADD R0, R1, R0
0021n(91E00018): LDR R1, SP, 18H
0022n(B1000000): STR R1, R0, 0H
0023o(80E00014): LDR R0, SP, 14H
0024o(40080001): ADD R0, R0, 1H
0025o(A0E00014): STR R0, SP, 14H
0026p(80E00014): LDR R0, SP, 14H
0027p(81E00008): LDR R1, SP, 8H
0028p(01090001): SUB R1, R0, R1
0029p(DA07C81C): BLCC MT [trap=1, pos=1992]
002Ap(81E00004): LDR R1, SP, 4H
002Bp(00180000): ADD R0, R1, R0
UNTILq ~((ch >= "0")r & (sch <= "9")t OR (uch >= "A")v & (wch <= "Z")x
002Cq(90000000): LDR R0, R0, 0H
002Dq(B0E00018): STR R0, SP, 18H
002Er(90E00018): LDR R0, SP, 18H
002Fr(40090030): SUB R0, R0, 30H
0030s(E5000003): BLT 3 [0034H]
0031t(90E00018): LDR R0, SP, 18H
0032t(40090039): SUB R0, R0, 39H
0033u(E600000F): BLE 15 [0043H]
0034v(90E00018): LDR R0, SP, 18H
0035v(40090041): SUB R0, R0, 41H
0036w(E5000003): BLT 3 [003AH]
0037x(90E00018): LDR R0, SP, 18H
0038x(4009005A): SUB R0, R0, 5AH
OR (ych >= "a")z & (ach <= "z")b OR (cch = ".")d) OR (ei = FileDir.FnLength)f;g
0039y(E6000009): BLE 9 [0043H]
003Az(90E00018): LDR R0, SP, 18H
003Bz(40090061): SUB R0, R0, 61H
003Ca(E5000003): BLT 3 [0040H]
003Db(90E00018): LDR R0, SP, 18H
003Eb(4009007A): SUB R0, R0, 7AH
003Fc(E6000003): BLE 3 [0043H]
0040d(90E00018): LDR R0, SP, 18H
0041d(4009002E): SUB R0, R0, 2EH
0042e(E9000003): BNE 3 [0046H]
0043f(80E00014): LDR R0, SP, 14H
0044f(40090020): SUB R0, R0, 20H
0045g(E9FFFFD6): BNE -42 [001CH]
IF i = FileDir.FnLength THENh res := 4
0046h(80E00014): LDR R0, SP, 14H
0047h(40090020): SUB R0, R0, 20H
0048h(E9000004): BNE 4 [004DH]
ELSIFi chj = 0X THENk res := 0;l
0049i(40000004): MOV R0, R0, 4H
004Ai(81E00010): LDR R1, SP, 10H
004Bi(A0100000): STR R0, R1, 0H
004Cj(E7000017): B 23 [0064H]
004Dk(90E00018): LDR R0, SP, 18H
004Ek(E9000012): BNE 18 [0061H]
004Fl(40000000): MOV R0, R0, 0H
0050l(81E00010): LDR R1, SP, 10H
0051l(A0100000): STR R0, R1, 0H
WHILE i < FileDir.FnLength DOm name[i]n := 0X;o INC(i) ENDp
0052m(80E00014): LDR R0, SP, 14H
0053m(40090020): SUB R0, R0, 20H
0054m(ED00000B): BGE 11 [0060H]
0055n(80E00014): LDR R0, SP, 14H
0056n(41090020): SUB R1, R0, 20H
0057n(DA08D91C): BLCC MT [trap=1, pos=2265]
0058n(81E0000C): LDR R1, SP, CH
0059n(00180000): ADD R0, R1, R0
005Ao(41000000): MOV R1, R0, 0H
005Bo(B1000000): STR R1, R0, 0H
005Cp(80E00014): LDR R0, SP, 14H
005Dp(40080001): ADD R0, R0, 1H
005Ep(A0E00014): STR R0, SP, 14H
005Fp(E7FFFFF2): B -14 [0052H]
ELSE resq := 5
0060q(E7000003): B 3 [0064H]
ENDr
0061r(40000005): MOV R0, R0, 5H
0062r(81E00010): LDR R1, SP, 10H
0063r(A0100000): STR R0, R1, 0H
ELSIF chs = 0X THENt name[0] := 0X;u res := -1
0064s(E700000C): B 12 [0071H]
0065t(90E00018): LDR R0, SP, 18H
0066t(E9000007): BNE 7 [006EH]
0067u(40000000): MOV R0, R0, 0H
0068u(81E0000C): LDR R1, SP, CH
0069u(B0100000): STR R0, R1, 0H
ELSEv resw := 3
006Av(5000FFFF): MOV R0, R0, FFFFFFFFH
006Bv(81E00010): LDR R1, SP, 10H
006Cv(A0100000): STR R0, R1, 0H
006Dw(E7000003): B 3 [0071H]
ENDx
006Ex(40000003): MOV R0, R0, 3H
006Fx(81E00010): LDR R1, SP, 10H
0070x(A0100000): STR R0, R1, 0H
ENDy Check;
0071y(8FE00000): LDR LNK, SP, 0H
0072y(4EE8001C): ADD SP, SP, 1CH
0073y(C700000F): B LNK
PROCEDURE Old*(name: ARRAY OF CHAR): File;
VAR i, k, res: INTEGER;
f: File;
header: DiskAdr;
buf: Buffer;
F: FileDir.FileHd;
namebuf: FileDir.FileName;
inxpg: Index;
BEGINz f := NIL;a Check(name,b namebuf,c res)d;e
0074z .PROC 2
0074z(4EE9004C): SUB SP, SP, 4CH
0075z(AFE00000): STR LNK, SP, 0H
0076z(A0E00004): STR R0, SP, 4H
0077z(A1E00008): STR R1, SP, 8H
0078a(40000000): MOV R0, R0, 0H
0079a(A0E00018): STR R0, SP, 18H
007Ab(80E00004): LDR R0, SP, 4H
007Bb(81E00008): LDR R1, SP, 8H
007Cc(42E80028): ADD R2, SP, 28H
007Dd(43E80014): ADD R3, SP, 14H
007Ee(F7FFFF81): BL -127 [0000H]
IF res = 0 THENf
007Ff(80E00014): LDR R0, SP, 14H
0080f(E90000D2): BNE 210 [0153H]
FileDir.Search(namebuf,g header)h;i
0081g(40E80028): ADD R0, SP, 28H
0082h(41E8001C): ADD R1, SP, 1CH
0083i .FIXUP P
0083i(F7204083): BL MOD2 [FileDir] PROC4
IF header # 0 THENj
0084j(80E0001C): LDR R0, SP, 1CH
0085j(E10000CD): BEQ 205 [0153H]
f := SYSTEM.VAL(File, root);k
0086k .FIXUP D
0086k(8D000086): LDR SB, MT, MOD0 [Files]
0087k(80D00090): LDR R0, SB, 90H [data]
0088k(A0E00018): STR R0, SP, 18H
WHILE (f # NIL)l & (mf.secn[0] # header)o DOp f := SYSTEM.VAL(File, f.nextq) ENDr ;
0089l(80E00018): LDR R0, SP, 18H
008Am(E100000B): BEQ 11 [0096H]
008Bn(80E00018): LDR R0, SP, 18H
008Cn(D10AF84C): BLEQ MT [trap=4, pos=2808]
008Do(80000070): LDR R0, R0, 70H
008Eo(81E0001C): LDR R1, SP, 1CH
008Fo(00090001): SUB R0, R0, R1
0090p(E1000005): BEQ 5 [0096H]
0091q(80E00018): LDR R0, SP, 18H
0092q(D10B254C): BLEQ MT [trap=4, pos=2853]
0093r(80000000): LDR R0, R0, 0H
0094r(A0E00018): STR R0, SP, 18H
0095r(E7FFFFF3): B -13 [0089H]
IF f = NIL THENs (*file not yet present*)
0096s(80E00018): LDR R0, SP, 18H
0097s(E90000BB): BNE 187 [0153H]
NEW(buf);t buf.aposu := 0;v buf.nextw := buf;x buf.mody := FALSE;z
0098t(40E80020): ADD R0, SP, 20H
0099t .FIXUP D
0099t(8D000013): LDR SB, MT, MOD0 [Files]
009At(41D80064): ADD R1, SB, 64H [data]
009Bt(D70B710C): BL MT [trap=0, pos=2929]
009Cu(80E00020): LDR R0, SP, 20H
009Du(D10B7A4C): BLEQ MT [trap=4, pos=2938]
009Ev(41000000): MOV R1, R0, 0H
009Fv(A1000000): STR R1, R0, 0H
00A0w(80E00020): LDR R0, SP, 20H
00A1w(D10B894C): BLEQ MT [trap=4, pos=2953]
00A2x(81E00020): LDR R1, SP, 20H
00A3x(A100000C): STR R1, R0, CH
00A4y(80E00020): LDR R0, SP, 20H
00A5y(D10B994C): BLEQ MT [trap=4, pos=2969]
00A6z(41000000): MOV R1, R0, 0H
00A7z(B1000008): STR R1, R0, 8H
F := SYSTEM.VAL(FileDir.FileHd, SYSTEM.ADR(buf.dataa))b;c
00A8a(80E00020): LDR R0, SP, 20H
00A9a(D10BE14C): BLEQ MT [trap=4, pos=3041]
00AAb(40080010): ADD R0, R0, 10H
00ABc(A0E00024): STR R0, SP, 24H
Kernel.GetSector(header,d buf.datae)f;g ASSERT(F.markh = FileDir.HeaderMark)i;j
00ACd(80E0001C): LDR R0, SP, 1CH
00ADe(81E00020): LDR R1, SP, 20H
00AEe(D10C104C): BLEQ MT [trap=4, pos=3088]
00AFf(41180010): ADD R1, R1, 10H
00B0g .FIXUP P
00B0g(F710F02D): BL MOD1 [Kernel] PROC15
00B1h(80E00024): LDR R0, SP, 24H
00B2h(D10C204C): BLEQ MT [trap=4, pos=3104]
00B3i(80000000): LDR R0, R0, 0H
00B4i(71009BA7): MOV' R1, R0, FFFF9BA7H
00B5i(41161D86): IOR R1, R1, 1D86H
00B6i(00090001): SUB R0, R0, R1
00B7j(D90C377C): BLNE MT [trap=7, pos=3127]
NEW(f);k f.alengl := F.alengm;n f.blengo := F.blengp;q f.dater := F.dates;t
00B8k(40E80018): ADD R0, SP, 18H
00B9k .FIXUP D
00B9k(8D000020): LDR SB, MT, MOD0 [Files]
00BAk(41D8001C): ADD R1, SB, 1CH [data]
00BBk(D70C490C): BL MT [trap=0, pos=3145]
00BCl(80E00018): LDR R0, SP, 18H
00BDl(D10C514C): BLEQ MT [trap=4, pos=3153]
00BEm(81E00024): LDR R1, SP, 24H
00BFm(D10C5C4C): BLEQ MT [trap=4, pos=3164]
00C0n(81100024): LDR R1, R1, 24H
00C1n(A1000008): STR R1, R0, 8H
00C2o(80E00018): LDR R0, SP, 18H
00C3o(D10C654C): BLEQ MT [trap=4, pos=3173]
00C4p(81E00024): LDR R1, SP, 24H
00C5p(D10C704C): BLEQ MT [trap=4, pos=3184]
00C6q(81100028): LDR R1, R1, 28H
00C7q(A100000C): STR R1, R0, CH
00C8r(80E00018): LDR R0, SP, 18H
00C9r(D10C784C): BLEQ MT [trap=4, pos=3192]
00CAs(81E00024): LDR R1, SP, 24H
00CBs(D10C824C): BLEQ MT [trap=4, pos=3202]
00CCt(8110002C): LDR R1, R1, 2CH
00CDt(A100003C): STR R1, R0, 3CH
IF f.alengu = 0 THENv buf.limw := f.blengx ELSEy bufz.lima := SS ENDb ;
00CEu(80E00018): LDR R0, SP, 18H
00CFu(D10C984C): BLEQ MT [trap=4, pos=3224]
00D0v(80000008): LDR R0, R0, 8H
00D1v(E9000007): BNE 7 [00D9H]
00D2w(80E00020): LDR R0, SP, 20H
00D3w(D10CA94C): BLEQ MT [trap=4, pos=3241]
00D4x(81E00018): LDR R1, SP, 18H
00D5x(D10CB44C): BLEQ MT [trap=4, pos=3252]
00D6y(8110000C): LDR R1, R1, CH
00D7y(A1000004): STR R1, R0, 4H
00D8z(E7000004): B 4 [00DDH]
00D9a(80E00020): LDR R0, SP, 20H
00DAa(D10CC14C): BLEQ MT [trap=4, pos=3265]
00DBb(41000400): MOV R1, R0, 400H
00DCb(A1000004): STR R1, R0, 4H
f.firstbufc := buf;d f.nofbufse := 1;f f.nameg := namebuf;h f.registeredi := TRUE;j
00DDc(80E00018): LDR R0, SP, 18H
00DEc(D10CE24C): BLEQ MT [trap=4, pos=3298]
00DFd(81E00020): LDR R1, SP, 20H
00E0d(A1000014): STR R1, R0, 14H
00E1e(80E00018): LDR R0, SP, 18H
00E2e(D10CF44C): BLEQ MT [trap=4, pos=3316]
00E3f(41000001): MOV R1, R0, 1H
00E4f(A1000004): STR R1, R0, 4H
00E5g(80E00018): LDR R0, SP, 18H
00E6g(D10D014C): BLEQ MT [trap=4, pos=3329]
00E7h(4008001C): ADD R0, R0, 1CH
00E8h(41E80028): ADD R1, SP, 28H
00E9h(42000008): MOV R2, R0, 8H
00EAh(83100000): LDR R3, R1, 0H
00EBh(41180004): ADD R1, R1, 4H
00ECh(A3000000): STR R3, R0, 0H
00EDh(40080004): ADD R0, R0, 4H
00EEh(42290001): SUB R2, R2, 1H
00EFh(E9FFFFFA): BNE -6 [00EAH]
00F0i(80E00018): LDR R0, SP, 18H
00F1i(D10D1A4C): BLEQ MT [trap=4, pos=3354]
00F2j(41000001): MOV R1, R0, 1H
00F3j(B1000011): STR R1, R0, 11H
f.seck := F.secl;m
00F4k(80E00018): LDR R0, SP, 18H
00F5k(D10D334C): BLEQ MT [trap=4, pos=3379]
00F6l(81E00024): LDR R1, SP, 24H
00F7l(D10D3C4C): BLEQ MT [trap=4, pos=3388]
00F8m(40080070): ADD R0, R0, 70H
00F9m(41180060): ADD R1, R1, 60H
00FAm(42000040): MOV R2, R0, 40H
00FBm(83100000): LDR R3, R1, 0H
00FCm(41180004): ADD R1, R1, 4H
00FDm(A3000000): STR R3, R0, 0H
00FEm(40080004): ADD R0, R0, 4H
00FFm(42290001): SUB R2, R2, 1H
0100m(E9FFFFFA): BNE -6 [00FBH]
k := (f.alengn + (XS-STS))o DIV XS;p i := 0;q
0101n(80E00018): LDR R0, SP, 18H
0102n(D10D554C): BLEQ MT [trap=4, pos=3413]
0103o(80000008): LDR R0, R0, 8H
0104o(400800C0): ADD R0, R0, C0H
0105p(40020008): ASR R0, R0, 8H
0106p(A0E00010): STR R0, SP, 10H
0107q(40000000): MOV R0, R0, 0H
0108q(A0E0000C): STR R0, SP, CH
WHILE i < k DOr
0109r(80E0000C): LDR R0, SP, CH
010Ar(81E00010): LDR R1, SP, 10H
010Br(00090001): SUB R0, R0, R1
010Cr(ED000027): BGE 39 [0134H]
NEW(inxpg);s inxpg.adrt := F.extu[i]v;w inxpg.modx := FALSE;y
010Ds(40E80048): ADD R0, SP, 48H
010Es .FIXUP D
010Es(8D000055): LDR SB, MT, MOD0 [Files]
010Fs(41D8007C): ADD R1, SB, 7CH [data]
0110s(D70DA20C): BL MT [trap=0, pos=3490]
0111t(80E00048): LDR R0, SP, 48H
0112t(D10DAC4C): BLEQ MT [trap=4, pos=3500]
0113u(81E00024): LDR R1, SP, 24H
0114u(D10DB54C): BLEQ MT [trap=4, pos=3509]
0115v(82E0000C): LDR R2, SP, CH
0116v(4329000C): SUB R3, R2, CH
0117v(DA0DB81C): BLCC MT [trap=1, pos=3512]
0118v(42210002): LSL R2, R2, 2H
0119v(01180002): ADD R1, R1, R2
011Aw(81100030): LDR R1, R1, 30H
011Bw(A1000000): STR R1, R0, 0H
011Cx(80E00048): LDR R0, SP, 48H
011Dx(D10DC34C): BLEQ MT [trap=4, pos=3523]
011Ey(41000000): MOV R1, R0, 0H
011Fy(B1000004): STR R1, R0, 4H
Kernel.GetSector(inxpg.adrz,a inxpg.secb)c;d f.exte[i]f := inxpg;g INC(i)
0120z(80E00048): LDR R0, SP, 48H
0121z(D10DF44C): BLEQ MT [trap=4, pos=3572]
0122a(80000000): LDR R0, R0, 0H
0123b(81E00048): LDR R1, SP, 48H
0124b(D10DFF4C): BLEQ MT [trap=4, pos=3583]
0125c(41180008): ADD R1, R1, 8H
0126d .FIXUP P
0126d(F710F076): BL MOD1 [Kernel] PROC15
0127e(80E00018): LDR R0, SP, 18H
0128e(D10E074C): BLEQ MT [trap=4, pos=3591]
0129f(81E0000C): LDR R1, SP, CH
012Af(4219000C): SUB R2, R1, CH
012Bf(DA0E0A1C): BLCC MT [trap=1, pos=3594]
012Cf(41110002): LSL R1, R1, 2H
012Df(00080001): ADD R0, R0, R1
012Eg(81E00048): LDR R1, SP, 48H
012Fg(A1000040): STR R1, R0, 40H
ENDh ;
0130h(80E0000C): LDR R0, SP, CH
0131h(40080001): ADD R0, R0, 1H
0132h(A0E0000C): STR R0, SP, CH
0133h(E7FFFFD5): B -43 [0109H]
WHILE i < FileDir.ExTabSize DOi f.extj[i]k := NIL;l INC(i) ENDm ;
0134i(80E0000C): LDR R0, SP, CH
0135i(4009000C): SUB R0, R0, CH
0136i(ED00000D): BGE 13 [0144H]
0137j(80E00018): LDR R0, SP, 18H
0138j(D10E5A4C): BLEQ MT [trap=4, pos=3674]
0139k(81E0000C): LDR R1, SP, CH
013Ak(4219000C): SUB R2, R1, CH
013Bk(DA0E5D1C): BLCC MT [trap=1, pos=3677]
013Ck(41110002): LSL R1, R1, 2H
013Dk(00080001): ADD R0, R0, R1
013El(41000000): MOV R1, R0, 0H
013Fl(A1000040): STR R1, R0, 40H
0140m(80E0000C): LDR R0, SP, CH
0141m(40080001): ADD R0, R0, 1H
0142m(A0E0000C): STR R0, SP, CH
0143m(E7FFFFF0): B -16 [0134H]
f.sechintn := header;o f.modHp := FALSE;q f.nextr := root;s root := SYSTEM.VAL(INTEGER, f)
0144n(80E00018): LDR R0, SP, 18H
0145n(D10E864C): BLEQ MT [trap=4, pos=3718]
0146o(81E0001C): LDR R1, SP, 1CH
0147o(A1000018): STR R1, R0, 18H
0148p(80E00018): LDR R0, SP, 18H
0149p(D10E984C): BLEQ MT [trap=4, pos=3736]
014Aq(41000000): MOV R1, R0, 0H
014Bq(B1000010): STR R1, R0, 10H
014Cr(80E00018): LDR R0, SP, 18H
014Dr(D10EA94C): BLEQ MT [trap=4, pos=3753]
014Es .FIXUP D
014Es(8D000040): LDR SB, MT, MOD0 [Files]
014Fs(81D00090): LDR R1, SB, 90H [data]
0150s(A1000000): STR R1, R0, 0H
ENDt
0151t(80E00018): LDR R0, SP, 18H
0152t(A0D00090): STR R0, SB, 90H
END
END ;
RETURN f
ENDu Old;
0153u(80E00018): LDR R0, SP, 18H
0154u(8FE00000): LDR LNK, SP, 0H
0155u(4EE8004C): ADD SP, SP, 4CH
0156u(C700000F): B LNK
PROCEDURE New*(name: ARRAY OF CHAR): File;
VAR i, res: INTEGER;
f: File;
buf: Buffer;
F: FileDir.FileHd;
namebuf: FileDir.FileName;
BEGINv f := NIL;w Check(name,x namebuf,y res)z;a
0157v .PROC 3
0157v(4EE90040): SUB SP, SP, 40H
0158v(AFE00000): STR LNK, SP, 0H
0159v(A0E00004): STR R0, SP, 4H
015Av(A1E00008): STR R1, SP, 8H
015Bw(40000000): MOV R0, R0, 0H
015Cw(A0E00014): STR R0, SP, 14H
015Dx(80E00004): LDR R0, SP, 4H
015Ex(81E00008): LDR R1, SP, 8H
015Fy(42E80020): ADD R2, SP, 20H
0160z(43E80010): ADD R3, SP, 10H
0161a(F7FFFE9E): BL -354 [0000H]
IF res <= 0 THENb
0162b(80E00010): LDR R0, SP, 10H
0163b(40090000): SUB R0, R0, 0H
0164b(EE00009E): BGT 158 [0203H]
NEW(buf);c buf.aposd := 0;e buf.modf := TRUE;g buf.limh := HS;i buf.nextj := buf;k
0165c(40E80018): ADD R0, SP, 18H
0166c .FIXUP D
0166c(8D000018): LDR SB, MT, MOD0 [Files]
0167c(41D80064): ADD R1, SB, 64H [data]
0168c(D70FFE0C): BL MT [trap=0, pos=4094]
0169d(80E00018): LDR R0, SP, 18H
016Ad(D110074C): BLEQ MT [trap=4, pos=4103]
016Be(41000000): MOV R1, R0, 0H
016Ce(A1000000): STR R1, R0, 0H
016Df(80E00018): LDR R0, SP, 18H
016Ef(D110154C): BLEQ MT [trap=4, pos=4117]
016Fg(41000001): MOV R1, R0, 1H
0170g(B1000008): STR R1, R0, 8H
0171h(80E00018): LDR R0, SP, 18H
0172h(D110264C): BLEQ MT [trap=4, pos=4134]
0173i(41000160): MOV R1, R0, 160H
0174i(A1000004): STR R1, R0, 4H
0175j(80E00018): LDR R0, SP, 18H
0176j(D110364C): BLEQ MT [trap=4, pos=4150]
0177k(81E00018): LDR R1, SP, 18H
0178k(A100000C): STR R1, R0, CH
F := SYSTEM.VAL(FileDir.FileHd, SYSTEM.ADR(buf.datal))m;n
0179l(80E00018): LDR R0, SP, 18H
017Al(D110784C): BLEQ MT [trap=4, pos=4216]
017Bm(40080010): ADD R0, R0, 10H
017Cn(A0E0001C): STR R0, SP, 1CH
F.marko := FileDir.HeaderMark;p
017Do(80E0001C): LDR R0, SP, 1CH
017Eo(D110884C): BLEQ MT [trap=4, pos=4232]
017Fp(61009BA7): MOV' R1, R0, FFFF9BA7H
0180p(41161D86): IOR R1, R1, 1D86H
0181p(A1000000): STR R1, R0, 0H
F.alengq := 0;r F.blengs := HS;t F.nameu := namebuf;v
0182q(80E0001C): LDR R0, SP, 1CH
0183q(D110AD4C): BLEQ MT [trap=4, pos=4269]
0184r(41000000): MOV R1, R0, 0H
0185r(A1000024): STR R1, R0, 24H
0186s(80E0001C): LDR R0, SP, 1CH
0187s(D110BB4C): BLEQ MT [trap=4, pos=4283]
0188t(41000160): MOV R1, R0, 160H
0189t(A1000028): STR R1, R0, 28H
018Au(80E0001C): LDR R0, SP, 1CH
018Bu(D110C94C): BLEQ MT [trap=4, pos=4297]
018Cv(40080004): ADD R0, R0, 4H
018Dv(41E80020): ADD R1, SP, 20H
018Ev(42000008): MOV R2, R0, 8H
018Fv(83100000): LDR R3, R1, 0H
0190v(41180004): ADD R1, R1, 4H
0191v(A3000000): STR R3, R0, 0H
0192v(40080004): ADD R0, R0, 4H
0193v(42290001): SUB R2, R2, 1H
0194v(E9FFFFFA): BNE -6 [018FH]
F.datew := Kernel.Clock()x;y
0195w(80E0001C): LDR R0, SP, 1CH
0196w(D110E24C): BLEQ MT [trap=4, pos=4322]
0197x(4EE90004): SUB SP, SP, 4H
0198x(A0E00000): STR R0, SP, 0H
0199y .FIXUP P
0199y(F7112073): BL MOD1 [Kernel] PROC18
019Ay(01000000): MOV R1, R0, R0
019By(80E00000): LDR R0, SP, 0H
019Cy(4EE80004): ADD SP, SP, 4H
019Dy(A100002C): STR R1, R0, 2CH
NEW(f);z f.alenga := 0;b f.blengc := HS;d f.modHe := TRUE;f
019Ez(40E80014): ADD R0, SP, 14H
019Fz .FIXUP D
019Fz(8D000039): LDR SB, MT, MOD0 [Files]
01A0z(41D8001C): ADD R1, SB, 1CH [data]
01A1z(D711030C): BL MT [trap=0, pos=4355]
01A2a(80E00014): LDR R0, SP, 14H
01A3a(D1110B4C): BLEQ MT [trap=4, pos=4363]
01A4b(41000000): MOV R1, R0, 0H
01A5b(A1000008): STR R1, R0, 8H
01A6c(80E00014): LDR R0, SP, 14H
01A7c(D111194C): BLEQ MT [trap=4, pos=4377]
01A8d(41000160): MOV R1, R0, 160H
01A9d(A100000C): STR R1, R0, CH
01AAe(80E00014): LDR R0, SP, 14H
01ABe(D111274C): BLEQ MT [trap=4, pos=4391]
01ACf(41000001): MOV R1, R0, 1H
01ADf(B1000010): STR R1, R0, 10H
f.registeredg := FALSE;h f.datei := F.datej;k
01AEg(80E00014): LDR R0, SP, 14H
01AFg(D111434C): BLEQ MT [trap=4, pos=4419]
01B0h(41000000): MOV R1, R0, 0H
01B1h(B1000011): STR R1, R0, 11H
01B2i(80E00014): LDR R0, SP, 14H
01B3i(D111544C): BLEQ MT [trap=4, pos=4436]
01B4j(81E0001C): LDR R1, SP, 1CH
01B5j(D1115E4C): BLEQ MT [trap=4, pos=4446]
01B6k(8110002C): LDR R1, R1, 2CH
01B7k(A100003C): STR R1, R0, 3CH
f.firstbufl := buf;m f.nofbufsn := 1;o f.namep := namebuf;q f.sechintr := 0;s
01B8l(80E00014): LDR R0, SP, 14H
01B9l(D111704C): BLEQ MT [trap=4, pos=4464]
01BAm(81E00018): LDR R1, SP, 18H
01BBm(A1000014): STR R1, R0, 14H
01BCn(80E00014): LDR R0, SP, 14H
01BDn(D111824C): BLEQ MT [trap=4, pos=4482]
01BEo(41000001): MOV R1, R0, 1H
01BFo(A1000004): STR R1, R0, 4H
01C0p(80E00014): LDR R0, SP, 14H
01C1p(D1118F4C): BLEQ MT [trap=4, pos=4495]
01C2q(4008001C): ADD R0, R0, 1CH
01C3q(41E80020): ADD R1, SP, 20H
01C4q(42000008): MOV R2, R0, 8H
01C5q(83100000): LDR R3, R1, 0H
01C6q(41180004): ADD R1, R1, 4H
01C7q(A3000000): STR R3, R0, 0H
01C8q(40080004): ADD R0, R0, 4H
01C9q(42290001): SUB R2, R2, 1H
01CAq(E9FFFFFA): BNE -6 [01C5H]
01CBr(80E00014): LDR R0, SP, 14H
01CCr(D111A54C): BLEQ MT [trap=4, pos=4517]
01CDs(41000000): MOV R1, R0, 0H
01CEs(A1000018): STR R1, R0, 18H
i := 0;t
01CFt(40000000): MOV R0, R0, 0H
01D0t(A0E0000C): STR R0, SP, CH
REPEAT f.extu[i]v := NIL;w F.extx[i]y := 0;z INC(i) UNTILa i = FileDir.ExTabSize;b
01D1u(80E00014): LDR R0, SP, 14H
01D2u(D111CC4C): BLEQ MT [trap=4, pos=4556]
01D3v(81E0000C): LDR R1, SP, CH
01D4v(4219000C): SUB R2, R1, CH
01D5v(DA11CF1C): BLCC MT [trap=1, pos=4559]
01D6v(41110002): LSL R1, R1, 2H
01D7v(00080001): ADD R0, R0, R1
01D8w(41000000): MOV R1, R0, 0H
01D9w(A1000040): STR R1, R0, 40H
01DAx(80E0001C): LDR R0, SP, 1CH
01DBx(D111DD4C): BLEQ MT [trap=4, pos=4573]
01DCy(81E0000C): LDR R1, SP, CH
01DDy(4219000C): SUB R2, R1, CH
01DEy(DA11E01C): BLCC MT [trap=1, pos=4576]
01DFy(41110002): LSL R1, R1, 2H
01E0y(00080001): ADD R0, R0, R1
01E1z(41000000): MOV R1, R0, 0H
01E2z(A1000030): STR R1, R0, 30H
01E3a(80E0000C): LDR R0, SP, CH
01E4a(40080001): ADD R0, R0, 1H
01E5a(A0E0000C): STR R0, SP, CH
01E6b(80E0000C): LDR R0, SP, CH
01E7b(4009000C): SUB R0, R0, CH
01E8b(E9FFFFE8): BNE -24 [01D1H]
i := 0;c
01E9c(40000000): MOV R0, R0, 0H
01EAc(A0E0000C): STR R0, SP, CH
REPEAT f.secd[i]e := 0;f F.secg[i]h := 0;i INC(i) UNTILj i = STS
01EBd(80E00014): LDR R0, SP, 14H
01ECd(D1122B4C): BLEQ MT [trap=4, pos=4651]
01EDe(81E0000C): LDR R1, SP, CH
01EEe(42190040): SUB R2, R1, 40H
01EFe(DA122E1C): BLCC MT [trap=1, pos=4654]
01F0e(41110002): LSL R1, R1, 2H
01F1e(00080001): ADD R0, R0, R1
01F2f(41000000): MOV R1, R0, 0H
01F3f(A1000070): STR R1, R0, 70H
01F4g(80E0001C): LDR R0, SP, 1CH
01F5g(D1123A4C): BLEQ MT [trap=4, pos=4666]
01F6h(81E0000C): LDR R1, SP, CH
01F7h(42190040): SUB R2, R1, 40H
01F8h(DA123D1C): BLCC MT [trap=1, pos=4669]
01F9h(41110002): LSL R1, R1, 2H
01FAh(00080001): ADD R0, R0, R1
01FBi(41000000): MOV R1, R0, 0H
01FCi(A1000060): STR R1, R0, 60H
01FDj(80E0000C): LDR R0, SP, CH
01FEj(40080001): ADD R0, R0, 1H
01FFj(A0E0000C): STR R0, SP, CH
ENDk ;
0200k(80E0000C): LDR R0, SP, CH
0201k(40090040): SUB R0, R0, 40H
0202k(E9FFFFE8): BNE -24 [01EBH]
RETURN f
ENDl New;
0203l(80E00014): LDR R0, SP, 14H
0204l(8FE00000): LDR LNK, SP, 0H
0205l(4EE80040): ADD SP, SP, 40H
0206l(C700000F): B LNK
PROCEDURE UpdateHeader(f: File; VAR F: FileDir.FileHeader);
VAR k: INTEGER;
BEGINm F.aleng := f.alengn;o F.bleng := f.blengp;q
0207m(4EE90014): SUB SP, SP, 14H
0208m(AFE00000): STR LNK, SP, 0H
0209m(A0E00004): STR R0, SP, 4H
020Am(A1E00008): STR R1, SP, 8H
020Bm(A2E0000C): STR R2, SP, CH
020Cn(80E00004): LDR R0, SP, 4H
020Dn(D112E84C): BLEQ MT [trap=4, pos=4840]
020Eo(80000008): LDR R0, R0, 8H
020Fo(81E00008): LDR R1, SP, 8H
0210o(A0100024): STR R0, R1, 24H
0211p(80E00004): LDR R0, SP, 4H
0212p(D112FC4C): BLEQ MT [trap=4, pos=4860]
0213q(8000000C): LDR R0, R0, CH
0214q(81E00008): LDR R1, SP, 8H
0215q(A0100028): STR R0, R1, 28H
F.sec := f.secr;s k := (f.alengt + (XS-STS))u DIV XS;v
0216r(80E00004): LDR R0, SP, 4H
0217r(D113104C): BLEQ MT [trap=4, pos=4880]
0218s(81E00008): LDR R1, SP, 8H
0219s(41180060): ADD R1, R1, 60H
021As(40080070): ADD R0, R0, 70H
021Bs(42000040): MOV R2, R0, 40H
021Cs(83000000): LDR R3, R0, 0H
021Ds(40080004): ADD R0, R0, 4H
021Es(A3100000): STR R3, R1, 0H
021Fs(41180004): ADD R1, R1, 4H
0220s(42290001): SUB R2, R2, 1H
0221s(E9FFFFFA): BNE -6 [021CH]
0222t(80E00004): LDR R0, SP, 4H
0223t(D1131F4C): BLEQ MT [trap=4, pos=4895]
0224u(80000008): LDR R0, R0, 8H
0225u(400800C0): ADD R0, R0, C0H
0226v(40020008): ASR R0, R0, 8H
0227v(A0E00010): STR R0, SP, 10H
WHILE k > 0 DOw DEC(k);x F.ext[k]y := f.extz[k]a.adrb ENDc
0228w(80E00010): LDR R0, SP, 10H
0229w(40090000): SUB R0, R0, 0H
022Aw(E6000015): BLE 21 [0240H]
022Bx(80E00010): LDR R0, SP, 10H
022Cx(40090001): SUB R0, R0, 1H
022Dx(A0E00010): STR R0, SP, 10H
022Ey(80E00010): LDR R0, SP, 10H
022Fy(4109000C): SUB R1, R0, CH
0230y(DA13571C): BLCC MT [trap=1, pos=4951]
0231y(40010002): LSL R0, R0, 2H
0232y(81E00008): LDR R1, SP, 8H
0233y(00180000): ADD R0, R1, R0
0234z(81E00004): LDR R1, SP, 4H
0235z(D113604C): BLEQ MT [trap=4, pos=4960]
0236a(82E00010): LDR R2, SP, 10H
0237a(4329000C): SUB R3, R2, CH
0238a(DA13631C): BLCC MT [trap=1, pos=4963]
0239a(42210002): LSL R2, R2, 2H
023Aa(01180002): ADD R1, R1, R2
023Bb(81100040): LDR R1, R1, 40H
023Cb(D113674C): BLEQ MT [trap=4, pos=4967]
023Dc(81100000): LDR R1, R1, 0H
023Ec(A1000030): STR R1, R0, 30H
023Fc(E7FFFFE8): B -24 [0228H]
ENDd UpdateHeader;
0240d(8FE00000): LDR LNK, SP, 0H
0241d(4EE80014): ADD SP, SP, 14H
0242d(C700000F): B LNK
PROCEDURE ReadBuf(f: File; buf: Buffer; pos: INTEGER);
VAR sec: DiskAdr;
BEGINe
0243e(4EE90014): SUB SP, SP, 14H
0244e(AFE00000): STR LNK, SP, 0H
0245e(A0E00004): STR R0, SP, 4H
0246e(A1E00008): STR R1, SP, 8H
0247e(A2E0000C): STR R2, SP, CH
IF pos < STS THENf sec := f.secg[pos]h
0248f(80E0000C): LDR R0, SP, CH
0249f(40090040): SUB R0, R0, 40H
024Af(ED00000A): BGE 10 [0255H]
024Bg(80E00004): LDR R0, SP, 4H
024Cg(D113FA4C): BLEQ MT [trap=4, pos=5114]
024Dh(81E0000C): LDR R1, SP, CH
024Eh(42190040): SUB R2, R1, 40H
024Fh(DA13FF1C): BLCC MT [trap=1, pos=5119]
0250h(41110002): LSL R1, R1, 2H
0251h(00080001): ADD R0, R0, R1
ELSEi secj := f.extk[(pos-STS)l DIV XS]m.secn[(pos-STS)o MOD XS]p
0252i(80000070): LDR R0, R0, 70H
0253i(A0E00010): STR R0, SP, 10H
0254j(E7000014): B 20 [0269H]
0255k(80E00004): LDR R0, SP, 4H
0256k(D114154C): BLEQ MT [trap=4, pos=5141]
0257l(81E0000C): LDR R1, SP, CH
0258l(41190040): SUB R1, R1, 40H
0259m(41120008): ASR R1, R1, 8H
025Am(4219000C): SUB R2, R1, CH
025Bm(DA14271C): BLCC MT [trap=1, pos=5159]
025Cm(41110002): LSL R1, R1, 2H
025Dm(00080001): ADD R0, R0, R1
025En(80000040): LDR R0, R0, 40H
025Fn(D1142B4C): BLEQ MT [trap=4, pos=5163]
0260o(81E0000C): LDR R1, SP, CH
0261o(41190040): SUB R1, R1, 40H
0262p(411400FF): AND R1, R1, FFH
0263p(42190100): SUB R2, R1, 100H
0264p(DA143D1C): BLCC MT [trap=1, pos=5181]
0265p(41110002): LSL R1, R1, 2H
0266p(00080001): ADD R0, R0, R1
ENDq ;
0267q(80000008): LDR R0, R0, 8H
0268q(A0E00010): STR R0, SP, 10H
Kernel.GetSector(sec,r buf.datas)t;u
0269r(80E00010): LDR R0, SP, 10H
026As(81E00008): LDR R1, SP, 8H
026Bs(D1146A4C): BLEQ MT [trap=4, pos=5226]
026Ct(41180010): ADD R1, R1, 10H
026Du .FIXUP P
026Du(F710F0D4): BL MOD1 [Kernel] PROC15
IF pos < f.alengv THENw buf.limx := SS ELSEy bufz.lima := f.blengb ENDc ;
026Ev(80E00004): LDR R0, SP, 4H
026Fv(D114814C): BLEQ MT [trap=4, pos=5249]
0270w(81E0000C): LDR R1, SP, CH
0271w(80000008): LDR R0, R0, 8H
0272w(01190000): SUB R1, R1, R0
0273w(ED000005): BGE 5 [0279H]
0274x(80E00008): LDR R0, SP, 8H
0275x(D1148E4C): BLEQ MT [trap=4, pos=5262]
0276y(41000400): MOV R1, R0, 400H
0277y(A1000004): STR R1, R0, 4H
0278z(E7000006): B 6 [027FH]
0279a(80E00008): LDR R0, SP, 8H
027Aa(D114A14C): BLEQ MT [trap=4, pos=5281]
027Bb(81E00004): LDR R1, SP, 4H
027Cb(D114AC4C): BLEQ MT [trap=4, pos=5292]
027Dc(8110000C): LDR R1, R1, CH
027Ec(A1000004): STR R1, R0, 4H
buf.aposd := pos;e buf.modf := FALSE
027Fd(80E00008): LDR R0, SP, 8H
0280d(D114BF4C): BLEQ MT [trap=4, pos=5311]
0281e(81E0000C): LDR R1, SP, CH
0282e(A1000000): STR R1, R0, 0H
0283f(80E00008): LDR R0, SP, 8H
0284f(D114CF4C): BLEQ MT [trap=4, pos=5327]
ENDg ReadBuf;
0285g(41000000): MOV R1, R0, 0H
0286g(B1000008): STR R1, R0, 8H
0287g(8FE00000): LDR LNK, SP, 0H
0288g(4EE80014): ADD SP, SP, 14H
0289g(C700000F): B LNK
PROCEDURE WriteBuf(f: File; buf: Buffer);
VAR i, k: INTEGER;
secadr: DiskAdr; inx: Index;
BEGINh
028Ah(4EE9001C): SUB SP, SP, 1CH
028Bh(AFE00000): STR LNK, SP, 0H
028Ch(A0E00004): STR R0, SP, 4H
028Dh(A1E00008): STR R1, SP, 8H
IF buf.aposi < STS THENj
028Ei(80E00008): LDR R0, SP, 8H
028Fi(D115674C): BLEQ MT [trap=4, pos=5479]
0290j(80000000): LDR R0, R0, 0H
0291j(40090040): SUB R0, R0, 40H
0292j(ED000035): BGE 53 [02C8H]
secadr := f.seck[buf.aposl]m;n
0293k(80E00004): LDR R0, SP, 4H
0294k(D115884C): BLEQ MT [trap=4, pos=5512]
0295l(81E00008): LDR R1, SP, 8H
0296l(D115914C): BLEQ MT [trap=4, pos=5521]
0297m(81100000): LDR R1, R1, 0H
0298m(42190040): SUB R2, R1, 40H
0299m(DA15921C): BLCC MT [trap=1, pos=5522]
029Am(41110002): LSL R1, R1, 2H
029Bm(00080001): ADD R0, R0, R1
029Cn(80000070): LDR R0, R0, 70H
029Dn(A0E00014): STR R0, SP, 14H
IF secadr = 0 THENo
029Eo(80E00014): LDR R0, SP, 14H
029Fo(E9000018): BNE 24 [02B8H]
Kernel.AllocSector(f.sechintp,q secadr)r;s
02A0p(80E00004): LDR R0, SP, 4H
02A1p(D115D14C): BLEQ MT [trap=4, pos=5585]
02A2q(80000018): LDR R0, R0, 18H
02A3r(41E80014): ADD R1, SP, 14H
02A4s .FIXUP P
02A4s(F710E037): BL MOD1 [Kernel] PROC14
f.modHt := TRUE;u f.secv[buf.aposw]x := secadr;y f.sechintz := secadr
02A5t(80E00004): LDR R0, SP, 4H
02A6t(D115EA4C): BLEQ MT [trap=4, pos=5610]
02A7u(41000001): MOV R1, R0, 1H
02A8u(B1000010): STR R1, R0, 10H
02A9v(80E00004): LDR R0, SP, 4H
02AAv(D115F94C): BLEQ MT [trap=4, pos=5625]
02ABw(81E00008): LDR R1, SP, 8H
02ACw(D116024C): BLEQ MT [trap=4, pos=5634]
02ADx(81100000): LDR R1, R1, 0H
02AEx(42190040): SUB R2, R1, 40H
02AFx(DA16031C): BLCC MT [trap=1, pos=5635]
02B0x(41110002): LSL R1, R1, 2H
02B1x(00080001): ADD R0, R0, R1
02B2y(81E00014): LDR R1, SP, 14H
02B3y(A1000070): STR R1, R0, 70H
02B4z(80E00004): LDR R0, SP, 4H
02B5z(D116184C): BLEQ MT [trap=4, pos=5656]
ENDa ;
02B6a(81E00014): LDR R1, SP, 14H
02B7a(A1000018): STR R1, R0, 18H
IF buf.aposb = 0 THENc
02B8b(80E00008): LDR R0, SP, 8H
02B9b(D116404C): BLEQ MT [trap=4, pos=5696]
02BAc(80000000): LDR R0, R0, 0H
02BBc(E900000B): BNE 11 [02C7H]
UpdateHeader(f,d SYSTEM.VAL(FileDir.FileHeader, buf.datae))f;g f.modHh := FALSE
02BCd(80E00004): LDR R0, SP, 4H
02BDe(81E00008): LDR R1, SP, 8H
02BEe(D116894C): BLEQ MT [trap=4, pos=5769]
02BFf(41180010): ADD R1, R1, 10H
02C0f .FIXUP D
02C0f(8D200121): LDR SB, MT, MOD2 [FileDir]
02C1f(42D80001): ADD R2, SB, VAR1
02C2g(F7FFFF44): BL -188 [0207H]
02C3h(80E00004): LDR R0, SP, 4H
02C4h(D116934C): BLEQ MT [trap=4, pos=5779]
ENDi
02C5i(41000000): MOV R1, R0, 0H
02C6i(B1000010): STR R1, R0, 10H
ELSE ij := (buf.aposk - STS)l DIV XS;m inx := f.extn[i]o;p
02C7j(E7000055): B 85 [031DH]
02C8k(80E00008): LDR R0, SP, 8H
02C9k(D116BE4C): BLEQ MT [trap=4, pos=5822]
02CAl(80000000): LDR R0, R0, 0H
02CBl(40090040): SUB R0, R0, 40H
02CCm(40020008): ASR R0, R0, 8H
02CDm(A0E0000C): STR R0, SP, CH
02CEn(80E00004): LDR R0, SP, 4H
02CFn(D116DA4C): BLEQ MT [trap=4, pos=5850]
02D0o(81E0000C): LDR R1, SP, CH
02D1o(4219000C): SUB R2, R1, CH
02D2o(DA16DD1C): BLCC MT [trap=1, pos=5853]
02D3o(41110002): LSL R1, R1, 2H
02D4o(00080001): ADD R0, R0, R1
02D5p(80000040): LDR R0, R0, 40H
02D6p(A0E00018): STR R0, SP, 18H
IF inx = NIL THENq
02D7q(80E00018): LDR R0, SP, 18H
02D8q(E9000019): BNE 25 [02F2H]
NEW(inx);r inx.adrs := 0;t inx.secu[0] := 0;v f.extw[i]x := inx;y f.modHz := TRUE
02D9r(40E80018): ADD R0, SP, 18H
02DAr .FIXUP D
02DAr(8D00001A): LDR SB, MT, MOD0 [Files]
02DBr(41D8007C): ADD R1, SB, 7CH [data]
02DCr(D717080C): BL MT [trap=0, pos=5896]
02DDs(80E00018): LDR R0, SP, 18H
02DEs(D117104C): BLEQ MT [trap=4, pos=5904]
02DFt(41000000): MOV R1, R0, 0H
02E0t(A1000000): STR R1, R0, 0H
02E1u(80E00018): LDR R0, SP, 18H
02E2u(D1171E4C): BLEQ MT [trap=4, pos=5918]
02E3v(41000000): MOV R1, R0, 0H
02E4v(A1000008): STR R1, R0, 8H
02E5w(80E00004): LDR R0, SP, 4H
02E6w(D1172D4C): BLEQ MT [trap=4, pos=5933]
02E7x(81E0000C): LDR R1, SP, CH
02E8x(4219000C): SUB R2, R1, CH
02E9x(DA17301C): BLCC MT [trap=1, pos=5936]
02EAx(41110002): LSL R1, R1, 2H
02EBx(00080001): ADD R0, R0, R1
02ECy(81E00018): LDR R1, SP, 18H
02EDy(A1000040): STR R1, R0, 40H
02EEz(80E00004): LDR R0, SP, 4H
02EFz(D1173F4C): BLEQ MT [trap=4, pos=5951]
ENDa ;
02F0a(41000001): MOV R1, R0, 1H
02F1a(B1000010): STR R1, R0, 10H
k := (buf.aposb - STS)c MOD XS;d secadr := inx.sece[k]f;g
02F2b(80E00008): LDR R0, SP, 8H
02F3b(D117684C): BLEQ MT [trap=4, pos=5992]
02F4c(80000000): LDR R0, R0, 0H
02F5c(40090040): SUB R0, R0, 40H
02F6d(400400FF): AND R0, R0, FFH
02F7d(A0E00010): STR R0, SP, 10H
02F8e(80E00018): LDR R0, SP, 18H
02F9e(D117894C): BLEQ MT [trap=4, pos=6025]
02FAf(81E00010): LDR R1, SP, 10H
02FBf(42190100): SUB R2, R1, 100H
02FCf(DA178C1C): BLCC MT [trap=1, pos=6028]
02FDf(41110002): LSL R1, R1, 2H
02FEf(00080001): ADD R0, R0, R1
02FFg(80000008): LDR R0, R0, 8H
0300g(A0E00014): STR R0, SP, 14H
IF secadr = 0 THENh
0301h(80E00014): LDR R0, SP, 14H
0302h(E900001A): BNE 26 [031DH]
Kernel.AllocSector(f.sechinti,j secadr)k;l
0303i(80E00004): LDR R0, SP, 4H
0304i(D117CB4C): BLEQ MT [trap=4, pos=6091]
0305j(80000018): LDR R0, R0, 18H
0306k(41E80014): ADD R1, SP, 14H
0307l .FIXUP P
0307l(F710E063): BL MOD1 [Kernel] PROC14
f.modHm := TRUE;n inx.modo := TRUE;p inx.secq[k]r := secadr;s f.sechintt := secadr
0308m(80E00004): LDR R0, SP, 4H
0309m(D117E44C): BLEQ MT [trap=4, pos=6116]
030An(41000001): MOV R1, R0, 1H
030Bn(B1000010): STR R1, R0, 10H
030Co(80E00018): LDR R0, SP, 18H
030Do(D117F54C): BLEQ MT [trap=4, pos=6133]
030Ep(41000001): MOV R1, R0, 1H
030Fp(B1000004): STR R1, R0, 4H
0310q(80E00018): LDR R0, SP, 18H
0311q(D118064C): BLEQ MT [trap=4, pos=6150]
0312r(81E00010): LDR R1, SP, 10H
0313r(42190100): SUB R2, R1, 100H
0314r(DA18091C): BLCC MT [trap=1, pos=6153]
0315r(41110002): LSL R1, R1, 2H
0316r(00080001): ADD R0, R0, R1
0317s(81E00014): LDR R1, SP, 14H
0318s(A1000008): STR R1, R0, 8H
0319t(80E00004): LDR R0, SP, 4H
031At(D1181E4C): BLEQ MT [trap=4, pos=6174]
ENDu
031Bu(81E00014): LDR R1, SP, 14H
031Cu(A1000018): STR R1, R0, 18H
END ;
Kernel.PutSector(secadr,v buf.dataw)x;y buf.modz := FALSE
031Dv(80E00014): LDR R0, SP, 14H
031Ew(81E00008): LDR R1, SP, 8H
031Fw(D118624C): BLEQ MT [trap=4, pos=6242]
0320x(41180010): ADD R1, R1, 10H
0321y .FIXUP P
0321y(F711001A): BL MOD1 [Kernel] PROC16
0322z(80E00008): LDR R0, SP, 8H
0323z(D1186C4C): BLEQ MT [trap=4, pos=6252]
ENDa WriteBuf;
0324a(41000000): MOV R1, R0, 0H
0325a(B1000008): STR R1, R0, 8H
0326a(8FE00000): LDR LNK, SP, 0H
0327a(4EE8001C): ADD SP, SP, 1CH
0328a(C700000F): B LNK
PROCEDURE Buf(f: File; pos: INTEGER): Buffer;
VAR buf: Buffer;
BEGINb buf := f.firstbufc;d
0329b(4EE90010): SUB SP, SP, 10H
032Ab(AFE00000): STR LNK, SP, 0H
032Bb(A0E00004): STR R0, SP, 4H
032Cb(A1E00008): STR R1, SP, 8H
032Dc(80E00004): LDR R0, SP, 4H
032Ec(D118E54C): BLEQ MT [trap=4, pos=6373]
032Fd(80000014): LDR R0, R0, 14H
0330d(A0E0000C): STR R0, SP, CH
WHILE (buf.apose # pos)f & (gbuf.nexth # f.firstbufi)j DOk buf := buf.nextl ENDm ;
0331e(80E0000C): LDR R0, SP, CH
0332e(D118FA4C): BLEQ MT [trap=4, pos=6394]
0333f(80000000): LDR R0, R0, 0H
0334f(81E00008): LDR R1, SP, 8H
0335f(00090001): SUB R0, R0, R1
0336g(E100000D): BEQ 13 [0344H]
0337h(80E0000C): LDR R0, SP, CH
0338h(D1190D4C): BLEQ MT [trap=4, pos=6413]
0339i(81E00004): LDR R1, SP, 4H
033Ai(D1191A4C): BLEQ MT [trap=4, pos=6426]
033Bj(8000000C): LDR R0, R0, CH
033Cj(81100014): LDR R1, R1, 14H
033Dj(00090001): SUB R0, R0, R1
033Ek(E1000005): BEQ 5 [0344H]
033Fl(80E0000C): LDR R0, SP, CH
0340l(D1192E4C): BLEQ MT [trap=4, pos=6446]
0341m(8000000C): LDR R0, R0, CH
0342m(A0E0000C): STR R0, SP, CH
0343m(E7FFFFED): B -19 [0331H]
IF buf.aposn # pos THENo buf := NIL ENDp ;
0344n(80E0000C): LDR R0, SP, CH
0345n(D119444C): BLEQ MT [trap=4, pos=6468]
0346o(80000000): LDR R0, R0, 0H
0347o(81E00008): LDR R1, SP, 8H
0348o(00090001): SUB R0, R0, R1
0349o(E1000002): BEQ 2 [034CH]
034Ap(40000000): MOV R0, R0, 0H
034Bp(A0E0000C): STR R0, SP, CH
RETURN buf
ENDq Buf;
034Cq(80E0000C): LDR R0, SP, CH
034Dq(8FE00000): LDR LNK, SP, 0H
034Eq(4EE80010): ADD SP, SP, 10H
034Fq(C700000F): B LNK
PROCEDURE GetBuf(f: File; pos: INTEGER): Buffer;
VAR buf: Buffer;
BEGINr buf := f.firstbufs;t
0350r(4EE90010): SUB SP, SP, 10H
0351r(AFE00000): STR LNK, SP, 0H
0352r(A0E00004): STR R0, SP, 4H
0353r(A1E00008): STR R1, SP, 8H
0354s(80E00004): LDR R0, SP, 4H
0355s(D119DD4C): BLEQ MT [trap=4, pos=6621]
0356t(80000014): LDR R0, R0, 14H
0357t(A0E0000C): STR R0, SP, CH
WHILE (buf.aposu # pos)v & (wbuf.nextx # f.firstbufy)z DOa buf := buf.nextb ENDc ;
0358u(80E0000C): LDR R0, SP, CH
0359u(D119F24C): BLEQ MT [trap=4, pos=6642]
035Av(80000000): LDR R0, R0, 0H
035Bv(81E00008): LDR R1, SP, 8H
035Cv(00090001): SUB R0, R0, R1
035Dw(E100000D): BEQ 13 [036BH]
035Ex(80E0000C): LDR R0, SP, CH
035Fx(D11A054C): BLEQ MT [trap=4, pos=6661]
0360y(81E00004): LDR R1, SP, 4H
0361y(D11A124C): BLEQ MT [trap=4, pos=6674]
0362z(8000000C): LDR R0, R0, CH
0363z(81100014): LDR R1, R1, 14H
0364z(00090001): SUB R0, R0, R1
0365a(E1000005): BEQ 5 [036BH]
0366b(80E0000C): LDR R0, SP, CH
0367b(D11A264C): BLEQ MT [trap=4, pos=6694]
0368c(8000000C): LDR R0, R0, CH
0369c(A0E0000C): STR R0, SP, CH
036Ac(E7FFFFED): B -19 [0358H]
IF buf.aposd # pos THENe
036Bd(80E0000C): LDR R0, SP, CH
036Cd(D11A3C4C): BLEQ MT [trap=4, pos=6716]
036De(80000000): LDR R0, R0, 0H
036Ee(81E00008): LDR R1, SP, 8H
036Fe(00090001): SUB R0, R0, R1
0370e(E1000040): BEQ 64 [03B1H]
IF f.nofbufsf < MaxBufs THENg (*allocate new buffer*)
0371f(80E00004): LDR R0, SP, 4H
0372f(D11A5B4C): BLEQ MT [trap=4, pos=6747]
0373g(80000004): LDR R0, R0, 4H
0374g(40090004): SUB R0, R0, 4H
0375g(ED000019): BGE 25 [038FH]
NEW(buf);h buf.nexti := f.firstbufj.nextk;l f.firstbufm.nextn := buf;o INC(f.nofbufsp)
0376h(40E8000C): ADD R0, SP, CH
0377h .FIXUP D
0377h(8D00009D): LDR SB, MT, MOD0 [Files]
0378h(41D80064): ADD R1, SB, 64H [data]
0379h(D71A950C): BL MT [trap=0, pos=6805]
037Ai(80E0000C): LDR R0, SP, CH
037Bi(D11A9E4C): BLEQ MT [trap=4, pos=6814]
037Cj(81E00004): LDR R1, SP, 4H
037Dj(D11AAC4C): BLEQ MT [trap=4, pos=6828]
037Ek(81100014): LDR R1, R1, 14H
037Fk(D11AB14C): BLEQ MT [trap=4, pos=6833]
0380l(8110000C): LDR R1, R1, CH
0381l(A100000C): STR R1, R0, CH
0382m(80E00004): LDR R0, SP, 4H
0383m(D11ABD4C): BLEQ MT [trap=4, pos=6845]
0384n(80000014): LDR R0, R0, 14H
0385n(D11AC24C): BLEQ MT [trap=4, pos=6850]
0386o(81E0000C): LDR R1, SP, CH
0387o(A100000C): STR R1, R0, CH
0388p(80E00004): LDR R0, SP, 4H
0389p(D11AD84C): BLEQ MT [trap=4, pos=6872]
ELSEq (*reuse a buffer*) fr.firstbufs := buf;t
038Aq(40080004): ADD R0, R0, 4H
038Bq(81000000): LDR R1, R0, 0H
038Cq(41180001): ADD R1, R1, 1H
038Dq(A1000000): STR R1, R0, 0H
038Er(E700000B): B 11 [039AH]
038Fs(80E00004): LDR R0, SP, 4H
0390s(D11B024C): BLEQ MT [trap=4, pos=6914]
0391t(81E0000C): LDR R1, SP, CH
0392t(A1000014): STR R1, R0, 14H
IF buf.modu THENv WriteBuf(f,w buf)x ENDy
0393u(80E0000C): LDR R0, SP, CH
0394u(D11B1D4C): BLEQ MT [trap=4, pos=6941]
0395v(90000008): LDR R0, R0, 8H
0396v(E1000003): BEQ 3 [039AH]
0397w(80E00004): LDR R0, SP, 4H
0398x(81E0000C): LDR R1, SP, CH
0399y(F7FFFEF0): BL -272 [028AH]
END ;
IF pos <= f.alengz THENa ReadBuf(f,b buf,c pos)d ELSEe buff.aposg := pos;h buf.limi := 0;j buf.modk := FALSE ENDl
039Az(80E00004): LDR R0, SP, 4H
039Bz(D11B5B4C): BLEQ MT [trap=4, pos=7003]
039Ca(81E00008): LDR R1, SP, 8H
039Da(80000008): LDR R0, R0, 8H
039Ea(01190000): SUB R1, R1, R0
039Fa(EE000005): BGT 5 [03A5H]
03A0b(80E00004): LDR R0, SP, 4H
03A1c(81E0000C): LDR R1, SP, CH
03A2d(82E00008): LDR R2, SP, 8H
03A3e(F7FFFE9F): BL -353 [0243H]
03A4f(E700000C): B 12 [03B1H]
03A5g(80E0000C): LDR R0, SP, CH
03A6g(D11B834C): BLEQ MT [trap=4, pos=7043]
03A7h(81E00008): LDR R1, SP, 8H
03A8h(A1000000): STR R1, R0, 0H
03A9i(80E0000C): LDR R0, SP, CH
03AAi(D11B934C): BLEQ MT [trap=4, pos=7059]
03ABj(41000000): MOV R1, R0, 0H
03ACj(A1000004): STR R1, R0, 4H
03ADk(80E0000C): LDR R0, SP, CH
03AEk(D11BA14C): BLEQ MT [trap=4, pos=7073]
03AFl(41000000): MOV R1, R0, 0H
03B0l(B1000008): STR R1, R0, 8H
END ;
RETURN buf
ENDm GetBuf;
03B1m(80E0000C): LDR R0, SP, CH
03B2m(8FE00000): LDR LNK, SP, 0H
03B3m(4EE80010): ADD SP, SP, 10H
03B4m(C700000F): B LNK
PROCEDURE Unbuffer(f: File);
VAR i, k: INTEGER;
buf: Buffer;
inx: Index;
head: FileDir.FileHeader;
BEGINn buf := f.firstbufo;p
03B5n(4EE90418): SUB SP, SP, 418H
03B6n(AFE00000): STR LNK, SP, 0H
03B7n(A0E00004): STR R0, SP, 4H
03B8o(80E00004): LDR R0, SP, 4H
03B9o(D11C6B4C): BLEQ MT [trap=4, pos=7275]
03BAp(80000014): LDR R0, R0, 14H
03BBp(A0E00010): STR R0, SP, 10H
REPEAT
IF buf.modq THENr WriteBuf(f,s buf)t ENDu ;
03BCq(80E00010): LDR R0, SP, 10H
03BDq(D11C884C): BLEQ MT [trap=4, pos=7304]
03BEr(90000008): LDR R0, R0, 8H
03BFr(E1000003): BEQ 3 [03C3H]
03C0s(80E00004): LDR R0, SP, 4H
03C1t(81E00010): LDR R1, SP, 10H
03C2u(F7FFFEC7): BL -313 [028AH]
buf := buf.nextv
03C3v(80E00010): LDR R0, SP, 10H
03C4v(D11CBA4C): BLEQ MT [trap=4, pos=7354]
UNTILw buf = f.firstbufx;y
03C5w(8000000C): LDR R0, R0, CH
03C6w(A0E00010): STR R0, SP, 10H
03C7x(80E00004): LDR R0, SP, 4H
03C8x(D11CD54C): BLEQ MT [trap=4, pos=7381]
03C9y(81E00010): LDR R1, SP, 10H
03CAy(80000014): LDR R0, R0, 14H
03CBy(01190000): SUB R1, R1, R0
03CCy(E9FFFFEF): BNE -17 [03BCH]
k := (f.alengz + (XS-STS))a DIV XS;b i := 0;c
03CDz(80E00004): LDR R0, SP, 4H
03CEz(D11CE84C): BLEQ MT [trap=4, pos=7400]
03CFa(80000008): LDR R0, R0, 8H
03D0a(400800C0): ADD R0, R0, C0H
03D1b(40020008): ASR R0, R0, 8H
03D2b(A0E0000C): STR R0, SP, CH
03D3c(40000000): MOV R0, R0, 0H
03D4c(A0E00008): STR R0, SP, 8H
WHILE i < k DOd
03D5d(80E00008): LDR R0, SP, 8H
03D6d(81E0000C): LDR R1, SP, CH
03D7d(00090001): SUB R0, R0, R1
03D8d(ED000030): BGE 48 [0409H]
inx := f.exte[i]f;g INC(i);h
03D9e(80E00004): LDR R0, SP, 4H
03DAe(D11D2A4C): BLEQ MT [trap=4, pos=7466]
03DBf(81E00008): LDR R1, SP, 8H
03DCf(4219000C): SUB R2, R1, CH
03DDf(DA1D2D1C): BLCC MT [trap=1, pos=7469]
03DEf(41110002): LSL R1, R1, 2H
03DFf(00080001): ADD R0, R0, R1
03E0g(80000040): LDR R0, R0, 40H
03E1g(A0E00014): STR R0, SP, 14H
03E2h(80E00008): LDR R0, SP, 8H
03E3h(40080001): ADD R0, R0, 1H
03E4h(A0E00008): STR R0, SP, 8H
IF inx.modi THENj
03E5i(80E00014): LDR R0, SP, 14H
03E6i(D11D474C): BLEQ MT [trap=4, pos=7495]
03E7j(90000004): LDR R0, R0, 4H
03E8j(E100001F): BEQ 31 [0408H]
IF inx.adrk = 0 THENl
03E9k(80E00014): LDR R0, SP, 14H
03EAk(D11D5F4C): BLEQ MT [trap=4, pos=7519]
03EBl(80000000): LDR R0, R0, 0H
03ECl(E9000010): BNE 16 [03FDH]
Kernel.AllocSector(f.sechintm,n inx.adro);p f.sechintq := inx.adrr;s f.modHt := TRUE
03EDm(80E00004): LDR R0, SP, 4H
03EEm(D11D8F4C): BLEQ MT [trap=4, pos=7567]
03EFn(80000018): LDR R0, R0, 18H
03F0o(81E00014): LDR R1, SP, 14H
03F1o(D11D984C): BLEQ MT [trap=4, pos=7576]
03F2p .FIXUP P
03F2p(F710E0D1): BL MOD1 [Kernel] PROC14
03F3q(80E00004): LDR R0, SP, 4H
03F4q(D11DA44C): BLEQ MT [trap=4, pos=7588]
03F5r(81E00014): LDR R1, SP, 14H
03F6r(D11DAF4C): BLEQ MT [trap=4, pos=7599]
03F7s(81100000): LDR R1, R1, 0H
03F8s(A1000018): STR R1, R0, 18H
03F9t(80E00004): LDR R0, SP, 4H
03FAt(D11DB74C): BLEQ MT [trap=4, pos=7607]
ENDu ;
03FBu(41000001): MOV R1, R0, 1H
03FCu(B1000010): STR R1, R0, 10H
Kernel.PutSector(inx.adrv,w inx.secx)y;z inx.moda := FALSE
03FDv(80E00014): LDR R0, SP, 14H
03FEv(D11DEE4C): BLEQ MT [trap=4, pos=7662]
03FFw(80000000): LDR R0, R0, 0H
0400x(81E00014): LDR R1, SP, 14H
0401x(D11DF74C): BLEQ MT [trap=4, pos=7671]
0402y(41180008): ADD R1, R1, 8H
0403z .FIXUP P
0403z(F7110011): BL MOD1 [Kernel] PROC16
0404a(80E00014): LDR R0, SP, 14H
0405a(D11E014C): BLEQ MT [trap=4, pos=7681]
ENDb
0406b(41000000): MOV R1, R0, 0H
0407b(B1000004): STR R1, R0, 4H
ENDc ;
0408c(E7FFFFCC): B -52 [03D5H]
IF f.modHd THENe
0409d(80E00004): LDR R0, SP, 4H
040Ad(D11E2C4C): BLEQ MT [trap=4, pos=7724]
040Be(90000010): LDR R0, R0, 10H
040Ce(E1000013): BEQ 19 [0420H]
Kernel.GetSector(f.secf[0],g head)h;i UpdateHeader(f,j head)k;l
040Df(80E00004): LDR R0, SP, 4H
040Ef(D11E4E4C): BLEQ MT [trap=4, pos=7758]
040Fg(80000070): LDR R0, R0, 70H
0410h(41E80018): ADD R1, SP, 18H
0411i .FIXUP P
0411i(F710F00E): BL MOD1 [Kernel] PROC15
0412j(80E00004): LDR R0, SP, 4H
0413k(41E80018): ADD R1, SP, 18H
0414k .FIXUP D
0414k(8D20009D): LDR SB, MT, MOD2 [FileDir]
0415k(42D80001): ADD R2, SB, VAR1
0416l(F7FFFDF0): BL -528 [0207H]
Kernel.PutSector(f.secm[0],n head)o;p f.modHq := FALSE
0417m(80E00004): LDR R0, SP, 4H
0418m(D11E8D4C): BLEQ MT [trap=4, pos=7821]
0419n(80000070): LDR R0, R0, 70H
041Ao(41E80018): ADD R1, SP, 18H
041Bp .FIXUP P
041Bp(F711000A): BL MOD1 [Kernel] PROC16
041Cq(80E00004): LDR R0, SP, 4H
041Dq(D11E9F4C): BLEQ MT [trap=4, pos=7839]
ENDr
041Er(41000000): MOV R1, R0, 0H
041Fr(B1000010): STR R1, R0, 10H
ENDs Unbuffer;
0420s(8FE00000): LDR LNK, SP, 0H
0421s(4EE80418): ADD SP, SP, 418H
0422s(C700000F): B LNK
PROCEDURE Register*(f: File);
BEGINt
0423t .PROC 4
0423t(4EE90008): SUB SP, SP, 8H
0424t(AFE00000): STR LNK, SP, 0H
0425t(A0E00004): STR R0, SP, 4H
IF (f # NIL)u & (vf.namew[0] # 0X)x THENy
0426u(80E00004): LDR R0, SP, 4H
0427v(E100001C): BEQ 28 [0444H]
0428w(80E00004): LDR R0, SP, 4H
0429w(D11F044C): BLEQ MT [trap=4, pos=7940]
042Ax(9000001C): LDR R0, R0, 1CH
042By(E1000018): BEQ 24 [0444H]
Unbuffer(f)z;a
042Cz(80E00004): LDR R0, SP, 4H
042Da(F7FFFF87): BL -121 [03B5H]
IF ~f.registeredb THENc
042Eb(80E00004): LDR R0, SP, 4H
042Fb(D11F3C4C): BLEQ MT [trap=4, pos=7996]
0430c(90000011): LDR R0, R0, 11H
0431c(E9000012): BNE 18 [0444H]
FileDir.Insert(f.named,e f.secf[0])g;h f.registeredi := TRUE;j f.nextk := root;l root := SYSTEM.VAL(INTEGER, f)
0432d(80E00004): LDR R0, SP, 4H
0433d(D11F5F4C): BLEQ MT [trap=4, pos=8031]
0434e(4008001C): ADD R0, R0, 1CH
0435f(81E00004): LDR R1, SP, 4H
0436f(D11F664C): BLEQ MT [trap=4, pos=8038]
0437g(81100070): LDR R1, R1, 70H
0438h .FIXUP P
0438h(F720501D): BL MOD2 [FileDir] PROC5
0439i(80E00004): LDR R0, SP, 4H
043Ai(D11F784C): BLEQ MT [trap=4, pos=8056]
043Bj(41000001): MOV R1, R0, 1H
043Cj(B1000011): STR R1, R0, 11H
043Dk(80E00004): LDR R0, SP, 4H
043Ek(D11F884C): BLEQ MT [trap=4, pos=8072]
043Fl .FIXUP D
043Fl(8D00002B): LDR SB, MT, MOD0 [Files]
0440l(81D00090): LDR R1, SB, 90H [data]
0441l(A1000000): STR R1, R0, 0H
ENDm
0442m(80E00004): LDR R0, SP, 4H
0443m(A0D00090): STR R0, SB, 90H
END
ENDn Register;
0444n(8FE00000): LDR LNK, SP, 0H
0445n(4EE80008): ADD SP, SP, 8H
0446n(C700000F): B LNK
PROCEDURE Close*(f: File);
BEGINo
0447o .PROC 5
0447o(4EE90008): SUB SP, SP, 8H
0448o(AFE00000): STR LNK, SP, 0H
0449o(A0E00004): STR R0, SP, 4H
IF f # NIL THENp Unbuffer(f)q ENDr
044Ap(80E00004): LDR R0, SP, 4H
044Bp(E1000002): BEQ 2 [044EH]
044Cq(80E00004): LDR R0, SP, 4H
044Dr(F7FFFF67): BL -153 [03B5H]
ENDs Close;
044Es(8FE00000): LDR LNK, SP, 0H
044Fs(4EE80008): ADD SP, SP, 8H
0450s(C700000F): B LNK
PROCEDURE Purge*(f: File);
VAR a, i, j, k: INTEGER;
ind: FileDir.IndexSector;
BEGINt
0451t .PROC 6
0451t(4EE90418): SUB SP, SP, 418H
0452t(AFE00000): STR LNK, SP, 0H
0453t(A0E00004): STR R0, SP, 4H
IF f # NIL THENu a := f.alengv + 1;w f.alengx := 0;y f.blengz := HS;a
0454u(80E00004): LDR R0, SP, 4H
0455u(E100005B): BEQ 91 [04B1H]
0456v(80E00004): LDR R0, SP, 4H
0457v(D120AD4C): BLEQ MT [trap=4, pos=8365]
0458w(80000008): LDR R0, R0, 8H
0459w(40080001): ADD R0, R0, 1H
045Aw(A0E00008): STR R0, SP, 8H
045Bx(80E00004): LDR R0, SP, 4H
045Cx(D120BA4C): BLEQ MT [trap=4, pos=8378]
045Dy(41000000): MOV R1, R0, 0H
045Ey(A1000008): STR R1, R0, 8H
045Fz(80E00004): LDR R0, SP, 4H
0460z(D120C84C): BLEQ MT [trap=4, pos=8392]
0461a(41000160): MOV R1, R0, 160H
0462a(A100000C): STR R1, R0, CH
IF a <= STS THENb i := a;c
0463b(80E00008): LDR R0, SP, 8H
0464b(40090040): SUB R0, R0, 40H
0465b(EE000003): BGT 3 [0469H]
0466c(80E00008): LDR R0, SP, 8H
0467c(A0E0000C): STR R0, SP, CH
ELSE id := STS;e DEC(a, i);f j := (a-1)g MOD XS;h k := (a-1)i DIV XS;j
0468d(E700003A): B 58 [04A3H]
0469e(40000040): MOV R0, R0, 40H
046Ae(A0E0000C): STR R0, SP, CH
046Bf(80E00008): LDR R0, SP, 8H
046Cf(81E0000C): LDR R1, SP, CH
046Df(00090001): SUB R0, R0, R1
046Ef(A0E00008): STR R0, SP, 8H
046Fg(80E00008): LDR R0, SP, 8H
0470g(40090001): SUB R0, R0, 1H
0471h(400400FF): AND R0, R0, FFH
0472h(A0E00010): STR R0, SP, 10H
0473i(80E00008): LDR R0, SP, 8H
0474i(40090001): SUB R0, R0, 1H
0475j(40020008): ASR R0, R0, 8H
0476j(A0E00014): STR R0, SP, 14H
WHILE k >= 0 DOk
0477k(80E00014): LDR R0, SP, 14H
0478k(40090000): SUB R0, R0, 0H
0479k(E5000029): BLT 41 [04A3H]
Kernel.GetSector(f.extl[k]m.adrn,o ind)p;q
047Al(80E00004): LDR R0, SP, 4H
047Bl(D1216D4C): BLEQ MT [trap=4, pos=8557]
047Cm(81E00014): LDR R1, SP, 14H
047Dm(4219000C): SUB R2, R1, CH
047Em(DA21701C): BLCC MT [trap=1, pos=8560]
047Fm(41110002): LSL R1, R1, 2H
0480m(00080001): ADD R0, R0, R1
0481n(80000040): LDR R0, R0, 40H
0482n(D121744C): BLEQ MT [trap=4, pos=8564]
0483o(80000000): LDR R0, R0, 0H
0484p(41E80018): ADD R1, SP, 18H
0485q .FIXUP P
0485q(F710F04D): BL MOD1 [Kernel] PROC15
REPEAT DEC(j);r Kernel.FreeSector(ind[j]s)t UNTILu j = 0;v
0486r(80E00010): LDR R0, SP, 10H
0487r(40090001): SUB R0, R0, 1H
0488r(A0E00010): STR R0, SP, 10H
0489s(80E00010): LDR R0, SP, 10H
048As(41090100): SUB R1, R0, 100H
048Bs(DA21AD1C): BLCC MT [trap=1, pos=8621]
048Cs(40010002): LSL R0, R0, 2H
048Ds(00E80000): ADD R0, SP, R0
048Et(80000018): LDR R0, R0, 18H
048Fu .FIXUP P
048Fu(F710D00A): BL MOD1 [Kernel] PROC13
0490v(80E00010): LDR R0, SP, 10H
0491v(E9FFFFF4): BNE -12 [0486H]
Kernel.FreeSector(f.extw[k]x.adry)z;a j := XS;b DEC(k)
0492w(80E00004): LDR R0, SP, 4H
0493w(D121DD4C): BLEQ MT [trap=4, pos=8669]
0494x(81E00014): LDR R1, SP, 14H
0495x(4219000C): SUB R2, R1, CH
0496x(DA21E01C): BLCC MT [trap=1, pos=8672]
0497x(41110002): LSL R1, R1, 2H
0498x(00080001): ADD R0, R0, R1
0499y(80000040): LDR R0, R0, 40H
049Ay(D121E44C): BLEQ MT [trap=4, pos=8676]
049Bz(80000000): LDR R0, R0, 0H
049Ca .FIXUP P
049Ca(F710D00D): BL MOD1 [Kernel] PROC13
049Db(40000100): MOV R0, R0, 100H
049Eb(A0E00010): STR R0, SP, 10H
ENDc
049Fc(80E00014): LDR R0, SP, 14H
04A0c(40090001): SUB R0, R0, 1H
04A1c(A0E00014): STR R0, SP, 14H
04A2c(E7FFFFD4): B -44 [0477H]
END ;
REPEAT DEC(i);d Kernel.FreeSector(f.sece[i]f)g UNTILh i = 0
04A3d(80E0000C): LDR R0, SP, CH
04A4d(40090001): SUB R0, R0, 1H
04A5d(A0E0000C): STR R0, SP, CH
04A6e(80E00004): LDR R0, SP, 4H
04A7e(D1223B4C): BLEQ MT [trap=4, pos=8763]
04A8f(81E0000C): LDR R1, SP, CH
04A9f(42190040): SUB R2, R1, 40H
04AAf(DA223E1C): BLCC MT [trap=1, pos=8766]
04ABf(41110002): LSL R1, R1, 2H
04ACf(00080001): ADD R0, R0, R1
04ADg(80000070): LDR R0, R0, 70H
04AEh .FIXUP P
04AEh(F710D012): BL MOD1 [Kernel] PROC13
ENDi
04AFi(80E0000C): LDR R0, SP, CH
04B0i(E9FFFFF2): BNE -14 [04A3H]
ENDj Purge;
04B1j(8FE00000): LDR LNK, SP, 0H
04B2j(4EE80418): ADD SP, SP, 418H
04B3j(C700000F): B LNK
PROCEDURE Delete*(name: ARRAY OF CHAR; VAR res: INTEGER);
VAR adr: DiskAdr;
namebuf: FileDir.FileName;
BEGINk Check(name,l namebuf,m res)n;o
04B4k .PROC 7
04B4k(4EE90034): SUB SP, SP, 34H
04B5k(AFE00000): STR LNK, SP, 0H
04B6k(A0E00004): STR R0, SP, 4H
04B7k(A1E00008): STR R1, SP, 8H
04B8k(A2E0000C): STR R2, SP, CH
04B9l(80E00004): LDR R0, SP, 4H
04BAl(81E00008): LDR R1, SP, 8H
04BBm(42E80014): ADD R2, SP, 14H
04BCn(83E0000C): LDR R3, SP, CH
04BDo(F7FFFB42): BL -1214 [0000H]
IF res = 0 THENp
04BEp(80E0000C): LDR R0, SP, CH
04BFp(80000000): LDR R0, R0, 0H
04C0p(E9000008): BNE 8 [04C9H]
FileDir.Delete(namebuf,q adr)r;s
04C1q(40E80014): ADD R0, SP, 14H
04C2r(41E80010): ADD R1, SP, 10H
04C3s .FIXUP P
04C3s(F7206015): BL MOD2 [FileDir] PROC6
IF adr = 0 THENt res := 2 ENDu
04C4t(80E00010): LDR R0, SP, 10H
04C5t(E9000003): BNE 3 [04C9H]
04C6u(40000002): MOV R0, R0, 2H
04C7u(81E0000C): LDR R1, SP, CH
04C8u(A0100000): STR R0, R1, 0H
END
ENDv Delete;
04C9v(8FE00000): LDR LNK, SP, 0H
04CAv(4EE80034): ADD SP, SP, 34H
04CBv(C700000F): B LNK
PROCEDURE Rename*(old, new: ARRAY OF CHAR; VAR res: INTEGER);
VAR adr: DiskAdr;
oldbuf, newbuf: FileDir.FileName;
head: FileDir.FileHeader;
BEGINw Check(old,x oldbuf,y res)z;a
04CCw .PROC 8
04CCw(4EE9045C): SUB SP, SP, 45CH
04CDw(AFE00000): STR LNK, SP, 0H
04CEw(A0E00004): STR R0, SP, 4H
04CFw(A1E00008): STR R1, SP, 8H
04D0w(A2E0000C): STR R2, SP, CH
04D1w(A3E00010): STR R3, SP, 10H
04D2w(A4E00014): STR R4, SP, 14H
04D3x(80E00004): LDR R0, SP, 4H
04D4x(81E00008): LDR R1, SP, 8H
04D5y(42E8001C): ADD R2, SP, 1CH
04D6z(83E00014): LDR R3, SP, 14H
04D7a(F7FFFB28): BL -1240 [0000H]
IF res = 0 THENb
04D8b(80E00014): LDR R0, SP, 14H
04D9b(80000000): LDR R0, R0, 0H
04DAb(E9000023): BNE 35 [04FEH]
Check(new,c newbuf,d res)e;f
04DBc(80E0000C): LDR R0, SP, CH
04DCc(81E00010): LDR R1, SP, 10H
04DDd(42E8003C): ADD R2, SP, 3CH
04DEe(83E00014): LDR R3, SP, 14H
04DFf(F7FFFB20): BL -1248 [0000H]
IF res = 0 THENg
04E0g(80E00014): LDR R0, SP, 14H
04E1g(80000000): LDR R0, R0, 0H
04E2g(E900001B): BNE 27 [04FEH]
FileDir.Delete(oldbuf,h adr)i;j
04E3h(40E8001C): ADD R0, SP, 1CH
04E4i(41E80018): ADD R1, SP, 18H
04E5j .FIXUP P
04E5j(F7206022): BL MOD2 [FileDir] PROC6
IF adr # 0 THENk
04E6k(80E00018): LDR R0, SP, 18H
04E7k(E1000013): BEQ 19 [04FBH]
FileDir.Insert(newbuf,l adr)m;n
04E8l(40E8003C): ADD R0, SP, 3CH
04E9m(81E00018): LDR R1, SP, 18H
04EAn .FIXUP P
04EAn(F7205005): BL MOD2 [FileDir] PROC5
Kernel.GetSector(adr,o head)p;q head.name := newbuf;r Kernel.PutSector(adr,s head)t
04EBo(80E00018): LDR R0, SP, 18H
04ECp(41E8005C): ADD R1, SP, 5CH
04EDq .FIXUP P
04EDq(F710F003): BL MOD1 [Kernel] PROC15
04EEr(40E80060): ADD R0, SP, 60H
04EFr(41E8003C): ADD R1, SP, 3CH
04F0r(42000008): MOV R2, R0, 8H
04F1r(83100000): LDR R3, R1, 0H
04F2r(41180004): ADD R1, R1, 4H
04F3r(A3000000): STR R3, R0, 0H
04F4r(40080004): ADD R0, R0, 4H
04F5r(42290001): SUB R2, R2, 1H
04F6r(E9FFFFFA): BNE -6 [04F1H]
04F7s(80E00018): LDR R0, SP, 18H
04F8t(41E8005C): ADD R1, SP, 5CH
ELSEu resv := 2
04F9u .FIXUP P
04F9u(F711000C): BL MOD1 [Kernel] PROC16
04FAv(E7000003): B 3 [04FEH]
ENDw
04FBw(40000002): MOV R0, R0, 2H
04FCw(81E00014): LDR R1, SP, 14H
04FDw(A0100000): STR R0, R1, 0H
END
END
ENDx Rename;
04FEx(8FE00000): LDR LNK, SP, 0H
04FFx(4EE8045C): ADD SP, SP, 45CH
0500x(C700000F): B LNK
PROCEDURE Length*(f: File): INTEGER;
BEGINy RETURN f.alengz * SS +a f.blengb -c HS
0501y .PROC 9
0501y(4EE90008): SUB SP, SP, 8H
0502y(AFE00000): STR LNK, SP, 0H
0503y(A0E00004): STR R0, SP, 4H
0504z(80E00004): LDR R0, SP, 4H
0505z(D125B44C): BLEQ MT [trap=4, pos=9652]
0506a(80000008): LDR R0, R0, 8H
0507a(4001000A): LSL R0, R0, AH
0508b(81E00004): LDR R1, SP, 4H
0509b(D125C34C): BLEQ MT [trap=4, pos=9667]
050Ac(8110000C): LDR R1, R1, CH
050Bc(00080001): ADD R0, R0, R1
ENDd Length;
050Cd(40090160): SUB R0, R0, 160H
050Dd(8FE00000): LDR LNK, SP, 0H
050Ed(4EE80008): ADD SP, SP, 8H
050Fd(C700000F): B LNK
PROCEDURE Date*(f: File): INTEGER;
BEGINe RETURN f.datef
0510e .PROC 10
0510e(4EE90008): SUB SP, SP, 8H
0511e(AFE00000): STR LNK, SP, 0H
0512e(A0E00004): STR R0, SP, 4H
0513f(80E00004): LDR R0, SP, 4H
0514f(D126124C): BLEQ MT [trap=4, pos=9746]
ENDg Date;
0515g(8000003C): LDR R0, R0, 3CH
0516g(8FE00000): LDR LNK, SP, 0H
0517g(4EE80008): ADD SP, SP, 8H
0518g(C700000F): B LNK
(*---------------------------Read---------------------------*)
PROCEDURE Set*(VAR r: Rider; f: File; pos: INTEGER);
VAR a, b: INTEGER;
BEGINh r.eof := FALSE;i r.res := 0;j
0519h .PROC 11
0519h(4EE9001C): SUB SP, SP, 1CH
051Ah(AFE00000): STR LNK, SP, 0H
051Bh(A0E00004): STR R0, SP, 4H
051Ch(A1E00008): STR R1, SP, 8H
051Dh(A2E0000C): STR R2, SP, CH
051Eh(A3E00010): STR R3, SP, 10H
051Fi(40000000): MOV R0, R0, 0H
0520i(81E00004): LDR R1, SP, 4H
0521i(B0100000): STR R0, R1, 0H
0522j(40000000): MOV R0, R0, 0H
0523j(81E00004): LDR R1, SP, 4H
0524j(A0100004): STR R0, R1, 4H
IF f # NIL THENk
0525k(80E0000C): LDR R0, SP, CH
0526k(E1000034): BEQ 52 [055BH]
IF pos < 0 THENl a := 0;m b := HS
0527l(80E00010): LDR R0, SP, 10H
0528l(40090000): SUB R0, R0, 0H
0529l(ED000005): BGE 5 [052FH]
052Am(40000000): MOV R0, R0, 0H
052Bm(A0E00014): STR R0, SP, 14H
ELSIFn poso < f.alengp * SS +q f.blengr -s HS THENt
052Cn(40000160): MOV R0, R0, 160H
052Dn(A0E00018): STR R0, SP, 18H
052Eo(E700001D): B 29 [054CH]
052Fp(80E0000C): LDR R0, SP, CH
0530p(D127284C): BLEQ MT [trap=4, pos=10024]
0531q(80000008): LDR R0, R0, 8H
0532q(4001000A): LSL R0, R0, AH
0533r(81E0000C): LDR R1, SP, CH
0534r(D127374C): BLEQ MT [trap=4, pos=10039]
0535s(8110000C): LDR R1, R1, CH
0536s(00080001): ADD R0, R0, R1
0537t(40090160): SUB R0, R0, 160H
0538t(81E00010): LDR R1, SP, 10H
0539t(01190000): SUB R1, R1, R0
053At(ED000009): BGE 9 [0544H]
a := (pos + HS)u DIV SS;v b := (pos + HS)w MOD SS;x
053Bu(80E00010): LDR R0, SP, 10H
053Cu(40080160): ADD R0, R0, 160H
053Dv(4002000A): ASR R0, R0, AH
053Ev(A0E00014): STR R0, SP, 14H
053Fw(80E00010): LDR R0, SP, 10H
0540w(40080160): ADD R0, R0, 160H
0541x(400403FF): AND R0, R0, 3FFH
0542x(A0E00018): STR R0, SP, 18H
ELSE ay := f.alengz;a b := f.blengb
0543y(E7000008): B 8 [054CH]
0544z(80E0000C): LDR R0, SP, CH
0545z(D127914C): BLEQ MT [trap=4, pos=10129]
0546a(80000008): LDR R0, R0, 8H
0547a(A0E00014): STR R0, SP, 14H
0548b(80E0000C): LDR R0, SP, CH
0549b(D1279F4C): BLEQ MT [trap=4, pos=10143]
ENDc ;
054Ac(8000000C): LDR R0, R0, CH
054Bc(A0E00018): STR R0, SP, 18H
r.file := f;d r.apos := a;e r.bpos := b;f r.buf := f.firstbufg
054Cd(80E0000C): LDR R0, SP, CH
054Dd(81E00004): LDR R1, SP, 4H
054Ed(A0100008): STR R0, R1, 8H
054Fe(80E00014): LDR R0, SP, 14H
0550e(81E00004): LDR R1, SP, 4H
0551e(A010000C): STR R0, R1, CH
0552f(80E00018): LDR R0, SP, 18H
0553f(81E00004): LDR R1, SP, 4H
0554f(A0100010): STR R0, R1, 10H
0555g(80E0000C): LDR R0, SP, CH
0556g(D127EC4C): BLEQ MT [trap=4, pos=10220]
ELSEh ri.file:= NIL
0557h(80000014): LDR R0, R0, 14H
0558h(81E00004): LDR R1, SP, 4H
0559h(A0100014): STR R0, R1, 14H
055Ai(E7000003): B 3 [055EH]
ENDj
055Bj(40000000): MOV R0, R0, 0H
055Cj(81E00004): LDR R1, SP, 4H
055Dj(A0100008): STR R0, R1, 8H
ENDk Set;
055Ek(8FE00000): LDR LNK, SP, 0H
055Fk(4EE8001C): ADD SP, SP, 1CH
0560k(C700000F): B LNK
PROCEDURE Pos*(VAR r: Rider): INTEGER;
BEGINl RETURN r.apos * SS +m r.bpos -n HS
0561l .PROC 12
0561l(4EE9000C): SUB SP, SP, CH
0562l(AFE00000): STR LNK, SP, 0H
0563l(A0E00004): STR R0, SP, 4H
0564l(A1E00008): STR R1, SP, 8H
0565m(80E00004): LDR R0, SP, 4H
0566m(8000000C): LDR R0, R0, CH
0567m(4001000A): LSL R0, R0, AH
0568n(81E00004): LDR R1, SP, 4H
0569n(81100010): LDR R1, R1, 10H
056An(00080001): ADD R0, R0, R1
ENDo Pos;
056Bo(40090160): SUB R0, R0, 160H
056Co(8FE00000): LDR LNK, SP, 0H
056Do(4EE8000C): ADD SP, SP, CH
056Eo(C700000F): B LNK
PROCEDURE Base*(VAR r: Rider): File;
BEGINp RETURN r.file
056Fp .PROC 13
056Fp(4EE9000C): SUB SP, SP, CH
0570p(AFE00000): STR LNK, SP, 0H
0571p(A0E00004): STR R0, SP, 4H
0572p(A1E00008): STR R1, SP, 8H
ENDq Base;
0573q(80E00004): LDR R0, SP, 4H
0574q(80000008): LDR R0, R0, 8H
0575q(8FE00000): LDR LNK, SP, 0H
0576q(4EE8000C): ADD SP, SP, CH
0577q(C700000F): B LNK
PROCEDURE ReadByte*(VAR r: Rider; VAR x: BYTE);
VAR buf: Buffer;
BEGINr
0578r .PROC 14
0578r(4EE90014): SUB SP, SP, 14H
0579r(AFE00000): STR LNK, SP, 0H
057Ar(A0E00004): STR R0, SP, 4H
057Br(A1E00008): STR R1, SP, 8H
057Cr(A2E0000C): STR R2, SP, CH
IF r.apos # r.buf.aposs THENt r.buf := GetBuf(r.file,u r.apos)v ENDw ;
057Ds(80E00004): LDR R0, SP, 4H
057Es(80000014): LDR R0, R0, 14H
057Fs(D129284C): BLEQ MT [trap=4, pos=10536]
0580t(81E00004): LDR R1, SP, 4H
0581t(8110000C): LDR R1, R1, CH
0582t(80000000): LDR R0, R0, 0H
0583t(01190000): SUB R1, R1, R0
0584t(E1000007): BEQ 7 [058CH]
0585u(80E00004): LDR R0, SP, 4H
0586u(80000008): LDR R0, R0, 8H
0587v(81E00004): LDR R1, SP, 4H
0588v(8110000C): LDR R1, R1, CH
0589w(F7FFFDC6): BL -570 [0350H]
058Aw(81E00004): LDR R1, SP, 4H
058Bw(A0100014): STR R0, R1, 14H
IF r.bpos < r.buf.limx THENy x := r.buf.dataz[r.bpos]a;b INC(r.bpos)
058Cx(80E00004): LDR R0, SP, 4H
058Dx(80000014): LDR R0, R0, 14H
058Ex(D1296D4C): BLEQ MT [trap=4, pos=10605]
058Fy(81E00004): LDR R1, SP, 4H
0590y(81100010): LDR R1, R1, 10H
0591y(80000004): LDR R0, R0, 4H
0592y(01190000): SUB R1, R1, R0
0593y(ED000011): BGE 17 [05A5H]
0594z(80E00004): LDR R0, SP, 4H
0595z(80000014): LDR R0, R0, 14H
0596z(D129824C): BLEQ MT [trap=4, pos=10626]
0597a(81E00004): LDR R1, SP, 4H
0598a(81100010): LDR R1, R1, 10H
0599a(42190400): SUB R2, R1, 400H
059Aa(DA298A1C): BLCC MT [trap=1, pos=10634]
059Ba(00080001): ADD R0, R0, R1
059Cb(90000010): LDR R0, R0, 10H
059Db(81E0000C): LDR R1, SP, CH
059Eb(B0100000): STR R0, R1, 0H
ELSIFc rd.apos < r.file.alenge THENf
059Fc(80E00004): LDR R0, SP, 4H
05A0c(40080010): ADD R0, R0, 10H
05A1c(81000000): LDR R1, R0, 0H
05A2c(41180001): ADD R1, R1, 1H
05A3c(A1000000): STR R1, R0, 0H
05A4d(E700003A): B 58 [05DFH]
05A5e(80E00004): LDR R0, SP, 4H
05A6e(80000008): LDR R0, R0, 8H
05A7e(D129B74C): BLEQ MT [trap=4, pos=10679]
05A8f(81E00004): LDR R1, SP, 4H
05A9f(8110000C): LDR R1, R1, CH
05AAf(80000008): LDR R0, R0, 8H
05ABf(01190000): SUB R1, R1, R0
05ACf(ED00002C): BGE 44 [05D9H]
INC(r.apos);g buf := Buf(r.file,h r.apos)i;j
05ADg(80E00004): LDR R0, SP, 4H
05AEg(4008000C): ADD R0, R0, CH
05AFg(81000000): LDR R1, R0, 0H
05B0g(41180001): ADD R1, R1, 1H
05B1g(A1000000): STR R1, R0, 0H
05B2h(80E00004): LDR R0, SP, 4H
05B3h(80000008): LDR R0, R0, 8H
05B4i(81E00004): LDR R1, SP, 4H
05B5i(8110000C): LDR R1, R1, CH
05B6j(F7FFFD72): BL -654 [0329H]
05B7j(A0E00010): STR R0, SP, 10H
IF buf = NIL THENk
05B8k(80E00010): LDR R0, SP, 10H
05B9k(E9000012): BNE 18 [05CCH]
IF r.buf.modl THENm WriteBuf(r.file,n r.buf)o ENDp ;
05BAl(80E00004): LDR R0, SP, 4H
05BBl(80000014): LDR R0, R0, 14H
05BCl(D12A184C): BLEQ MT [trap=4, pos=10776]
05BDm(90000008): LDR R0, R0, 8H
05BEm(E1000005): BEQ 5 [05C4H]
05BFn(80E00004): LDR R0, SP, 4H
05C0n(80000008): LDR R0, R0, 8H
05C1o(81E00004): LDR R1, SP, 4H
05C2o(81100014): LDR R1, R1, 14H
05C3p(F7FFFCC6): BL -826 [028AH]
ReadBuf(r.file,q r.buf,r r.apos)s
05C4q(80E00004): LDR R0, SP, 4H
05C5q(80000008): LDR R0, R0, 8H
05C6r(81E00004): LDR R1, SP, 4H
05C7r(81100014): LDR R1, R1, 14H
05C8s(82E00004): LDR R2, SP, 4H
05C9s(8220000C): LDR R2, R2, CH
ELSEt ru.buf := buf
05CAt(F7FFFC78): BL -904 [0243H]
05CBu(E7000003): B 3 [05CFH]
ENDv ;
05CCv(80E00010): LDR R0, SP, 10H
05CDv(81E00004): LDR R1, SP, 4H
05CEv(A0100014): STR R0, R1, 14H
x := r.buf.dataw[0];x r.bpos := 1
05CFw(80E00004): LDR R0, SP, 4H
05D0w(80000014): LDR R0, R0, 14H
05D1w(D12A9C4C): BLEQ MT [trap=4, pos=10908]
05D2x(90000010): LDR R0, R0, 10H
05D3x(81E0000C): LDR R1, SP, CH
05D4x(B0100000): STR R0, R1, 0H
ELSEy xz := 0;a r.eof := TRUE
05D5y(40000001): MOV R0, R0, 1H
05D6y(81E00004): LDR R1, SP, 4H
05D7y(A0100010): STR R0, R1, 10H
05D8z(E7000006): B 6 [05DFH]
05D9a(40000000): MOV R0, R0, 0H
05DAa(81E0000C): LDR R1, SP, CH
05DBa(B0100000): STR R0, R1, 0H
ENDb
05DCb(40000001): MOV R0, R0, 1H
05DDb(81E00004): LDR R1, SP, 4H
05DEb(B0100000): STR R0, R1, 0H
ENDc ReadByte;
05DFc(8FE00000): LDR LNK, SP, 0H
05E0c(4EE80014): ADD SP, SP, 14H
05E1c(C700000F): B LNK
PROCEDURE ReadBytes*(VAR r: Rider; VAR x: ARRAY OF BYTE; n: INTEGER);
VAR i: INTEGER;
BEGINd i := 0;e (*this implementation is to be improved*)
05E2d .PROC 15
05E2d(4EE9001C): SUB SP, SP, 1CH
05E3d(AFE00000): STR LNK, SP, 0H
05E4d(A0E00004): STR R0, SP, 4H
05E5d(A1E00008): STR R1, SP, 8H
05E6d(A2E0000C): STR R2, SP, CH
05E7d(A3E00010): STR R3, SP, 10H
05E8d(A4E00014): STR R4, SP, 14H
05E9e(40000000): MOV R0, R0, 0H
05EAe(A0E00018): STR R0, SP, 18H
WHILE i < n DOf ReadByte(r,g x[i]h);i INC(i) ENDj
05EBf(80E00018): LDR R0, SP, 18H
05ECf(81E00014): LDR R1, SP, 14H
05EDf(00090001): SUB R0, R0, R1
05EEf(ED00000D): BGE 13 [05FCH]
05EFg(80E00004): LDR R0, SP, 4H
05F0g(81E00008): LDR R1, SP, 8H
05F1h(82E00018): LDR R2, SP, 18H
05F2h(83E00010): LDR R3, SP, 10H
05F3h(03290003): SUB R3, R2, R3
05F4h(DA2B9F1C): BLCC MT [trap=1, pos=11167]
05F5h(83E0000C): LDR R3, SP, CH
05F6h(02380002): ADD R2, R3, R2
05F7i(F7FFFF80): BL -128 [0578H]
05F8j(80E00018): LDR R0, SP, 18H
05F9j(40080001): ADD R0, R0, 1H
05FAj(A0E00018): STR R0, SP, 18H
05FBj(E7FFFFEF): B -17 [05EBH]
ENDk ReadBytes;
05FCk(8FE00000): LDR LNK, SP, 0H
05FDk(4EE8001C): ADD SP, SP, 1CH
05FEk(C700000F): B LNK
PROCEDURE Read*(VAR r: Rider; VAR ch: CHAR);
VAR buf: Buffer; (*same as ReadByte*)
BEGINl
05FFl .PROC 16
05FFl(4EE90014): SUB SP, SP, 14H
0600l(AFE00000): STR LNK, SP, 0H
0601l(A0E00004): STR R0, SP, 4H
0602l(A1E00008): STR R1, SP, 8H
0603l(A2E0000C): STR R2, SP, CH
IF r.apos # r.buf.aposm THENn r.buf := GetBuf(r.file,o r.apos)p ENDq ;
0604m(80E00004): LDR R0, SP, 4H
0605m(80000014): LDR R0, R0, 14H
0606m(D12C3B4C): BLEQ MT [trap=4, pos=11323]
0607n(81E00004): LDR R1, SP, 4H
0608n(8110000C): LDR R1, R1, CH
0609n(80000000): LDR R0, R0, 0H
060An(01190000): SUB R1, R1, R0
060Bn(E1000007): BEQ 7 [0613H]
060Co(80E00004): LDR R0, SP, 4H
060Do(80000008): LDR R0, R0, 8H
060Ep(81E00004): LDR R1, SP, 4H
060Fp(8110000C): LDR R1, R1, CH
0610q(F7FFFD3F): BL -705 [0350H]
0611q(81E00004): LDR R1, SP, 4H
0612q(A0100014): STR R0, R1, 14H
IF r.bpos < r.buf.limr THENs ch := CHR(r.buf.datat[r.bpos]u);v INC(r.bpos)
0613r(80E00004): LDR R0, SP, 4H
0614r(80000014): LDR R0, R0, 14H
0615r(D12C804C): BLEQ MT [trap=4, pos=11392]
0616s(81E00004): LDR R1, SP, 4H
0617s(81100010): LDR R1, R1, 10H
0618s(80000004): LDR R0, R0, 4H
0619s(01190000): SUB R1, R1, R0
061As(ED000011): BGE 17 [062CH]
061Bt(80E00004): LDR R0, SP, 4H
061Ct(80000014): LDR R0, R0, 14H
061Dt(D12C9A4C): BLEQ MT [trap=4, pos=11418]
061Eu(81E00004): LDR R1, SP, 4H
061Fu(81100010): LDR R1, R1, 10H
0620u(42190400): SUB R2, R1, 400H
0621u(DA2CA21C): BLCC MT [trap=1, pos=11426]
0622u(00080001): ADD R0, R0, R1
0623v(90000010): LDR R0, R0, 10H
0624v(81E0000C): LDR R1, SP, CH
0625v(B0100000): STR R0, R1, 0H
ELSIFw rx.apos < r.file.alengy THENz
0626w(80E00004): LDR R0, SP, 4H
0627w(40080010): ADD R0, R0, 10H
0628w(81000000): LDR R1, R0, 0H
0629w(41180001): ADD R1, R1, 1H
062Aw(A1000000): STR R1, R0, 0H
062Bx(E700003A): B 58 [0666H]
062Cy(80E00004): LDR R0, SP, 4H
062Dy(80000008): LDR R0, R0, 8H
062Ey(D12CD04C): BLEQ MT [trap=4, pos=11472]
062Fz(81E00004): LDR R1, SP, 4H
0630z(8110000C): LDR R1, R1, CH
0631z(80000008): LDR R0, R0, 8H
0632z(01190000): SUB R1, R1, R0
0633z(ED00002C): BGE 44 [0660H]
INC(r.apos);a buf := Buf(r.file,b r.apos)c;d
0634a(80E00004): LDR R0, SP, 4H
0635a(4008000C): ADD R0, R0, CH
0636a(81000000): LDR R1, R0, 0H
0637a(41180001): ADD R1, R1, 1H
0638a(A1000000): STR R1, R0, 0H
0639b(80E00004): LDR R0, SP, 4H
063Ab(80000008): LDR R0, R0, 8H
063Bc(81E00004): LDR R1, SP, 4H
063Cc(8110000C): LDR R1, R1, CH
063Dd(F7FFFCEB): BL -789 [0329H]
063Ed(A0E00010): STR R0, SP, 10H
IF buf = NIL THENe
063Fe(80E00010): LDR R0, SP, 10H
0640e(E9000012): BNE 18 [0653H]
IF r.buf.modf THENg WriteBuf(r.file,h r.buf)i ENDj ;
0641f(80E00004): LDR R0, SP, 4H
0642f(80000014): LDR R0, R0, 14H
0643f(D12D314C): BLEQ MT [trap=4, pos=11569]
0644g(90000008): LDR R0, R0, 8H
0645g(E1000005): BEQ 5 [064BH]
0646h(80E00004): LDR R0, SP, 4H
0647h(80000008): LDR R0, R0, 8H
0648i(81E00004): LDR R1, SP, 4H
0649i(81100014): LDR R1, R1, 14H
064Aj(F7FFFC3F): BL -961 [028AH]
ReadBuf(r.file,k r.buf,l r.apos)m
064Bk(80E00004): LDR R0, SP, 4H
064Ck(80000008): LDR R0, R0, 8H
064Dl(81E00004): LDR R1, SP, 4H
064El(81100014): LDR R1, R1, 14H
064Fm(82E00004): LDR R2, SP, 4H
0650m(8220000C): LDR R2, R2, CH
ELSEn ro.buf := buf
0651n(F7FFFBF1): BL -1039 [0243H]
0652o(E7000003): B 3 [0656H]
ENDp ;
0653p(80E00010): LDR R0, SP, 10H
0654p(81E00004): LDR R1, SP, 4H
0655p(A0100014): STR R0, R1, 14H
ch := CHR(r.buf.dataq[0]);r r.bpos := 1
0656q(80E00004): LDR R0, SP, 4H
0657q(80000014): LDR R0, R0, 14H
0658q(D12DBA4C): BLEQ MT [trap=4, pos=11706]
0659r(90000010): LDR R0, R0, 10H
065Ar(81E0000C): LDR R1, SP, CH
065Br(B0100000): STR R0, R1, 0H
ELSEs cht := 0X;u r.eof := TRUE
065Cs(40000001): MOV R0, R0, 1H
065Ds(81E00004): LDR R1, SP, 4H
065Es(A0100010): STR R0, R1, 10H
065Ft(E7000006): B 6 [0666H]
0660u(40000000): MOV R0, R0, 0H
0661u(81E0000C): LDR R1, SP, CH
0662u(B0100000): STR R0, R1, 0H
ENDv
0663v(40000001): MOV R0, R0, 1H
0664v(81E00004): LDR R1, SP, 4H
0665v(B0100000): STR R0, R1, 0H
ENDw Read;
0666w(8FE00000): LDR LNK, SP, 0H
0667w(4EE80014): ADD SP, SP, 14H
0668w(C700000F): B LNK
PROCEDURE ReadInt*(VAR R: Rider; VAR x: INTEGER);
VAR x0, x1, x2, x3: BYTE;
BEGINx ReadByte(R,y x0)z;a ReadByte(R,b x1)c;d ReadByte(R,e x2)f;g ReadByte(R,h x3)i;j
0669x .PROC 17
0669x(4EE90014): SUB SP, SP, 14H
066Ax(AFE00000): STR LNK, SP, 0H
066Bx(A0E00004): STR R0, SP, 4H
066Cx(A1E00008): STR R1, SP, 8H
066Dx(A2E0000C): STR R2, SP, CH
066Ey(80E00004): LDR R0, SP, 4H
066Fy(81E00008): LDR R1, SP, 8H
0670z(42E80010): ADD R2, SP, 10H
0671a(F7FFFF06): BL -250 [0578H]
0672b(80E00004): LDR R0, SP, 4H
0673b(81E00008): LDR R1, SP, 8H
0674c(42E80011): ADD R2, SP, 11H
0675d(F7FFFF02): BL -254 [0578H]
0676e(80E00004): LDR R0, SP, 4H
0677e(81E00008): LDR R1, SP, 8H
0678f(42E80012): ADD R2, SP, 12H
0679g(F7FFFEFE): BL -258 [0578H]
067Ah(80E00004): LDR R0, SP, 4H
067Bh(81E00008): LDR R1, SP, 8H
067Ci(42E80013): ADD R2, SP, 13H
067Dj(F7FFFEFA): BL -262 [0578H]
x := ((x3 * 100H +k x2)l * 100H +m x1)n * 100H +o x0
067Ek(90E00013): LDR R0, SP, 13H
067Fk(40010008): LSL R0, R0, 8H
0680l(91E00012): LDR R1, SP, 12H
0681l(00080001): ADD R0, R0, R1
0682m(40010008): LSL R0, R0, 8H
0683n(91E00011): LDR R1, SP, 11H
0684n(00080001): ADD R0, R0, R1
0685o(40010008): LSL R0, R0, 8H
ENDp ReadInt;
0686p(91E00010): LDR R1, SP, 10H
0687p(00080001): ADD R0, R0, R1
0688p(81E0000C): LDR R1, SP, CH
0689p(A0100000): STR R0, R1, 0H
068Ap(8FE00000): LDR LNK, SP, 0H
068Bp(4EE80014): ADD SP, SP, 14H
068Cp(C700000F): B LNK
PROCEDURE ReadSet*(VAR R: Rider; VAR s: SET);
VAR n: INTEGER;
BEGINq ReadInt(R,r SYSTEM.VAL(INTEGER, s))s
068Dq .PROC 18
068Dq(4EE90014): SUB SP, SP, 14H
068Eq(AFE00000): STR LNK, SP, 0H
068Fq(A0E00004): STR R0, SP, 4H
0690q(A1E00008): STR R1, SP, 8H
0691q(A2E0000C): STR R2, SP, CH
0692r(80E00004): LDR R0, SP, 4H
0693r(81E00008): LDR R1, SP, 8H
0694s(82E0000C): LDR R2, SP, CH
ENDt ReadSet;
0695t(F7FFFFD3): BL -45 [0669H]
0696t(8FE00000): LDR LNK, SP, 0H
0697t(4EE80014): ADD SP, SP, 14H
0698t(C700000F): B LNK
PROCEDURE ReadReal*(VAR R: Rider; VAR x: REAL);
VAR n: INTEGER;
BEGINu ReadInt(R,v SYSTEM.VAL(INTEGER, x))w
0699u .PROC 19
0699u(4EE90014): SUB SP, SP, 14H
069Au(AFE00000): STR LNK, SP, 0H
069Bu(A0E00004): STR R0, SP, 4H
069Cu(A1E00008): STR R1, SP, 8H
069Du(A2E0000C): STR R2, SP, CH
069Ev(80E00004): LDR R0, SP, 4H
069Fv(81E00008): LDR R1, SP, 8H
06A0w(82E0000C): LDR R2, SP, CH
ENDx ReadReal;
06A1x(F7FFFFC7): BL -57 [0669H]
06A2x(8FE00000): LDR LNK, SP, 0H
06A3x(4EE80014): ADD SP, SP, 14H
06A4x(C700000F): B LNK
PROCEDURE ReadString*(VAR R: Rider; VAR x: ARRAY OF CHAR);
VAR i: INTEGER; ch: CHAR;
BEGINy i := 0;z Read(R,a ch)b;c
06A5y .PROC 20
06A5y(4EE9001C): SUB SP, SP, 1CH
06A6y(AFE00000): STR LNK, SP, 0H
06A7y(A0E00004): STR R0, SP, 4H
06A8y(A1E00008): STR R1, SP, 8H
06A9y(A2E0000C): STR R2, SP, CH
06AAy(A3E00010): STR R3, SP, 10H
06ABz(40000000): MOV R0, R0, 0H
06ACz(A0E00014): STR R0, SP, 14H
06ADa(80E00004): LDR R0, SP, 4H
06AEa(81E00008): LDR R1, SP, 8H
06AFb(42E80018): ADD R2, SP, 18H
06B0c(F7FFFF4E): BL -178 [05FFH]
WHILE ch # 0X DOd
06B1d(90E00018): LDR R0, SP, 18H
06B2d(E1000015): BEQ 21 [06C8H]
IF i < LEN(x)-e1 THENf x[i]g := ch;h INC(i) ENDi ;
06B3e(80E00010): LDR R0, SP, 10H
06B4f(40090001): SUB R0, R0, 1H
06B5f(81E00014): LDR R1, SP, 14H
06B6f(01190000): SUB R1, R1, R0
06B7f(ED00000B): BGE 11 [06C3H]
06B8g(80E00014): LDR R0, SP, 14H
06B9g(81E00010): LDR R1, SP, 10H
06BAg(01090001): SUB R1, R0, R1
06BBg(DA30911C): BLCC MT [trap=1, pos=12433]
06BCg(81E0000C): LDR R1, SP, CH
06BDg(00180000): ADD R0, R1, R0
06BEh(91E00018): LDR R1, SP, 18H
06BFh(B1000000): STR R1, R0, 0H
06C0i(80E00014): LDR R0, SP, 14H
06C1i(40080001): ADD R0, R0, 1H
06C2i(A0E00014): STR R0, SP, 14H
Read(R,j ch)k
06C3j(80E00004): LDR R0, SP, 4H
06C4j(81E00008): LDR R1, SP, 8H
06C5k(42E80018): ADD R2, SP, 18H
ENDl ;
06C6l(F7FFFF38): BL -200 [05FFH]
06C7l(E7FFFFE9): B -23 [06B1H]
x[i]m := 0X
06C8m(80E00014): LDR R0, SP, 14H
06C9m(81E00010): LDR R1, SP, 10H
06CAm(01090001): SUB R1, R0, R1
06CBm(DA30CA1C): BLCC MT [trap=1, pos=12490]
06CCm(81E0000C): LDR R1, SP, CH
06CDm(00180000): ADD R0, R1, R0
ENDn ReadString;
06CEn(41000000): MOV R1, R0, 0H
06CFn(B1000000): STR R1, R0, 0H
06D0n(8FE00000): LDR LNK, SP, 0H
06D1n(4EE8001C): ADD SP, SP, 1CH
06D2n(C700000F): B LNK
PROCEDURE ReadNum*(VAR R: Rider; VAR x: INTEGER);
VAR n, y: INTEGER; b: BYTE;
BEGINo n := 32;p y := 0;q ReadByte(R,r b)s;t
06D3o .PROC 21
06D3o(4EE9001C): SUB SP, SP, 1CH
06D4o(AFE00000): STR LNK, SP, 0H
06D5o(A0E00004): STR R0, SP, 4H
06D6o(A1E00008): STR R1, SP, 8H
06D7o(A2E0000C): STR R2, SP, CH
06D8p(40000020): MOV R0, R0, 20H
06D9p(A0E00010): STR R0, SP, 10H
06DAq(40000000): MOV R0, R0, 0H
06DBq(A0E00014): STR R0, SP, 14H
06DCr(80E00004): LDR R0, SP, 4H
06DDr(81E00008): LDR R1, SP, 8H
06DEs(42E80018): ADD R2, SP, 18H
06DFt(F7FFFE98): BL -360 [0578H]
WHILE b >= 80H DOu y := ROR(y + b-v80H,w 7);x DEC(n, 7);y ReadByte(R,z b)a ENDb ;
06E0u(90E00018): LDR R0, SP, 18H
06E1u(40090080): SUB R0, R0, 80H
06E2u(E500000E): BLT 14 [06F1H]
06E3v(80E00014): LDR R0, SP, 14H
06E4v(91E00018): LDR R1, SP, 18H
06E5v(00080001): ADD R0, R0, R1
06E6w(40090080): SUB R0, R0, 80H
06E7x(40030007): ROR R0, R0, 7H
06E8x(A0E00014): STR R0, SP, 14H
06E9y(80E00010): LDR R0, SP, 10H
06EAy(40090007): SUB R0, R0, 7H
06EBy(A0E00010): STR R0, SP, 10H
06ECz(80E00004): LDR R0, SP, 4H
06EDz(81E00008): LDR R1, SP, 8H
06EEa(42E80018): ADD R2, SP, 18H
06EFb(F7FFFE88): BL -376 [0578H]
06F0b(E7FFFFEF): B -17 [06E0H]
IF n <= 4 THENc x := ROR(y + b MOD 10H,d 4) ELSEe xf := ASR(ROR(y + b,g 7),h n-7)i ENDj
06F1c(80E00010): LDR R0, SP, 10H
06F2c(40090004): SUB R0, R0, 4H
06F3c(EE000008): BGT 8 [06FCH]
06F4d(90E00018): LDR R0, SP, 18H
06F5d(4004000F): AND R0, R0, FH
06F6d(81E00014): LDR R1, SP, 14H
06F7d(00180000): ADD R0, R1, R0
06F8e(40030004): ROR R0, R0, 4H
06F9e(81E0000C): LDR R1, SP, CH
06FAe(A0100000): STR R0, R1, 0H
06FBf(E7000009): B 9 [0705H]
06FCg(80E00014): LDR R0, SP, 14H
06FDg(91E00018): LDR R1, SP, 18H
06FEg(00080001): ADD R0, R0, R1
06FFh(40030007): ROR R0, R0, 7H
0700i(81E00010): LDR R1, SP, 10H
0701i(41190007): SUB R1, R1, 7H
0702j(00020001): ASR R0, R0, R1
0703j(81E0000C): LDR R1, SP, CH
0704j(A0100000): STR R0, R1, 0H
ENDk ReadNum;
0705k(8FE00000): LDR LNK, SP, 0H
0706k(4EE8001C): ADD SP, SP, 1CH
0707k(C700000F): B LNK
(*---------------------------Write---------------------------*)
PROCEDURE NewExt(f: File);
VAR i, k: INTEGER; ext: Index;
BEGINl k := (f.alengm - STS)n DIV XS;o
0708l(4EE90014): SUB SP, SP, 14H
0709l(AFE00000): STR LNK, SP, 0H
070Al(A0E00004): STR R0, SP, 4H
070Bm(80E00004): LDR R0, SP, 4H
070Cm(D132B34C): BLEQ MT [trap=4, pos=12979]
070Dn(80000008): LDR R0, R0, 8H
070En(40090040): SUB R0, R0, 40H
070Fo(40020008): ASR R0, R0, 8H
0710o(A0E0000C): STR R0, SP, CH
NEW(ext);p ext.adrq := 0;r ext.mods := TRUE;t f.extu[k]v := ext;w i := XS;x
0711p(40E80010): ADD R0, SP, 10H
0712p .FIXUP D
0712p(8D0002D3): LDR SB, MT, MOD0 [Files]
0713p(41D8007C): ADD R1, SB, 7CH [data]
0714p(D732D00C): BL MT [trap=0, pos=13008]
0715q(80E00010): LDR R0, SP, 10H
0716q(D132D84C): BLEQ MT [trap=4, pos=13016]
0717r(41000000): MOV R1, R0, 0H
0718r(A1000000): STR R1, R0, 0H
0719s(80E00010): LDR R0, SP, 10H
071As(D132E64C): BLEQ MT [trap=4, pos=13030]
071Bt(41000001): MOV R1, R0, 1H
071Ct(B1000004): STR R1, R0, 4H
071Du(80E00004): LDR R0, SP, 4H
071Eu(D132F54C): BLEQ MT [trap=4, pos=13045]
071Fv(81E0000C): LDR R1, SP, CH
0720v(4219000C): SUB R2, R1, CH
0721v(DA32F81C): BLCC MT [trap=1, pos=13048]
0722v(41110002): LSL R1, R1, 2H
0723v(00080001): ADD R0, R0, R1
0724w(81E00010): LDR R1, SP, 10H
0725w(A1000040): STR R1, R0, 40H
0726x(40000100): MOV R0, R0, 100H
0727x(A0E00008): STR R0, SP, 8H
REPEAT DEC(i);y ext.secz[i]a := 0 UNTILb i = 0
0728y(80E00008): LDR R0, SP, 8H
0729y(40090001): SUB R0, R0, 1H
072Ay(A0E00008): STR R0, SP, 8H
072Bz(80E00010): LDR R0, SP, 10H
072Cz(D133244C): BLEQ MT [trap=4, pos=13092]
072Da(81E00008): LDR R1, SP, 8H
072Ea(42190100): SUB R2, R1, 100H
072Fa(DA33271C): BLCC MT [trap=1, pos=13095]
0730a(41110002): LSL R1, R1, 2H
0731a(00080001): ADD R0, R0, R1
0732b(41000000): MOV R1, R0, 0H
0733b(A1000008): STR R1, R0, 8H
ENDc NewExt;
0734c(80E00008): LDR R0, SP, 8H
0735c(E9FFFFF2): BNE -14 [0728H]
0736c(8FE00000): LDR LNK, SP, 0H
0737c(4EE80014): ADD SP, SP, 14H
0738c(C700000F): B LNK
PROCEDURE WriteByte*(VAR r: Rider; x: BYTE);
VAR f: File; buf: Buffer;
BEGINd
0739d .PROC 22
0739d(4EE90018): SUB SP, SP, 18H
073Ad(AFE00000): STR LNK, SP, 0H
073Bd(A0E00004): STR R0, SP, 4H
073Cd(A1E00008): STR R1, SP, 8H
073Dd(A2E0000C): STR R2, SP, CH
IF r.apos # r.buf.apose THENf r.buf := GetBuf(r.file,g r.apos)h;i END ;
073Ee(80E00004): LDR R0, SP, 4H
073Fe(80000014): LDR R0, R0, 14H
0740e(D133B74C): BLEQ MT [trap=4, pos=13239]
0741f(81E00004): LDR R1, SP, 4H
0742f(8110000C): LDR R1, R1, CH
0743f(80000000): LDR R0, R0, 0H
0744f(01190000): SUB R1, R1, R0
0745f(E1000007): BEQ 7 [074DH]
0746g(80E00004): LDR R0, SP, 4H
0747g(80000008): LDR R0, R0, 8H
0748h(81E00004): LDR R1, SP, 4H
0749h(8110000C): LDR R1, R1, CH
074Ai(F7FFFC05): BL -1019 [0350H]
074Bi(81E00004): LDR R1, SP, 4H
074Ci(A0100014): STR R0, R1, 14H
IF r.bpos >= r.buf.limj THENk
074Dj(80E00004): LDR R0, SP, 4H
074Ej(80000014): LDR R0, R0, 14H
074Fj(D133FE4C): BLEQ MT [trap=4, pos=13310]
0750k(81E00004): LDR R1, SP, 4H
0751k(81100010): LDR R1, R1, 10H
0752k(80000004): LDR R0, R0, 4H
0753k(01190000): SUB R1, R1, R0
0754k(E5000064): BLT 100 [07B9H]
IF r.bpos < SS THENl
0755l(80E00004): LDR R0, SP, 4H
0756l(80000010): LDR R0, R0, 10H
0757l(40090400): SUB R0, R0, 400H
0758l(ED000014): BGE 20 [076DH]
INC(r.buf.limm);n INC(r.file.blengo);p r.file.modHq := TRUE
0759m(80E00004): LDR R0, SP, 4H
075Am(80000014): LDR R0, R0, 14H
075Bm(D134334C): BLEQ MT [trap=4, pos=13363]
075Cn(40080004): ADD R0, R0, 4H
075Dn(81000000): LDR R1, R0, 0H
075En(41180001): ADD R1, R1, 1H
075Fn(A1000000): STR R1, R0, 0H
0760o(80E00004): LDR R0, SP, 4H
0761o(80000008): LDR R0, R0, 8H
0762o(D134464C): BLEQ MT [trap=4, pos=13382]
0763p(4008000C): ADD R0, R0, CH
0764p(81000000): LDR R1, R0, 0H
0765p(41180001): ADD R1, R1, 1H
0766p(A1000000): STR R1, R0, 0H
0767q(80E00004): LDR R0, SP, 4H
0768q(80000008): LDR R0, R0, 8H
0769q(D134544C): BLEQ MT [trap=4, pos=13396]
ELSEr fs := r.file;t WriteBuf(f,u r.buf)v;w INC(r.apos);x buf := Buf(r.file,y r.apos)z;a
076Ar(41000001): MOV R1, R0, 1H
076Br(B1000010): STR R1, R0, 10H
076Cs(E700004C): B 76 [07B9H]
076Dt(80E00004): LDR R0, SP, 4H
076Et(80000008): LDR R0, R0, 8H
076Ft(A0E00010): STR R0, SP, 10H
0770u(80E00010): LDR R0, SP, 10H
0771v(81E00004): LDR R1, SP, 4H
0772v(81100014): LDR R1, R1, 14H
0773w(F7FFFB16): BL -1258 [028AH]
0774x(80E00004): LDR R0, SP, 4H
0775x(4008000C): ADD R0, R0, CH
0776x(81000000): LDR R1, R0, 0H
0777x(41180001): ADD R1, R1, 1H
0778x(A1000000): STR R1, R0, 0H
0779y(80E00004): LDR R0, SP, 4H
077Ay(80000008): LDR R0, R0, 8H
077Bz(81E00004): LDR R1, SP, 4H
077Cz(8110000C): LDR R1, R1, CH
077Da(F7FFFBAB): BL -1109 [0329H]
077Ea(A0E00014): STR R0, SP, 14H
IF buf = NIL THENb
077Fb(80E00014): LDR R0, SP, 14H
0780b(E9000032): BNE 50 [07B3H]
IF r.apos <= f.alengc THENd ReadBuf(f,e r.buf,f r.apos)g
0781c(80E00010): LDR R0, SP, 10H
0782c(D134EA4C): BLEQ MT [trap=4, pos=13546]
0783d(81E00004): LDR R1, SP, 4H
0784d(8110000C): LDR R1, R1, CH
0785d(80000008): LDR R0, R0, 8H
0786d(01190000): SUB R1, R1, R0
0787d(EE000007): BGT 7 [078FH]
0788e(80E00010): LDR R0, SP, 10H
0789f(81E00004): LDR R1, SP, 4H
078Af(81100014): LDR R1, R1, 14H
078Bg(82E00004): LDR R2, SP, 4H
078Cg(8220000C): LDR R2, R2, CH
ELSEh ri.buf.aposj := r.apos;k r.buf.liml := 1;m f.alengn := f.alengo + 1;p f.blengq := 1;r f.modHs := TRUE;t
078Dh(F7FFFAB5): BL -1355 [0243H]
078Ei(E7000023): B 35 [07B2H]
078Fj(80E00004): LDR R0, SP, 4H
0790j(80000014): LDR R0, R0, 14H
0791j(D135234C): BLEQ MT [trap=4, pos=13603]
0792k(81E00004): LDR R1, SP, 4H
0793k(8110000C): LDR R1, R1, CH
0794k(A1000000): STR R1, R0, 0H
0795l(80E00004): LDR R0, SP, 4H
0796l(80000014): LDR R0, R0, 14H
0797l(D135384C): BLEQ MT [trap=4, pos=13624]
0798m(41000001): MOV R1, R0, 1H
0799m(A1000004): STR R1, R0, 4H
079An(80E00010): LDR R0, SP, 10H
079Bn(D135464C): BLEQ MT [trap=4, pos=13638]
079Co(81E00010): LDR R1, SP, 10H
079Do(D135514C): BLEQ MT [trap=4, pos=13649]
079Ep(81100008): LDR R1, R1, 8H
079Fp(41180001): ADD R1, R1, 1H
07A0p(A1000008): STR R1, R0, 8H
07A1q(80E00010): LDR R0, SP, 10H
07A2q(D1355E4C): BLEQ MT [trap=4, pos=13662]
07A3r(41000001): MOV R1, R0, 1H
07A4r(A100000C): STR R1, R0, CH
07A5s(80E00010): LDR R0, SP, 10H
07A6s(D1356B4C): BLEQ MT [trap=4, pos=13675]
07A7t(41000001): MOV R1, R0, 1H
07A8t(B1000010): STR R1, R0, 10H
IF (f.alengu - STS)v MOD XS =w 0 THENx NewExt(f)y ENDz
07A9u(80E00010): LDR R0, SP, 10H
07AAu(D1358C4C): BLEQ MT [trap=4, pos=13708]
07ABv(80000008): LDR R0, R0, 8H
07ACv(40090040): SUB R0, R0, 40H
07ADw(400400FF): AND R0, R0, FFH
07AEx(40090000): SUB R0, R0, 0H
07AFx(E9000002): BNE 2 [07B2H]
07B0y(80E00010): LDR R0, SP, 10H
07B1z(F7FFFF56): BL -170 [0708H]
END
ELSE ra.buf := buf
07B2a(E7000003): B 3 [07B6H]
ENDb ;
07B3b(80E00014): LDR R0, SP, 14H
07B4b(81E00004): LDR R1, SP, 4H
07B5b(A0100014): STR R0, R1, 14H
r.bpos := 0
ENDc
07B6c(40000000): MOV R0, R0, 0H
07B7c(81E00004): LDR R1, SP, 4H
07B8c(A0100010): STR R0, R1, 10H
END ;
r.buf.datad[r.bpos]e := x;f INC(r.bpos);g r.buf.modh := TRUE
07B9d(80E00004): LDR R0, SP, 4H
07BAd(80000014): LDR R0, R0, 14H
07BBd(D1361E4C): BLEQ MT [trap=4, pos=13854]
07BCe(81E00004): LDR R1, SP, 4H
07BDe(81100010): LDR R1, R1, 10H
07BEe(42190400): SUB R2, R1, 400H
07BFe(DA36261C): BLCC MT [trap=1, pos=13862]
07C0e(00080001): ADD R0, R0, R1
07C1f(91E0000C): LDR R1, SP, CH
07C2f(B1000010): STR R1, R0, 10H
07C3g(80E00004): LDR R0, SP, 4H
07C4g(40080010): ADD R0, R0, 10H
07C5g(81000000): LDR R1, R0, 0H
07C6g(41180001): ADD R1, R1, 1H
07C7g(A1000000): STR R1, R0, 0H
07C8h(80E00004): LDR R0, SP, 4H
07C9h(80000014): LDR R0, R0, 14H
07CAh(D136434C): BLEQ MT [trap=4, pos=13891]
ENDi WriteByte;
07CBi(41000001): MOV R1, R0, 1H
07CCi(B1000008): STR R1, R0, 8H
07CDi(8FE00000): LDR LNK, SP, 0H
07CEi(4EE80018): ADD SP, SP, 18H
07CFi(C700000F): B LNK
PROCEDURE WriteBytes*(VAR r: Rider; x: ARRAY OF BYTE; n: INTEGER);
VAR i: INTEGER;
BEGINj i := 0;k (*this implementation is to be improed*)
07D0j .PROC 23
07D0j(4EE9001C): SUB SP, SP, 1CH
07D1j(AFE00000): STR LNK, SP, 0H
07D2j(A0E00004): STR R0, SP, 4H
07D3j(A1E00008): STR R1, SP, 8H
07D4j(A2E0000C): STR R2, SP, CH
07D5j(A3E00010): STR R3, SP, 10H
07D6j(A4E00014): STR R4, SP, 14H
07D7k(40000000): MOV R0, R0, 0H
07D8k(A0E00018): STR R0, SP, 18H
WHILE i < n DOl WriteByte(r,m x[i]n)o;p INC(i) ENDq
07D9l(80E00018): LDR R0, SP, 18H
07DAl(81E00014): LDR R1, SP, 14H
07DBl(00090001): SUB R0, R0, R1
07DCl(ED00000E): BGE 14 [07EBH]
07DDm(80E00004): LDR R0, SP, 4H
07DEm(81E00008): LDR R1, SP, 8H
07DFn(82E00018): LDR R2, SP, 18H
07E0n(83E00010): LDR R3, SP, 10H
07E1n(03290003): SUB R3, R2, R3
07E2n(DA37141C): BLCC MT [trap=1, pos=14100]
07E3n(83E0000C): LDR R3, SP, CH
07E4n(02380002): ADD R2, R3, R2
07E5o(92200000): LDR R2, R2, 0H
07E6p(F7FFFF52): BL -174 [0739H]
07E7q(80E00018): LDR R0, SP, 18H
07E8q(40080001): ADD R0, R0, 1H
07E9q(A0E00018): STR R0, SP, 18H
07EAq(E7FFFFEE): B -18 [07D9H]
ENDr WriteBytes;
07EBr(8FE00000): LDR LNK, SP, 0H
07ECr(4EE8001C): ADD SP, SP, 1CH
07EDr(C700000F): B LNK
PROCEDURE Write*(VAR r: Rider; ch: CHAR);
VAR f: File; buf: Buffer;
BEGINs (*same as WriteByte*)
07EEs .PROC 24
07EEs(4EE90018): SUB SP, SP, 18H
07EFs(AFE00000): STR LNK, SP, 0H
07F0s(A0E00004): STR R0, SP, 4H
07F1s(A1E00008): STR R1, SP, 8H
07F2s(A2E0000C): STR R2, SP, CH
IF r.apos # r.buf.apost THENu r.buf := GetBuf(r.file,v r.apos)w;x END ;
07F3t(80E00004): LDR R0, SP, 4H
07F4t(80000014): LDR R0, R0, 14H
07F5t(D137B74C): BLEQ MT [trap=4, pos=14263]
07F6u(81E00004): LDR R1, SP, 4H
07F7u(8110000C): LDR R1, R1, CH
07F8u(80000000): LDR R0, R0, 0H
07F9u(01190000): SUB R1, R1, R0
07FAu(E1000007): BEQ 7 [0802H]
07FBv(80E00004): LDR R0, SP, 4H
07FCv(80000008): LDR R0, R0, 8H
07FDw(81E00004): LDR R1, SP, 4H
07FEw(8110000C): LDR R1, R1, CH
07FFx(F7FFFB50): BL -1200 [0350H]
0800x(81E00004): LDR R1, SP, 4H
0801x(A0100014): STR R0, R1, 14H
IF r.bpos >= r.buf.limy THENz
0802y(80E00004): LDR R0, SP, 4H
0803y(80000014): LDR R0, R0, 14H
0804y(D137FE4C): BLEQ MT [trap=4, pos=14334]
0805z(81E00004): LDR R1, SP, 4H
0806z(81100010): LDR R1, R1, 10H
0807z(80000004): LDR R0, R0, 4H
0808z(01190000): SUB R1, R1, R0
0809z(E5000064): BLT 100 [086EH]
IF r.bpos < SS THENa
080Aa(80E00004): LDR R0, SP, 4H
080Ba(80000010): LDR R0, R0, 10H
080Ca(40090400): SUB R0, R0, 400H
080Da(ED000014): BGE 20 [0822H]
INC(r.buf.limb);c INC(r.file.blengd);e r.file.modHf := TRUE
080Eb(80E00004): LDR R0, SP, 4H
080Fb(80000014): LDR R0, R0, 14H
0810b(D138334C): BLEQ MT [trap=4, pos=14387]
0811c(40080004): ADD R0, R0, 4H
0812c(81000000): LDR R1, R0, 0H
0813c(41180001): ADD R1, R1, 1H
0814c(A1000000): STR R1, R0, 0H
0815d(80E00004): LDR R0, SP, 4H
0816d(80000008): LDR R0, R0, 8H
0817d(D138464C): BLEQ MT [trap=4, pos=14406]
0818e(4008000C): ADD R0, R0, CH
0819e(81000000): LDR R1, R0, 0H
081Ae(41180001): ADD R1, R1, 1H
081Be(A1000000): STR R1, R0, 0H
081Cf(80E00004): LDR R0, SP, 4H
081Df(80000008): LDR R0, R0, 8H
081Ef(D138544C): BLEQ MT [trap=4, pos=14420]
ELSEg fh := r.file;i WriteBuf(f,j r.buf)k;l INC(r.apos);m buf := Buf(r.file,n r.apos)o;p
081Fg(41000001): MOV R1, R0, 1H
0820g(B1000010): STR R1, R0, 10H
0821h(E700004C): B 76 [086EH]
0822i(80E00004): LDR R0, SP, 4H
0823i(80000008): LDR R0, R0, 8H
0824i(A0E00010): STR R0, SP, 10H
0825j(80E00010): LDR R0, SP, 10H
0826k(81E00004): LDR R1, SP, 4H
0827k(81100014): LDR R1, R1, 14H
0828l(F7FFFA61): BL -1439 [028AH]
0829m(80E00004): LDR R0, SP, 4H
082Am(4008000C): ADD R0, R0, CH
082Bm(81000000): LDR R1, R0, 0H
082Cm(41180001): ADD R1, R1, 1H
082Dm(A1000000): STR R1, R0, 0H
082En(80E00004): LDR R0, SP, 4H
082Fn(80000008): LDR R0, R0, 8H
0830o(81E00004): LDR R1, SP, 4H
0831o(8110000C): LDR R1, R1, CH
0832p(F7FFFAF6): BL -1290 [0329H]
0833p(A0E00014): STR R0, SP, 14H
IF buf = NIL THENq
0834q(80E00014): LDR R0, SP, 14H
0835q(E9000032): BNE 50 [0868H]
IF r.apos <= f.alengr THENs ReadBuf(f,t r.buf,u r.apos)v
0836r(80E00010): LDR R0, SP, 10H
0837r(D138EA4C): BLEQ MT [trap=4, pos=14570]
0838s(81E00004): LDR R1, SP, 4H
0839s(8110000C): LDR R1, R1, CH
083As(80000008): LDR R0, R0, 8H
083Bs(01190000): SUB R1, R1, R0
083Cs(EE000007): BGT 7 [0844H]
083Dt(80E00010): LDR R0, SP, 10H
083Eu(81E00004): LDR R1, SP, 4H
083Fu(81100014): LDR R1, R1, 14H
0840v(82E00004): LDR R2, SP, 4H
0841v(8220000C): LDR R2, R2, CH
ELSEw rx.buf.aposy := r.apos;z r.buf.lima := 1;b f.alengc := f.alengd + 1;e f.blengf := 1;g f.modHh := TRUE;i
0842w(F7FFFA00): BL -1536 [0243H]
0843x(E7000023): B 35 [0867H]
0844y(80E00004): LDR R0, SP, 4H
0845y(80000014): LDR R0, R0, 14H
0846y(D139234C): BLEQ MT [trap=4, pos=14627]
0847z(81E00004): LDR R1, SP, 4H
0848z(8110000C): LDR R1, R1, CH
0849z(A1000000): STR R1, R0, 0H
084Aa(80E00004): LDR R0, SP, 4H
084Ba(80000014): LDR R0, R0, 14H
084Ca(D139384C): BLEQ MT [trap=4, pos=14648]
084Db(41000001): MOV R1, R0, 1H
084Eb(A1000004): STR R1, R0, 4H
084Fc(80E00010): LDR R0, SP, 10H
0850c(D139464C): BLEQ MT [trap=4, pos=14662]
0851d(81E00010): LDR R1, SP, 10H
0852d(D139514C): BLEQ MT [trap=4, pos=14673]
0853e(81100008): LDR R1, R1, 8H
0854e(41180001): ADD R1, R1, 1H
0855e(A1000008): STR R1, R0, 8H
0856f(80E00010): LDR R0, SP, 10H
0857f(D1395E4C): BLEQ MT [trap=4, pos=14686]
0858g(41000001): MOV R1, R0, 1H
0859g(A100000C): STR R1, R0, CH
085Ah(80E00010): LDR R0, SP, 10H
085Bh(D1396B4C): BLEQ MT [trap=4, pos=14699]
085Ci(41000001): MOV R1, R0, 1H
085Di(B1000010): STR R1, R0, 10H
IF (f.alengj - STS)k MOD XS =l 0 THENm NewExt(f)n ENDo
085Ej(80E00010): LDR R0, SP, 10H
085Fj(D1398C4C): BLEQ MT [trap=4, pos=14732]
0860k(80000008): LDR R0, R0, 8H
0861k(40090040): SUB R0, R0, 40H
0862l(400400FF): AND R0, R0, FFH
0863m(40090000): SUB R0, R0, 0H
0864m(E9000002): BNE 2 [0867H]
0865n(80E00010): LDR R0, SP, 10H
0866o(F7FFFEA1): BL -351 [0708H]
END
ELSE rp.buf := buf
0867p(E7000003): B 3 [086BH]
ENDq ;
0868q(80E00014): LDR R0, SP, 14H
0869q(81E00004): LDR R1, SP, 4H
086Aq(A0100014): STR R0, R1, 14H
r.bpos := 0
ENDr
086Br(40000000): MOV R0, R0, 0H
086Cr(81E00004): LDR R1, SP, 4H
086Dr(A0100010): STR R0, R1, 10H
END ;
r.buf.datas[r.bpos]t := ORD(ch);u INC(r.bpos);v r.buf.modw := TRUE
086Es(80E00004): LDR R0, SP, 4H
086Fs(80000014): LDR R0, R0, 14H
0870s(D13A1E4C): BLEQ MT [trap=4, pos=14878]
0871t(81E00004): LDR R1, SP, 4H
0872t(81100010): LDR R1, R1, 10H
0873t(42190400): SUB R2, R1, 400H
0874t(DA3A261C): BLCC MT [trap=1, pos=14886]
0875t(00080001): ADD R0, R0, R1
0876u(91E0000C): LDR R1, SP, CH
0877u(B1000010): STR R1, R0, 10H
0878v(80E00004): LDR R0, SP, 4H
0879v(40080010): ADD R0, R0, 10H
087Av(81000000): LDR R1, R0, 0H
087Bv(41180001): ADD R1, R1, 1H
087Cv(A1000000): STR R1, R0, 0H
087Dw(80E00004): LDR R0, SP, 4H
087Ew(80000014): LDR R0, R0, 14H
087Fw(D13A494C): BLEQ MT [trap=4, pos=14921]
ENDx Write;
0880x(41000001): MOV R1, R0, 1H
0881x(B1000008): STR R1, R0, 8H
0882x(8FE00000): LDR LNK, SP, 0H
0883x(4EE80018): ADD SP, SP, 18H
0884x(C700000F): B LNK
PROCEDURE WriteInt*(VAR R: Rider; x: INTEGER);
BEGINy WriteByte(R,z x MOD 100H)a;b
0885y .PROC 25
0885y(4EE90010): SUB SP, SP, 10H
0886y(AFE00000): STR LNK, SP, 0H
0887y(A0E00004): STR R0, SP, 4H
0888y(A1E00008): STR R1, SP, 8H
0889y(A2E0000C): STR R2, SP, CH
088Az(80E00004): LDR R0, SP, 4H
088Bz(81E00008): LDR R1, SP, 8H
088Ca(82E0000C): LDR R2, SP, CH
088Da(422400FF): AND R2, R2, FFH
088Eb(F7FFFEAA): BL -342 [0739H]
WriteByte(R,c x DIV 100H MODd 100H)e;f
088Fc(80E00004): LDR R0, SP, 4H
0890c(81E00008): LDR R1, SP, 8H
0891d(82E0000C): LDR R2, SP, CH
0892d(42220008): ASR R2, R2, 8H
0893e(422400FF): AND R2, R2, FFH
0894f(F7FFFEA4): BL -348 [0739H]
WriteByte(R,g x DIV 10000H MODh 100H)i;j
0895g(80E00004): LDR R0, SP, 4H
0896g(81E00008): LDR R1, SP, 8H
0897h(82E0000C): LDR R2, SP, CH
0898h(42220010): ASR R2, R2, 10H
0899i(422400FF): AND R2, R2, FFH
089Aj(F7FFFE9E): BL -354 [0739H]
WriteByte(R,k x DIV 1000000H MODl 100H)m
089Bk(80E00004): LDR R0, SP, 4H
089Ck(81E00008): LDR R1, SP, 8H
089Dl(82E0000C): LDR R2, SP, CH
089El(42220018): ASR R2, R2, 18H
089Fm(422400FF): AND R2, R2, FFH
ENDn WriteInt;
08A0n(F7FFFE98): BL -360 [0739H]
08A1n(8FE00000): LDR LNK, SP, 0H
08A2n(4EE80010): ADD SP, SP, 10H
08A3n(C700000F): B LNK
PROCEDURE WriteSet*(VAR R: Rider; s: SET);
BEGINo WriteInt(R,p ORD(s))q
08A4o .PROC 26
08A4o(4EE90010): SUB SP, SP, 10H
08A5o(AFE00000): STR LNK, SP, 0H
08A6o(A0E00004): STR R0, SP, 4H
08A7o(A1E00008): STR R1, SP, 8H
08A8o(A2E0000C): STR R2, SP, CH
08A9p(80E00004): LDR R0, SP, 4H
08AAp(81E00008): LDR R1, SP, 8H
08ABq(82E0000C): LDR R2, SP, CH
ENDr WriteSet;
08ACr(F7FFFFD8): BL -40 [0885H]
08ADr(8FE00000): LDR LNK, SP, 0H
08AEr(4EE80010): ADD SP, SP, 10H
08AFr(C700000F): B LNK
PROCEDURE WriteReal*(VAR R: Rider; x: REAL);
BEGINs WriteInt(R,t ORD(x))u
08B0s .PROC 27
08B0s(4EE90010): SUB SP, SP, 10H
08B1s(AFE00000): STR LNK, SP, 0H
08B2s(A0E00004): STR R0, SP, 4H
08B3s(A1E00008): STR R1, SP, 8H
08B4s(A2E0000C): STR R2, SP, CH
08B5t(80E00004): LDR R0, SP, 4H
08B6t(81E00008): LDR R1, SP, 8H
08B7u(82E0000C): LDR R2, SP, CH
ENDv WriteReal;
08B8v(F7FFFFCC): BL -52 [0885H]
08B9v(8FE00000): LDR LNK, SP, 0H
08BAv(4EE80010): ADD SP, SP, 10H
08BBv(C700000F): B LNK
PROCEDURE WriteString*(VAR R: Rider; x: ARRAY OF CHAR);
VAR i: INTEGER; ch: CHAR;
BEGINw i := 0;x
08BCw .PROC 28
08BCw(4EE9001C): SUB SP, SP, 1CH
08BDw(AFE00000): STR LNK, SP, 0H
08BEw(A0E00004): STR R0, SP, 4H
08BFw(A1E00008): STR R1, SP, 8H
08C0w(A2E0000C): STR R2, SP, CH
08C1w(A3E00010): STR R3, SP, 10H
08C2x(40000000): MOV R0, R0, 0H
08C3x(A0E00014): STR R0, SP, 14H
REPEAT ch := x[i]y;z Write(R,a ch)b;c INC(i) UNTILd ch = 0X
08C4y(80E00014): LDR R0, SP, 14H
08C5y(81E00010): LDR R1, SP, 10H
08C6y(01090001): SUB R1, R0, R1
08C7y(DA3C731C): BLCC MT [trap=1, pos=15475]
08C8y(81E0000C): LDR R1, SP, CH
08C9y(00180000): ADD R0, R1, R0
08CAz(90000000): LDR R0, R0, 0H
08CBz(B0E00018): STR R0, SP, 18H
08CCa(80E00004): LDR R0, SP, 4H
08CDa(81E00008): LDR R1, SP, 8H
08CEb(92E00018): LDR R2, SP, 18H
08CFc(F7FFFF1E): BL -226 [07EEH]
08D0d(80E00014): LDR R0, SP, 14H
08D1d(40080001): ADD R0, R0, 1H
08D2d(A0E00014): STR R0, SP, 14H
ENDe WriteString;
08D3e(90E00018): LDR R0, SP, 18H
08D4e(E9FFFFEF): BNE -17 [08C4H]
08D5e(8FE00000): LDR LNK, SP, 0H
08D6e(4EE8001C): ADD SP, SP, 1CH
08D7e(C700000F): B LNK
PROCEDURE WriteNum*(VAR R: Rider; x: INTEGER);
BEGINf
08D8f .PROC 29
08D8f(4EE90010): SUB SP, SP, 10H
08D9f(AFE00000): STR LNK, SP, 0H
08DAf(A0E00004): STR R0, SP, 4H
08DBf(A1E00008): STR R1, SP, 8H
08DCf(A2E0000C): STR R2, SP, CH
WHILE (x < -40H)g OR (hx >= 40H)i DOj WriteByte(R,k x MOD 80H +l 80H)m;n x := ASR(x, 7) ENDo ;
08DDg(80E0000C): LDR R0, SP, CH
08DEg(5009FFC0): SUB R0, R0, FFFFFFC0H
08DFh(E5000003): BLT 3 [08E3H]
08E0i(80E0000C): LDR R0, SP, CH
08E1i(40090040): SUB R0, R0, 40H
08E2j(E500000A): BLT 10 [08EDH]
08E3k(80E00004): LDR R0, SP, 4H
08E4k(81E00008): LDR R1, SP, 8H
08E5l(82E0000C): LDR R2, SP, CH
08E6l(4224007F): AND R2, R2, 7FH
08E7m(42280080): ADD R2, R2, 80H
08E8n(F7FFFE50): BL -432 [0739H]
08E9o(80E0000C): LDR R0, SP, CH
08EAo(40020007): ASR R0, R0, 7H
08EBo(A0E0000C): STR R0, SP, CH
08ECo(E7FFFFF0): B -16 [08DDH]
WriteByte(R,p x MOD 80H)q
08EDp(80E00004): LDR R0, SP, 4H
08EEp(81E00008): LDR R1, SP, 8H
08EFq(82E0000C): LDR R2, SP, CH
08F0q(4224007F): AND R2, R2, 7FH
ENDr WriteNum;
08F1r(F7FFFE47): BL -441 [0739H]
08F2r(8FE00000): LDR LNK, SP, 0H
08F3r(4EE80010): ADD SP, SP, 10H
08F4r(C700000F): B LNK
(*---------------------------System use---------------------------*)
PROCEDURE Init*;
BEGINs root := 0;t Kernel.Init;u FileDir.Init
08F5s .PROC 30
08F5s .COMMAND Init
08F5s(4EE90004): SUB SP, SP, 4H
08F6s(AFE00000): STR LNK, SP, 0H
08F7t(40000000): MOV R0, R0, 0H
08F8t .FIXUP D
08F8t(8D0001E6): LDR SB, MT, MOD0 [Files]
08F9t(A0D00090): STR R0, SB, 90H [data]
08FAu .FIXUP P
08FAu(F7115401): BL MOD1 [Kernel] PROC21
ENDv Init;
08FBv .FIXUP P
08FBv(F7208001): BL MOD2 [FileDir] PROC8
08FCv(8FE00000): LDR LNK, SP, 0H
08FDv(4EE80004): ADD SP, SP, 4H
08FEv(C700000F): B LNK
PROCEDURE RestoreList*; (*after mark phase of garbage collection*)
VAR f, f0: INTEGER;
PROCEDUREw mark(f: INTEGER): INTEGER;
08FFw(E7000010): B 16 [0910H]
VAR m: INTEGER;
BEGINx
0900x(4EE9000C): SUB SP, SP, CH
0901x(AFE00000): STR LNK, SP, 0H
0902x(A0E00004): STR R0, SP, 4H
IF f = 0 THENy m := -1 ELSEz SYSTEMa.GET(f-4,b m) ENDc ;
0903y(80E00004): LDR R0, SP, 4H
0904y(E9000003): BNE 3 [0908H]
0905z(5000FFFF): MOV R0, R0, FFFFFFFFH
0906z(A0E00008): STR R0, SP, 8H
0907a(E7000004): B 4 [090CH]
0908b(80E00004): LDR R0, SP, 4H
0909b(40090004): SUB R0, R0, 4H
090Ac(80000000): LDR R0, R0, 0H
090Bc(A0E00008): STR R0, SP, 8H
RETURN m
ENDd mark;
090Cd(80E00008): LDR R0, SP, 8H
090Dd(8FE00000): LDR LNK, SP, 0H
090Ed(4EE8000C): ADD SP, SP, CH
090Fd(C700000F): B LNK
BEGINe (*field "next" has offset 0*)
0910e .PROC 31
0910e .COMMAND RestoreList
0910e(4EE9000C): SUB SP, SP, CH
0911e(AFE00000): STR LNK, SP, 0H
WHILE mark(root)f =g 0 DOh SYSTEM.GET(root, root) ENDi ;
0912f .FIXUP D
0912f(8D00001A): LDR SB, MT, MOD0 [Files]
0913f(80D00090): LDR R0, SB, 90H [data]
0914g(F7FFFFEB): BL -21 [0900H]
0915h(40090000): SUB R0, R0, 0H
0916h(E9000005): BNE 5 [091CH]
0917i .FIXUP D
0917i(8D000005): LDR SB, MT, MOD0 [Files]
0918i(80D00090): LDR R0, SB, 90H [data]
0919i(80000000): LDR R0, R0, 0H
091Ai(A0D00090): STR R0, SB, 90H
091Bi(E7FFFFF6): B -10 [0912H]
f := root;j
091Cj .FIXUP D
091Cj(8D000005): LDR SB, MT, MOD0 [Files]
091Dj(80D00090): LDR R0, SB, 90H [data]
091Ej(A0E00004): STR R0, SP, 4H
WHILE f # 0 DOk
091Fk(80E00004): LDR R0, SP, 4H
0920k(E100000F): BEQ 15 [0930H]
f0 := f;l
0921l(80E00004): LDR R0, SP, 4H
0922l(A0E00008): STR R0, SP, 8H
REPEAT SYSTEM.GET(f0, f0) UNTILm mark(f0)n #o 0;p
0923m(80E00008): LDR R0, SP, 8H
0924m(80000000): LDR R0, R0, 0H
0925m(A0E00008): STR R0, SP, 8H
0926n(80E00008): LDR R0, SP, 8H
0927o(F7FFFFD8): BL -40 [0900H]
0928p(40090000): SUB R0, R0, 0H
0929p(E1FFFFF9): BEQ -7 [0923H]
SYSTEM.PUT(f, f0);q f := f0
092Aq(80E00004): LDR R0, SP, 4H
092Bq(81E00008): LDR R1, SP, 8H
092Cq(A1000000): STR R1, R0, 0H
ENDr
092Dr(80E00008): LDR R0, SP, 8H
092Er(A0E00004): STR R0, SP, 4H
092Fr(E7FFFFEF): B -17 [091FH]
ENDs RestoreList;
0930s(8FE00000): LDR LNK, SP, 0H
0931s(4EE8000C): ADD SP, SP, CH
0932s(C700000F): B LNK
ENDt Files.u
0933t .PROC 0
0933t .ENTRYPOINT
0933t(4EE90004): SUB SP, SP, 4H
0934t(AFE00000): STR LNK, SP, 0H
0935u(8FE00000): LDR LNK, SP, 0H
0936u(4EE80004): ADD SP, SP, 4H
0937u(C700000F): B LNK