MODULE FileDir; (*NW 12.1.86 / 23.8.90 / 15.8.2013*) | |

^{ } .MODULE FileDir (KEY AF8E65FF, VERSION 1, SIZE 00001EFC) | |

^{ } .IMPORT Kernel (KEY 97E012DD) | |

^{ } .TYPEDESC 00000500 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000040 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000500 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF | |

^{ } .FIXUP T 0H | |

IMPORT SYSTEM, Kernel; | |

(*File Directory is a B-tree with its root page at DirRootAdr. | |

Each entry contains a file name and the disk address of the file's head sector*) | |

CONST FnLength* = 32; | |

SecTabSize* = 64; | |

ExTabSize* = 12; | |

SectorSize* = 1024; | |

IndexSize* = SectorSize DIV 4; | |

HeaderSize* = 352; | |

DirRootAdr* = 29; | |

DirPgSize* = 24; | |

N = DirPgSize DIV 2; | |

DirMark* = 9B1EA38DH; | |

HeaderMark* = 9BA71D86H; | |

FillerSize = 52; | |

TYPE DiskAdr = INTEGER; | |

FileName* = ARRAY FnLength OF CHAR; | |

SectorTable* = ARRAY SecTabSize OF DiskAdr; | |

ExtensionTable* = ARRAY ExTabSize OF DiskAdr; | |

EntryHandler* = PROCEDURE (name: FileName; sec: DiskAdr; VAR continue: BOOLEAN); | |

FileHeader* = | |

RECORD (*first page of each file on disk*) | |

mark*: INTEGER; | |

name*: FileName; | |

aleng*, bleng*, date*: INTEGER; | |

ext*: ExtensionTable; | |

sec*: SectorTable; | |

fill: ARRAY SectorSize - HeaderSize OF BYTE; | |

END ; | |

FileHd* = POINTER TO FileHeader; | |

IndexSector* = ARRAY IndexSize OF DiskAdr; | |

DataSector* = ARRAY SectorSize OF BYTE; | |

DirEntry* = (*B-tree node*) | |

RECORD | |

name*: FileName; | |

adr*: DiskAdr; (*sec no of file header*) | |

p*: DiskAdr (*sec no of descendant in directory*) | |

END ; | |

DirPage* = | |

RECORD mark*: INTEGER; | |

m*: INTEGER; | |

p0*: DiskAdr; (*sec no of left descendant in directory*) | |

fill: ARRAY FillerSize OF BYTE; | |

e*: ARRAY DirPgSize OF DirEntry | |

END ; | |

(*Exported procedures: Search, Insert, Delete, Enumerate, Init*) | |

PROCEDURE Search*(name: FileName; VAR A: DiskAdr); | |

VAR i, L, R: INTEGER; dadr: DiskAdr; | |

a: DirPage; | |

BEGIN_{a} dadr := DirRootAdr;_{b} A := 0;_{c} | |

0000 | ^{a} .PROC 1 |

0000 | ^{a} .PROC 4 |

0000 | ^{a}(4EE9041C): SUB SP, SP, 41CH |

0001 | ^{a}(AFE00000): STR LNK, SP, 0H |

0002 | ^{a}(A0E00004): STR R0, SP, 4H |

0003 | ^{a}(A1E00008): STR R1, SP, 8H |

0004 | ^{b}(4000001D): MOV R0, R0, 1DH |

0005 | ^{b} .PROC 2 |

0005 | ^{b}(A0E00018): STR R0, SP, 18H |

0006 | ^{c}(40000000): MOV R0, R0, 0H |

0007 | ^{c}(81E00008): LDR R1, SP, 8H |

0008 | ^{c}(A0100000): STR R0, R1, 0H |

REPEAT Kernel.GetSector(dadr,_{d} a)_{e};_{f} ASSERT(a.mark = DirMark)_{g};_{h} | |

0009 | ^{d}(80E00018): LDR R0, SP, 18H |

000A | ^{e} .PROC 3 |

000A | ^{e}(41E8001C): ADD R1, SP, 1CH |

000B | ^{f} .FIXUP P |

000B | ^{f}(F710F00B): BL MOD1 [Kernel] PROC15 |

000C | ^{g}(80E0001C): LDR R0, SP, 1CH |

000D | ^{g}(71009B1E): MOV' R1, R0, FFFF9B1EH |

000E | ^{g}(4116A38D): IOR R1, R1, FFFFA38DH |

000F | ^{g}(00090001): SUB R0, R0, R1 |

0010 | ^{h}(D907B57C): BLNE MT [trap=7, pos=1973] |

L := 0;_{i} R := a.m;_{j} (*binary search*) | |

0011 | ^{i}(40000000): MOV R0, R0, 0H |

0012 | ^{i}(A0E00010): STR R0, SP, 10H |

0013 | ^{j}(80E00020): LDR R0, SP, 20H |

0014 | ^{j}(A0E00014): STR R0, SP, 14H |

WHILE L < R DO_{k} | |

0015 | ^{k}(80E00010): LDR R0, SP, 10H |

0016 | ^{k}(81E00014): LDR R1, SP, 14H |

0017 | ^{k}(00090001): SUB R0, R0, R1 |

0018 | ^{k}(ED00001C): BGE 28 [0035H] |

i := (L+R)_{l} DIV 2;_{m} | |

0019 | ^{l}(80E00010): LDR R0, SP, 10H |

001A | ^{l}(81E00014): LDR R1, SP, 14H |

001B | ^{l}(00080001): ADD R0, R0, R1 |

001C | ^{m}(40020001): ASR R0, R0, 1H |

001D | ^{m}(A0E0000C): STR R0, SP, CH |

IF name <= a.e[i]_{n}.name THEN_{o} R := i ELSE_{p} L_{q} := i+1 END_{r} | |

001E | ^{n}(80E0000C): LDR R0, SP, CH |

001F | ^{n}(41090018): SUB R1, R0, 18H |

0020 | ^{n}(DA08281C): BLCC MT [trap=1, pos=2088] |

0021 | ^{n}(400A0028): MUL R0, R0, 28H |

0022 | ^{n}(00E80000): ADD R0, SP, R0 |

0023 | ^{o}(81E00004): LDR R1, SP, 4H |

0024 | ^{o}(4008005C): ADD R0, R0, 5CH |

0025 | ^{o}(92100000): LDR R2, R1, 0H |

0026 | ^{o}(41180001): ADD R1, R1, 1H |

0027 | ^{o}(93000000): LDR R3, R0, 0H |

0028 | ^{o}(40080001): ADD R0, R0, 1H |

0029 | ^{o}(04290003): SUB R4, R2, R3 |

002A | ^{o}(E9000002): BNE 2 [002DH] |

002B | ^{o}(44290000): SUB R4, R2, 0H |

002C | ^{o}(E9FFFFF8): BNE -8 [0025H] |

002D | ^{o}(EE000003): BGT 3 [0031H] |

002E | ^{p}(80E0000C): LDR R0, SP, CH |

002F | ^{p}(A0E00014): STR R0, SP, 14H |

0030 | ^{q}(E7000003): B 3 [0034H] |

0031 | ^{r}(80E0000C): LDR R0, SP, CH |

0032 | ^{r}(40080001): ADD R0, R0, 1H |

0033 | ^{r}(A0E00010): STR R0, SP, 10H |

END_{s} ; | |

0034 | ^{s}(E7FFFFE0): B -32 [0015H] |

IF (R < a.m)_{t} & (_{u}name = a.e[R]_{v}.name)_{w} THEN_{x} A := a.e[R]_{y}.adr (*found*) | |

0035 | ^{t}(80E00014): LDR R0, SP, 14H |

0036 | ^{t}(81E00020): LDR R1, SP, 20H |

0037 | ^{t}(00090001): SUB R0, R0, R1 |

0038 | ^{u}(ED000019): BGE 25 [0052H] |

0039 | ^{v}(80E00014): LDR R0, SP, 14H |

003A | ^{v}(41090018): SUB R1, R0, 18H |

003B | ^{v}(DA087B1C): BLCC MT [trap=1, pos=2171] |

003C | ^{v}(400A0028): MUL R0, R0, 28H |

003D | ^{v}(00E80000): ADD R0, SP, R0 |

003E | ^{w}(81E00004): LDR R1, SP, 4H |

003F | ^{w}(4008005C): ADD R0, R0, 5CH |

0040 | ^{w}(92100000): LDR R2, R1, 0H |

0041 | ^{w}(41180001): ADD R1, R1, 1H |

0042 | ^{w}(93000000): LDR R3, R0, 0H |

0043 | ^{w}(40080001): ADD R0, R0, 1H |

0044 | ^{w}(04290003): SUB R4, R2, R3 |

0045 | ^{w}(E9000002): BNE 2 [0048H] |

0046 | ^{w}(44290000): SUB R4, R2, 0H |

0047 | ^{w}(E9FFFFF8): BNE -8 [0040H] |

0048 | ^{x}(E9000009): BNE 9 [0052H] |

0049 | ^{y}(80E00014): LDR R0, SP, 14H |

004A | ^{y}(41090018): SUB R1, R0, 18H |

004B | ^{y}(DA08921C): BLCC MT [trap=1, pos=2194] |

004C | ^{y}(400A0028): MUL R0, R0, 28H |

004D | ^{y}(00E80000): ADD R0, SP, R0 |

ELSIF_{z} R_{a} = 0 THEN_{b} dadr := a.p0 | |

004E | ^{z}(8000007C): LDR R0, R0, 7CH |

004F | ^{z}(81E00008): LDR R1, SP, 8H |

0050 | ^{z}(A0100000): STR R0, R1, 0H |

0051 | ^{a}(E700000D): B 13 [005FH] |

0052 | ^{b}(80E00014): LDR R0, SP, 14H |

0053 | ^{b}(E9000003): BNE 3 [0057H] |

ELSE_{c} dadr_{d} := a.e[R-1]_{e}.p | |

0054 | ^{c}(80E00024): LDR R0, SP, 24H |

0055 | ^{c}(A0E00018): STR R0, SP, 18H |

0056 | ^{d}(E7000008): B 8 [005FH] |

0057 | ^{e}(80E00014): LDR R0, SP, 14H |

0058 | ^{e}(40090001): SUB R0, R0, 1H |

0059 | ^{e}(41090018): SUB R1, R0, 18H |

005A | ^{e}(DA08E01C): BLCC MT [trap=1, pos=2272] |

005B | ^{e}(400A0028): MUL R0, R0, 28H |

005C | ^{e}(00E80000): ADD R0, SP, R0 |

END_{f} ; | |

005D | ^{f}(80000080): LDR R0, R0, 80H |

005E | ^{f}(A0E00018): STR R0, SP, 18H |

UNTIL (dadr = 0)_{g} OR (_{h}A # 0)_{i} | |

005F | ^{g}(80E00018): LDR R0, SP, 18H |

0060 | ^{h}(E1000003): BEQ 3 [0064H] |

0061 | ^{i}(80E00008): LDR R0, SP, 8H |

0062 | ^{i}(80000000): LDR R0, R0, 0H |

END_{j} Search; | |

0063 | ^{j}(E1FFFFA5): BEQ -91 [0009H] |

0064 | ^{j}(8FE00000): LDR LNK, SP, 0H |

0065 | ^{j}(4EE8041C): ADD SP, SP, 41CH |

0066 | ^{j}(C700000F): B LNK |

PROCEDURE insert(name: FileName; | |

dpg0: DiskAdr; | |

VAR h: BOOLEAN; | |

VAR v: DirEntry; | |

fad: DiskAdr); | |

(*h = "tree has become higher and v is ascending element"*) | |

VAR ch: CHAR; | |

i, j, L, R: INTEGER; | |

dpg1: DiskAdr; | |

u: DirEntry; | |

a: DirPage; | |

BEGIN_{k} (*~h*) Kernel.GetSector(dpg0,_{l} a)_{m};_{n} ASSERT(a.mark = DirMark)_{o};_{p} | |

0067 | ^{k}(4EE9045C): SUB SP, SP, 45CH |

0068 | ^{k}(AFE00000): STR LNK, SP, 0H |

0069 | ^{k}(A0E00004): STR R0, SP, 4H |

006A | ^{k}(A1E00008): STR R1, SP, 8H |

006B | ^{k}(A2E0000C): STR R2, SP, CH |

006C | ^{k}(A3E00010): STR R3, SP, 10H |

006D | ^{k}(A4E00014): STR R4, SP, 14H |

006E | ^{k}(A5E00018): STR R5, SP, 18H |

006F | ^{l}(80E00008): LDR R0, SP, 8H |

0070 | ^{m}(41E8005C): ADD R1, SP, 5CH |

0071 | ^{n} .FIXUP P |

0071 | ^{n}(F710F066): BL MOD1 [Kernel] PROC15 |

0072 | ^{o}(80E0005C): LDR R0, SP, 5CH |

0073 | ^{o}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0074 | ^{o}(4116A38D): IOR R1, R1, FFFFA38DH |

0075 | ^{o}(00090001): SUB R0, R0, R1 |

0076 | ^{p}(D90ABC7C): BLNE MT [trap=7, pos=2748] |

L := 0;_{q} R := a.m;_{r} (*binary search*) | |

0077 | ^{q}(40000000): MOV R0, R0, 0H |

0078 | ^{q}(A0E00028): STR R0, SP, 28H |

0079 | ^{r}(80E00060): LDR R0, SP, 60H |

007A | ^{r}(A0E0002C): STR R0, SP, 2CH |

WHILE L < R DO_{s} | |

007B | ^{s}(80E00028): LDR R0, SP, 28H |

007C | ^{s}(81E0002C): LDR R1, SP, 2CH |

007D | ^{s}(00090001): SUB R0, R0, R1 |

007E | ^{s}(ED00001C): BGE 28 [009BH] |

i := (L+R)_{t} DIV 2;_{u} | |

007F | ^{t}(80E00028): LDR R0, SP, 28H |

0080 | ^{t}(81E0002C): LDR R1, SP, 2CH |

0081 | ^{t}(00080001): ADD R0, R0, R1 |

0082 | ^{u}(40020001): ASR R0, R0, 1H |

0083 | ^{u}(A0E00020): STR R0, SP, 20H |

IF name <= a.e[i]_{v}.name THEN_{w} R := i ELSE_{x} L_{y} := i+1 END_{z} | |

0084 | ^{v}(80E00020): LDR R0, SP, 20H |

0085 | ^{v}(41090018): SUB R1, R0, 18H |

0086 | ^{v}(DA0B271C): BLCC MT [trap=1, pos=2855] |

0087 | ^{v}(400A0028): MUL R0, R0, 28H |

0088 | ^{v}(00E80000): ADD R0, SP, R0 |

0089 | ^{w}(81E00004): LDR R1, SP, 4H |

008A | ^{w}(4008009C): ADD R0, R0, 9CH |

008B | ^{w}(92100000): LDR R2, R1, 0H |

008C | ^{w}(41180001): ADD R1, R1, 1H |

008D | ^{w}(93000000): LDR R3, R0, 0H |

008E | ^{w}(40080001): ADD R0, R0, 1H |

008F | ^{w}(04290003): SUB R4, R2, R3 |

0090 | ^{w}(E9000002): BNE 2 [0093H] |

0091 | ^{w}(44290000): SUB R4, R2, 0H |

0092 | ^{w}(E9FFFFF8): BNE -8 [008BH] |

0093 | ^{w}(EE000003): BGT 3 [0097H] |

0094 | ^{x}(80E00020): LDR R0, SP, 20H |

0095 | ^{x}(A0E0002C): STR R0, SP, 2CH |

0096 | ^{y}(E7000003): B 3 [009AH] |

0097 | ^{z}(80E00020): LDR R0, SP, 20H |

0098 | ^{z}(40080001): ADD R0, R0, 1H |

0099 | ^{z}(A0E00028): STR R0, SP, 28H |

END_{a} ; | |

009A | ^{a}(E7FFFFE0): B -32 [007BH] |

IF (R < a.m)_{b} & (_{c}name = a.e[R]_{d}.name)_{e} THEN_{f} | |

009B | ^{b}(80E0002C): LDR R0, SP, 2CH |

009C | ^{b}(81E00060): LDR R1, SP, 60H |

009D | ^{b}(00090001): SUB R0, R0, R1 |

009E | ^{c}(ED00001B): BGE 27 [00BAH] |

009F | ^{d}(80E0002C): LDR R0, SP, 2CH |

00A0 | ^{d}(41090018): SUB R1, R0, 18H |

00A1 | ^{d}(DA0B761C): BLCC MT [trap=1, pos=2934] |

00A2 | ^{d}(400A0028): MUL R0, R0, 28H |

00A3 | ^{d}(00E80000): ADD R0, SP, R0 |

00A4 | ^{e}(81E00004): LDR R1, SP, 4H |

00A5 | ^{e}(4008009C): ADD R0, R0, 9CH |

00A6 | ^{e}(92100000): LDR R2, R1, 0H |

00A7 | ^{e}(41180001): ADD R1, R1, 1H |

00A8 | ^{e}(93000000): LDR R3, R0, 0H |

00A9 | ^{e}(40080001): ADD R0, R0, 1H |

00AA | ^{e}(04290003): SUB R4, R2, R3 |

00AB | ^{e}(E9000002): BNE 2 [00AEH] |

00AC | ^{e}(44290000): SUB R4, R2, 0H |

00AD | ^{e}(E9FFFFF8): BNE -8 [00A6H] |

00AE | ^{f}(E900000B): BNE 11 [00BAH] |

a.e[R]_{g}.adr := fad;_{h} Kernel.PutSector(dpg0,_{i} a)_{j} (*replace*) | |

00AF | ^{g}(80E0002C): LDR R0, SP, 2CH |

00B0 | ^{g}(41090018): SUB R1, R0, 18H |

00B1 | ^{g}(DA0B8E1C): BLCC MT [trap=1, pos=2958] |

00B2 | ^{g}(400A0028): MUL R0, R0, 28H |

00B3 | ^{g}(00E80000): ADD R0, SP, R0 |

00B4 | ^{h}(81E00018): LDR R1, SP, 18H |

00B5 | ^{h}(A10000BC): STR R1, R0, BCH |

00B6 | ^{i}(80E00008): LDR R0, SP, 8H |

00B7 | ^{j}(41E8005C): ADD R1, SP, 5CH |

ELSE_{k} (*not on this page*) | |

00B8 | ^{k} .FIXUP P |

00B8 | ^{k}(F7110047): BL MOD1 [Kernel] PROC16 |

IF_{l} R = 0 THEN_{m} dpg1 := a.p0 ELSE_{n} dpg1_{o} := a.e[R-1]_{p}.p END_{q} ; | |

00B9 | ^{l}(E700014E): B 334 [0208H] |

00BA | ^{m}(80E0002C): LDR R0, SP, 2CH |

00BB | ^{m}(E9000003): BNE 3 [00BFH] |

00BC | ^{n}(80E00064): LDR R0, SP, 64H |

00BD | ^{n}(A0E00030): STR R0, SP, 30H |

00BE | ^{o}(E7000008): B 8 [00C7H] |

00BF | ^{p}(80E0002C): LDR R0, SP, 2CH |

00C0 | ^{p}(40090001): SUB R0, R0, 1H |

00C1 | ^{p}(41090018): SUB R1, R0, 18H |

00C2 | ^{p}(DA0C161C): BLCC MT [trap=1, pos=3094] |

00C3 | ^{p}(400A0028): MUL R0, R0, 28H |

00C4 | ^{p}(00E80000): ADD R0, SP, R0 |

00C5 | ^{q}(800000C0): LDR R0, R0, C0H |

00C6 | ^{q}(A0E00030): STR R0, SP, 30H |

IF dpg1 = 0 THEN_{r} (*not in tree, insert*) | |

00C7 | ^{r}(80E00030): LDR R0, SP, 30H |

00C8 | ^{r}(E9000029): BNE 41 [00F2H] |

u.adr := fad;_{s} u.p := 0;_{t} h := TRUE;_{u} j := 0;_{v} | |

00C9 | ^{s}(80E00018): LDR R0, SP, 18H |

00CA | ^{s}(A0E00054): STR R0, SP, 54H |

00CB | ^{t}(40000000): MOV R0, R0, 0H |

00CC | ^{t}(A0E00058): STR R0, SP, 58H |

00CD | ^{u}(40000001): MOV R0, R0, 1H |

00CE | ^{u}(81E0000C): LDR R1, SP, CH |

00CF | ^{u}(B0100000): STR R0, R1, 0H |

00D0 | ^{v}(40000000): MOV R0, R0, 0H |

00D1 | ^{v}(A0E00024): STR R0, SP, 24H |

REPEAT ch := name[j]_{w};_{x} u.name[j]_{y} := ch;_{z} INC(j) | |

00D2 | ^{w}(80E00024): LDR R0, SP, 24H |

00D3 | ^{w}(41090020): SUB R1, R0, 20H |

00D4 | ^{w}(DA0C9D1C): BLCC MT [trap=1, pos=3229] |

00D5 | ^{w}(81E00004): LDR R1, SP, 4H |

00D6 | ^{w}(00180000): ADD R0, R1, R0 |

00D7 | ^{x}(90000000): LDR R0, R0, 0H |

00D8 | ^{x}(B0E0001C): STR R0, SP, 1CH |

00D9 | ^{y}(80E00024): LDR R0, SP, 24H |

00DA | ^{y}(41090020): SUB R1, R0, 20H |

00DB | ^{y}(DA0CA81C): BLCC MT [trap=1, pos=3240] |

00DC | ^{y}(00E80000): ADD R0, SP, R0 |

00DD | ^{z}(91E0001C): LDR R1, SP, 1CH |

00DE | ^{z}(B1000034): STR R1, R0, 34H |

UNTIL_{a} ch = 0X;_{b} | |

00DF | ^{a}(80E00024): LDR R0, SP, 24H |

00E0 | ^{a}(40080001): ADD R0, R0, 1H |

00E1 | ^{a}(A0E00024): STR R0, SP, 24H |

00E2 | ^{b}(90E0001C): LDR R0, SP, 1CH |

00E3 | ^{b}(E9FFFFEE): BNE -18 [00D2H] |

WHILE j < FnLength DO_{c} u.name[j]_{d} := 0X;_{e} INC(j) END_{f} ; | |

00E4 | ^{c}(80E00024): LDR R0, SP, 24H |

00E5 | ^{c}(40090020): SUB R0, R0, 20H |

00E6 | ^{c}(ED00000A): BGE 10 [00F1H] |

00E7 | ^{d}(80E00024): LDR R0, SP, 24H |

00E8 | ^{d}(41090020): SUB R1, R0, 20H |

00E9 | ^{d}(DA0CF51C): BLCC MT [trap=1, pos=3317] |

00EA | ^{d}(00E80000): ADD R0, SP, R0 |

00EB | ^{e}(41000000): MOV R1, R0, 0H |

00EC | ^{e}(B1000034): STR R1, R0, 34H |

00ED | ^{f}(80E00024): LDR R0, SP, 24H |

00EE | ^{f}(40080001): ADD R0, R0, 1H |

00EF | ^{f}(A0E00024): STR R0, SP, 24H |

00F0 | ^{f}(E7FFFFF3): B -13 [00E4H] |

ELSE | |

insert_{g}(name,_{h} dpg1,_{i} h,_{j} u,_{k} fad)_{l} | |

00F1 | ^{g}(E7000008): B 8 [00FAH] |

00F2 | ^{h}(80E00004): LDR R0, SP, 4H |

00F3 | ^{i}(81E00030): LDR R1, SP, 30H |

00F4 | ^{j}(82E0000C): LDR R2, SP, CH |

00F5 | ^{k}(43E80034): ADD R3, SP, 34H |

00F6 | ^{k} .FIXUP D |

00F6 | ^{k}(8D0000F6): LDR SB, MT, MOD0 [FileDir] |

00F7 | ^{k}(44D80014): ADD R4, SB, 14H [data] |

00F8 | ^{l}(85E00018): LDR R5, SP, 18H |

END_{m} ; | |

00F9 | ^{m}(F7FFFF6D): BL -147 [0067H] |

IF h THEN_{n} (*insert u to the left of e[R]*) | |

00FA | ^{n}(80E0000C): LDR R0, SP, CH |

00FB | ^{n}(90000000): LDR R0, R0, 0H |

00FC | ^{n}(E100010B): BEQ 267 [0208H] |

IF a.m < DirPgSize THEN_{o} | |

00FD | ^{o}(80E00060): LDR R0, SP, 60H |

00FE | ^{o}(40090018): SUB R0, R0, 18H |

00FF | ^{o}(ED000033): BGE 51 [0133H] |

h := FALSE;_{p} i := a.m;_{q} | |

0100 | ^{p}(40000000): MOV R0, R0, 0H |

0101 | ^{p}(81E0000C): LDR R1, SP, CH |

0102 | ^{p}(B0100000): STR R0, R1, 0H |

0103 | ^{q}(80E00060): LDR R0, SP, 60H |

0104 | ^{q}(A0E00020): STR R0, SP, 20H |

WHILE i > R DO_{r} DEC(i);_{s} a.e[i+1]_{t} := a.e[i]_{u} END_{v} ; | |

0105 | ^{r}(80E00020): LDR R0, SP, 20H |

0106 | ^{r}(81E0002C): LDR R1, SP, 2CH |

0107 | ^{r}(00090001): SUB R0, R0, R1 |

0108 | ^{r}(E6000018): BLE 24 [0121H] |

0109 | ^{s}(80E00020): LDR R0, SP, 20H |

010A | ^{s}(40090001): SUB R0, R0, 1H |

010B | ^{s}(A0E00020): STR R0, SP, 20H |

010C | ^{t}(80E00020): LDR R0, SP, 20H |

010D | ^{t}(40080001): ADD R0, R0, 1H |

010E | ^{t}(41090018): SUB R1, R0, 18H |

010F | ^{t}(DA0DE11C): BLCC MT [trap=1, pos=3553] |

0110 | ^{t}(400A0028): MUL R0, R0, 28H |

0111 | ^{t}(00E80000): ADD R0, SP, R0 |

0112 | ^{u}(81E00020): LDR R1, SP, 20H |

0113 | ^{u}(42190018): SUB R2, R1, 18H |

0114 | ^{u}(DA0DEB1C): BLCC MT [trap=1, pos=3563] |

0115 | ^{u}(411A0028): MUL R1, R1, 28H |

0116 | ^{u}(01E80001): ADD R1, SP, R1 |

0117 | ^{v}(4008009C): ADD R0, R0, 9CH |

0118 | ^{v}(4118009C): ADD R1, R1, 9CH |

0119 | ^{v}(4200000A): MOV R2, R0, AH |

011A | ^{v}(83100000): LDR R3, R1, 0H |

011B | ^{v}(41180004): ADD R1, R1, 4H |

011C | ^{v}(A3000000): STR R3, R0, 0H |

011D | ^{v}(40080004): ADD R0, R0, 4H |

011E | ^{v}(42290001): SUB R2, R2, 1H |

011F | ^{v}(E9FFFFFA): BNE -6 [011AH] |

0120 | ^{v}(E7FFFFE4): B -28 [0105H] |

a.e[R]_{w} := u;_{x} INC(a.m) | |

0121 | ^{w}(80E0002C): LDR R0, SP, 2CH |

0122 | ^{w}(41090018): SUB R1, R0, 18H |

0123 | ^{w}(DA0E021C): BLCC MT [trap=1, pos=3586] |

0124 | ^{w}(400A0028): MUL R0, R0, 28H |

0125 | ^{w}(00E80000): ADD R0, SP, R0 |

0126 | ^{x}(4008009C): ADD R0, R0, 9CH |

0127 | ^{x}(41E80034): ADD R1, SP, 34H |

0128 | ^{x}(4200000A): MOV R2, R0, AH |

0129 | ^{x}(83100000): LDR R3, R1, 0H |

012A | ^{x}(41180004): ADD R1, R1, 4H |

012B | ^{x}(A3000000): STR R3, R0, 0H |

012C | ^{x}(40080004): ADD R0, R0, 4H |

012D | ^{x}(42290001): SUB R2, R2, 1H |

012E | ^{x}(E9FFFFFA): BNE -6 [0129H] |

ELSE_{y} (*split page and assign the middle element to v*) | |

012F | ^{y}(80E00060): LDR R0, SP, 60H |

0130 | ^{y}(40080001): ADD R0, R0, 1H |

0131 | ^{y}(A0E00060): STR R0, SP, 60H |

a_{z}.m := N;_{a} a.mark := DirMark;_{b} | |

0132 | ^{z}(E70000D2): B 210 [0205H] |

0133 | ^{a}(4000000C): MOV R0, R0, CH |

0134 | ^{a}(A0E00060): STR R0, SP, 60H |

0135 | ^{b}(60009B1E): MOV' R0, R0, FFFF9B1EH |

0136 | ^{b}(4006A38D): IOR R0, R0, FFFFA38DH |

0137 | ^{b}(A0E0005C): STR R0, SP, 5CH |

IF R < N THEN_{c} (*insert in left half*) | |

0138 | ^{c}(80E0002C): LDR R0, SP, 2CH |

0139 | ^{c}(4009000C): SUB R0, R0, CH |

013A | ^{c}(ED000059): BGE 89 [0194H] |

v := a.e[N-1];_{d} i := N-1;_{e} | |

013B | ^{d}(80E00010): LDR R0, SP, 10H |

013C | ^{d}(41E80254): ADD R1, SP, 254H |

013D | ^{d}(4200000A): MOV R2, R0, AH |

013E | ^{d}(83100000): LDR R3, R1, 0H |

013F | ^{d}(41180004): ADD R1, R1, 4H |

0140 | ^{d}(A3000000): STR R3, R0, 0H |

0141 | ^{d}(40080004): ADD R0, R0, 4H |

0142 | ^{d}(42290001): SUB R2, R2, 1H |

0143 | ^{d}(E9FFFFFA): BNE -6 [013EH] |

0144 | ^{e}(4000000B): MOV R0, R0, BH |

0145 | ^{e}(A0E00020): STR R0, SP, 20H |

WHILE i > R DO_{f} DEC(i);_{g} a.e[i+1]_{h} := a.e[i]_{i} END_{j} ; | |

0146 | ^{f}(80E00020): LDR R0, SP, 20H |

0147 | ^{f}(81E0002C): LDR R1, SP, 2CH |

0148 | ^{f}(00090001): SUB R0, R0, R1 |

0149 | ^{f}(E6000018): BLE 24 [0162H] |

014A | ^{g}(80E00020): LDR R0, SP, 20H |

014B | ^{g}(40090001): SUB R0, R0, 1H |

014C | ^{g}(A0E00020): STR R0, SP, 20H |

014D | ^{h}(80E00020): LDR R0, SP, 20H |

014E | ^{h}(40080001): ADD R0, R0, 1H |

014F | ^{h}(41090018): SUB R1, R0, 18H |

0150 | ^{h}(DA0EF81C): BLCC MT [trap=1, pos=3832] |

0151 | ^{h}(400A0028): MUL R0, R0, 28H |

0152 | ^{h}(00E80000): ADD R0, SP, R0 |

0153 | ^{i}(81E00020): LDR R1, SP, 20H |

0154 | ^{i}(42190018): SUB R2, R1, 18H |

0155 | ^{i}(DA0F021C): BLCC MT [trap=1, pos=3842] |

0156 | ^{i}(411A0028): MUL R1, R1, 28H |

0157 | ^{i}(01E80001): ADD R1, SP, R1 |

0158 | ^{j}(4008009C): ADD R0, R0, 9CH |

0159 | ^{j}(4118009C): ADD R1, R1, 9CH |

015A | ^{j}(4200000A): MOV R2, R0, AH |

015B | ^{j}(83100000): LDR R3, R1, 0H |

015C | ^{j}(41180004): ADD R1, R1, 4H |

015D | ^{j}(A3000000): STR R3, R0, 0H |

015E | ^{j}(40080004): ADD R0, R0, 4H |

015F | ^{j}(42290001): SUB R2, R2, 1H |

0160 | ^{j}(E9FFFFFA): BNE -6 [015BH] |

0161 | ^{j}(E7FFFFE4): B -28 [0146H] |

a.e[R]_{k} := u;_{l} Kernel.PutSector(dpg0,_{m} a)_{n};_{o} | |

0162 | ^{k}(80E0002C): LDR R0, SP, 2CH |

0163 | ^{k}(41090018): SUB R1, R0, 18H |

0164 | ^{k}(DA0F1B1C): BLCC MT [trap=1, pos=3867] |

0165 | ^{k}(400A0028): MUL R0, R0, 28H |

0166 | ^{k}(00E80000): ADD R0, SP, R0 |

0167 | ^{l}(4008009C): ADD R0, R0, 9CH |

0168 | ^{l}(41E80034): ADD R1, SP, 34H |

0169 | ^{l}(4200000A): MOV R2, R0, AH |

016A | ^{l}(83100000): LDR R3, R1, 0H |

016B | ^{l}(41180004): ADD R1, R1, 4H |

016C | ^{l}(A3000000): STR R3, R0, 0H |

016D | ^{l}(40080004): ADD R0, R0, 4H |

016E | ^{l}(42290001): SUB R2, R2, 1H |

016F | ^{l}(E9FFFFFA): BNE -6 [016AH] |

0170 | ^{m}(80E00008): LDR R0, SP, 8H |

0171 | ^{n}(41E8005C): ADD R1, SP, 5CH |

0172 | ^{o} .FIXUP P |

0172 | ^{o}(F71100BA): BL MOD1 [Kernel] PROC16 |

Kernel.AllocSector(dpg0,_{p} dpg0)_{q};_{r} i := 0;_{s} | |

0173 | ^{p}(80E00008): LDR R0, SP, 8H |

0174 | ^{q}(41E80008): ADD R1, SP, 8H |

0175 | ^{r} .FIXUP P |

0175 | ^{r}(F710E003): BL MOD1 [Kernel] PROC14 |

0176 | ^{s}(40000000): MOV R0, R0, 0H |

0177 | ^{s}(A0E00020): STR R0, SP, 20H |

WHILE i < N DO_{t} a.e[i]_{u} := a.e[i+N]_{v};_{w} INC(i) END_{x} | |

0178 | ^{t}(80E00020): LDR R0, SP, 20H |

0179 | ^{t}(4009000C): SUB R0, R0, CH |

017A | ^{t}(ED000018): BGE 24 [0193H] |

017B | ^{u}(80E00020): LDR R0, SP, 20H |

017C | ^{u}(41090018): SUB R1, R0, 18H |

017D | ^{u}(DA0F921C): BLCC MT [trap=1, pos=3986] |

017E | ^{u}(400A0028): MUL R0, R0, 28H |

017F | ^{u}(00E80000): ADD R0, SP, R0 |

0180 | ^{v}(81E00020): LDR R1, SP, 20H |

0181 | ^{v}(4118000C): ADD R1, R1, CH |

0182 | ^{v}(42190018): SUB R2, R1, 18H |

0183 | ^{v}(DA0F9E1C): BLCC MT [trap=1, pos=3998] |

0184 | ^{v}(411A0028): MUL R1, R1, 28H |

0185 | ^{v}(01E80001): ADD R1, SP, R1 |

0186 | ^{w}(4008009C): ADD R0, R0, 9CH |

0187 | ^{w}(4118009C): ADD R1, R1, 9CH |

0188 | ^{w}(4200000A): MOV R2, R0, AH |

0189 | ^{w}(83100000): LDR R3, R1, 0H |

018A | ^{w}(41180004): ADD R1, R1, 4H |

018B | ^{w}(A3000000): STR R3, R0, 0H |

018C | ^{w}(40080004): ADD R0, R0, 4H |

018D | ^{w}(42290001): SUB R2, R2, 1H |

018E | ^{w}(E9FFFFFA): BNE -6 [0189H] |

018F | ^{x}(80E00020): LDR R0, SP, 20H |

0190 | ^{x}(40080001): ADD R0, R0, 1H |

0191 | ^{x}(A0E00020): STR R0, SP, 20H |

0192 | ^{x}(E7FFFFE5): B -27 [0178H] |

ELSE (*insert in right half*) | |

Kernel_{y}.PutSector(dpg0,_{z} a)_{a};_{b} | |

0193 | ^{y}(E700006B): B 107 [01FFH] |

0194 | ^{z}(80E00008): LDR R0, SP, 8H |

0195 | ^{a}(41E8005C): ADD R1, SP, 5CH |

0196 | ^{b} .FIXUP P |

0196 | ^{b}(F7110021): BL MOD1 [Kernel] PROC16 |

Kernel.AllocSector(dpg0,_{c} dpg0)_{d};_{e} DEC(R, N);_{f} i := 0;_{g} | |

0197 | ^{c}(80E00008): LDR R0, SP, 8H |

0198 | ^{d}(41E80008): ADD R1, SP, 8H |

0199 | ^{e} .FIXUP P |

0199 | ^{e}(F710E003): BL MOD1 [Kernel] PROC14 |

019A | ^{f}(80E0002C): LDR R0, SP, 2CH |

019B | ^{f}(4009000C): SUB R0, R0, CH |

019C | ^{f}(A0E0002C): STR R0, SP, 2CH |

019D | ^{g}(40000000): MOV R0, R0, 0H |

019E | ^{g}(A0E00020): STR R0, SP, 20H |

IF R = 0 THEN_{h} v := u | |

019F | ^{h}(80E0002C): LDR R0, SP, 2CH |

01A0 | ^{h}(E900000A): BNE 10 [01ABH] |

ELSE_{i} v_{j} := a.e[N];_{k} | |

01A1 | ^{i}(80E00010): LDR R0, SP, 10H |

01A2 | ^{i}(41E80034): ADD R1, SP, 34H |

01A3 | ^{i}(4200000A): MOV R2, R0, AH |

01A4 | ^{i}(83100000): LDR R3, R1, 0H |

01A5 | ^{i}(41180004): ADD R1, R1, 4H |

01A6 | ^{i}(A3000000): STR R3, R0, 0H |

01A7 | ^{i}(40080004): ADD R0, R0, 4H |

01A8 | ^{i}(42290001): SUB R2, R2, 1H |

01A9 | ^{i}(E9FFFFFA): BNE -6 [01A4H] |

01AA | ^{j}(E7000038): B 56 [01E3H] |

01AB | ^{k}(80E00010): LDR R0, SP, 10H |

01AC | ^{k}(41E8027C): ADD R1, SP, 27CH |

01AD | ^{k}(4200000A): MOV R2, R0, AH |

01AE | ^{k}(83100000): LDR R3, R1, 0H |

01AF | ^{k}(41180004): ADD R1, R1, 4H |

01B0 | ^{k}(A3000000): STR R3, R0, 0H |

01B1 | ^{k}(40080004): ADD R0, R0, 4H |

01B2 | ^{k}(42290001): SUB R2, R2, 1H |

01B3 | ^{k}(E9FFFFFA): BNE -6 [01AEH] |

WHILE i < R-1 DO_{l} a.e[i]_{m} := a.e[N+1+i]_{n};_{o} INC(i) END_{p} ; | |

01B4 | ^{l}(80E0002C): LDR R0, SP, 2CH |

01B5 | ^{l}(40090001): SUB R0, R0, 1H |

01B6 | ^{l}(81E00020): LDR R1, SP, 20H |

01B7 | ^{l}(01190000): SUB R1, R1, R0 |

01B8 | ^{l}(ED000019): BGE 25 [01D2H] |

01B9 | ^{m}(80E00020): LDR R0, SP, 20H |

01BA | ^{m}(41090018): SUB R1, R0, 18H |

01BB | ^{m}(DA109D1C): BLCC MT [trap=1, pos=4253] |

01BC | ^{m}(400A0028): MUL R0, R0, 28H |

01BD | ^{m}(00E80000): ADD R0, SP, R0 |

01BE | ^{n}(4100000D): MOV R1, R0, DH |

01BF | ^{n}(82E00020): LDR R2, SP, 20H |

01C0 | ^{n}(01180002): ADD R1, R1, R2 |

01C1 | ^{n}(42190018): SUB R2, R1, 18H |

01C2 | ^{n}(DA10AB1C): BLCC MT [trap=1, pos=4267] |

01C3 | ^{n}(411A0028): MUL R1, R1, 28H |

01C4 | ^{n}(01E80001): ADD R1, SP, R1 |

01C5 | ^{o}(4008009C): ADD R0, R0, 9CH |

01C6 | ^{o}(4118009C): ADD R1, R1, 9CH |

01C7 | ^{o}(4200000A): MOV R2, R0, AH |

01C8 | ^{o}(83100000): LDR R3, R1, 0H |

01C9 | ^{o}(41180004): ADD R1, R1, 4H |

01CA | ^{o}(A3000000): STR R3, R0, 0H |

01CB | ^{o}(40080004): ADD R0, R0, 4H |

01CC | ^{o}(42290001): SUB R2, R2, 1H |

01CD | ^{o}(E9FFFFFA): BNE -6 [01C8H] |

01CE | ^{p}(80E00020): LDR R0, SP, 20H |

01CF | ^{p}(40080001): ADD R0, R0, 1H |

01D0 | ^{p}(A0E00020): STR R0, SP, 20H |

01D1 | ^{p}(E7FFFFE2): B -30 [01B4H] |

a.e[i]_{q} := u;_{r} INC(i) | |

01D2 | ^{q}(80E00020): LDR R0, SP, 20H |

01D3 | ^{q}(41090018): SUB R1, R0, 18H |

01D4 | ^{q}(DA10CE1C): BLCC MT [trap=1, pos=4302] |

01D5 | ^{q}(400A0028): MUL R0, R0, 28H |

01D6 | ^{q}(00E80000): ADD R0, SP, R0 |

01D7 | ^{r}(4008009C): ADD R0, R0, 9CH |

01D8 | ^{r}(41E80034): ADD R1, SP, 34H |

01D9 | ^{r}(4200000A): MOV R2, R0, AH |

01DA | ^{r}(83100000): LDR R3, R1, 0H |

01DB | ^{r}(41180004): ADD R1, R1, 4H |

01DC | ^{r}(A3000000): STR R3, R0, 0H |

01DD | ^{r}(40080004): ADD R0, R0, 4H |

01DE | ^{r}(42290001): SUB R2, R2, 1H |

01DF | ^{r}(E9FFFFFA): BNE -6 [01DAH] |

END_{s} ; | |

01E0 | ^{s}(80E00020): LDR R0, SP, 20H |

01E1 | ^{s}(40080001): ADD R0, R0, 1H |

01E2 | ^{s}(A0E00020): STR R0, SP, 20H |

WHILE i < N DO_{t} a.e[i]_{u} := a.e[N+i]_{v};_{w} INC(i) END_{x} | |

01E3 | ^{t}(80E00020): LDR R0, SP, 20H |

01E4 | ^{t}(4009000C): SUB R0, R0, CH |

01E5 | ^{t}(ED000019): BGE 25 [01FFH] |

01E6 | ^{u}(80E00020): LDR R0, SP, 20H |

01E7 | ^{u}(41090018): SUB R1, R0, 18H |

01E8 | ^{u}(DA110F1C): BLCC MT [trap=1, pos=4367] |

01E9 | ^{u}(400A0028): MUL R0, R0, 28H |

01EA | ^{u}(00E80000): ADD R0, SP, R0 |

01EB | ^{v}(4100000C): MOV R1, R0, CH |

01EC | ^{v}(82E00020): LDR R2, SP, 20H |

01ED | ^{v}(01180002): ADD R1, R1, R2 |

01EE | ^{v}(42190018): SUB R2, R1, 18H |

01EF | ^{v}(DA111B1C): BLCC MT [trap=1, pos=4379] |

01F0 | ^{v}(411A0028): MUL R1, R1, 28H |

01F1 | ^{v}(01E80001): ADD R1, SP, R1 |

01F2 | ^{w}(4008009C): ADD R0, R0, 9CH |

01F3 | ^{w}(4118009C): ADD R1, R1, 9CH |

01F4 | ^{w}(4200000A): MOV R2, R0, AH |

01F5 | ^{w}(83100000): LDR R3, R1, 0H |

01F6 | ^{w}(41180004): ADD R1, R1, 4H |

01F7 | ^{w}(A3000000): STR R3, R0, 0H |

01F8 | ^{w}(40080004): ADD R0, R0, 4H |

01F9 | ^{w}(42290001): SUB R2, R2, 1H |

01FA | ^{w}(E9FFFFFA): BNE -6 [01F5H] |

01FB | ^{x}(80E00020): LDR R0, SP, 20H |

01FC | ^{x}(40080001): ADD R0, R0, 1H |

01FD | ^{x}(A0E00020): STR R0, SP, 20H |

01FE | ^{x}(E7FFFFE4): B -28 [01E3H] |

END ; | |

a.p0 := v.p;_{y} v.p := dpg0 | |

01FF | ^{y}(80E00010): LDR R0, SP, 10H |

0200 | ^{y}(80000024): LDR R0, R0, 24H |

0201 | ^{y}(A0E00064): STR R0, SP, 64H |

END_{z} ; | |

0202 | ^{z}(80E00008): LDR R0, SP, 8H |

0203 | ^{z}(81E00010): LDR R1, SP, 10H |

0204 | ^{z}(A0100024): STR R0, R1, 24H |

Kernel.PutSector(dpg0,_{a} a)_{b} | |

0205 | ^{a}(80E00008): LDR R0, SP, 8H |

0206 | ^{b}(41E8005C): ADD R1, SP, 5CH |

END_{c} | |

0207 | ^{c} .FIXUP P |

0207 | ^{c}(F711006E): BL MOD1 [Kernel] PROC16 |

END | |

END_{d} insert; | |

0208 | ^{d}(8FE00000): LDR LNK, SP, 0H |

0209 | ^{d}(4EE8045C): ADD SP, SP, 45CH |

020A | ^{d}(C700000F): B LNK |

PROCEDURE Insert*(name: FileName; fad: DiskAdr); | |

VAR oldroot: DiskAdr; | |

h: BOOLEAN; U: DirEntry; | |

a: DirPage; | |

BEGIN_{e} h := FALSE;_{f} | |

020B | ^{e} .PROC 5 |

020B | ^{e}(4EE9043C): SUB SP, SP, 43CH |

020C | ^{e}(AFE00000): STR LNK, SP, 0H |

020D | ^{e}(A0E00004): STR R0, SP, 4H |

020E | ^{e}(A1E00008): STR R1, SP, 8H |

020F | ^{f}(40000000): MOV R0, R0, 0H |

0210 | ^{f}(B0E00010): STR R0, SP, 10H |

insert(name,_{g} DirRootAdr,_{h} h,_{i} U,_{j} fad)_{k};_{l} | |

0211 | ^{g}(80E00004): LDR R0, SP, 4H |

0212 | ^{h}(4100001D): MOV R1, R0, 1DH |

0213 | ^{i}(42E80010): ADD R2, SP, 10H |

0214 | ^{j}(43E80014): ADD R3, SP, 14H |

0215 | ^{j} .FIXUP D |

0215 | ^{j}(8D00011F): LDR SB, MT, MOD0 [FileDir] |

0216 | ^{j}(44D80014): ADD R4, SB, 14H [data] |

0217 | ^{k}(85E00008): LDR R5, SP, 8H |

0218 | ^{l}(F7FFFE4E): BL -434 [0067H] |

IF h THEN_{m} (*root overflow*) | |

0219 | ^{m}(90E00010): LDR R0, SP, 10H |

021A | ^{m}(E1000021): BEQ 33 [023CH] |

Kernel.GetSector(DirRootAdr,_{n} a)_{o};_{p} ASSERT(a.mark = DirMark)_{q};_{r} | |

021B | ^{n}(4000001D): MOV R0, R0, 1DH |

021C | ^{o}(41E8003C): ADD R1, SP, 3CH |

021D | ^{p} .FIXUP P |

021D | ^{p}(F710F016): BL MOD1 [Kernel] PROC15 |

021E | ^{q}(80E0003C): LDR R0, SP, 3CH |

021F | ^{q}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0220 | ^{q}(4116A38D): IOR R1, R1, FFFFA38DH |

0221 | ^{q}(00090001): SUB R0, R0, R1 |

0222 | ^{r}(D912C87C): BLNE MT [trap=7, pos=4808] |

Kernel.AllocSector(DirRootAdr,_{s} oldroot)_{t};_{u} Kernel.PutSector(oldroot,_{v} a)_{w};_{x} | |

0223 | ^{s}(4000001D): MOV R0, R0, 1DH |

0224 | ^{t}(41E8000C): ADD R1, SP, CH |

0225 | ^{u} .FIXUP P |

0225 | ^{u}(F710E008): BL MOD1 [Kernel] PROC14 |

0226 | ^{v}(80E0000C): LDR R0, SP, CH |

0227 | ^{w}(41E8003C): ADD R1, SP, 3CH |

0228 | ^{x} .FIXUP P |

0228 | ^{x}(F7110003): BL MOD1 [Kernel] PROC16 |

a.mark := DirMark;_{y} a.m := 1;_{z} a.p0 := oldroot;_{a} a.e[0] := U;_{b} | |

0229 | ^{y}(60009B1E): MOV' R0, R0, FFFF9B1EH |

022A | ^{y}(4006A38D): IOR R0, R0, FFFFA38DH |

022B | ^{y}(A0E0003C): STR R0, SP, 3CH |

022C | ^{z}(40000001): MOV R0, R0, 1H |

022D | ^{z}(A0E00040): STR R0, SP, 40H |

022E | ^{a}(80E0000C): LDR R0, SP, CH |

022F | ^{a}(A0E00044): STR R0, SP, 44H |

0230 | ^{b}(40E8007C): ADD R0, SP, 7CH |

0231 | ^{b}(41E80014): ADD R1, SP, 14H |

0232 | ^{b}(4200000A): MOV R2, R0, AH |

0233 | ^{b}(83100000): LDR R3, R1, 0H |

0234 | ^{b}(41180004): ADD R1, R1, 4H |

0235 | ^{b}(A3000000): STR R3, R0, 0H |

0236 | ^{b}(40080004): ADD R0, R0, 4H |

0237 | ^{b}(42290001): SUB R2, R2, 1H |

0238 | ^{b}(E9FFFFFA): BNE -6 [0233H] |

Kernel.PutSector(DirRootAdr,_{c} a)_{d} | |

0239 | ^{c}(4000001D): MOV R0, R0, 1DH |

023A | ^{d}(41E8003C): ADD R1, SP, 3CH |

END_{e} | |

023B | ^{e} .FIXUP P |

023B | ^{e}(F7110013): BL MOD1 [Kernel] PROC16 |

END_{f} Insert; | |

023C | ^{f}(8FE00000): LDR LNK, SP, 0H |

023D | ^{f}(4EE8043C): ADD SP, SP, 43CH |

023E | ^{f}(C700000F): B LNK |

PROCEDURE underflow(VAR c: DirPage; (*ancestor page*) | |

dpg0: DiskAdr; | |

s: INTEGER; (*insertion point in c*) | |

VAR h: BOOLEAN); (*c undersize*) | |

VAR i, k: INTEGER; | |

dpg1: DiskAdr; | |

a, b: DirPage; (*a := underflowing page, b := neighbouring page*) | |

BEGIN_{g} Kernel.GetSector(dpg0,_{h} a)_{i};_{j} ASSERT(a.mark = DirMark)_{k};_{l} | |

023F | ^{g}(4EE90824): SUB SP, SP, 824H |

0240 | ^{g}(AFE00000): STR LNK, SP, 0H |

0241 | ^{g}(A0E00004): STR R0, SP, 4H |

0242 | ^{g}(A1E00008): STR R1, SP, 8H |

0243 | ^{g}(A2E0000C): STR R2, SP, CH |

0244 | ^{g}(A3E00010): STR R3, SP, 10H |

0245 | ^{g}(A4E00014): STR R4, SP, 14H |

0246 | ^{h}(80E0000C): LDR R0, SP, CH |

0247 | ^{i}(41E80024): ADD R1, SP, 24H |

0248 | ^{j} .FIXUP P |

0248 | ^{j}(F710F00D): BL MOD1 [Kernel] PROC15 |

0249 | ^{k}(80E00024): LDR R0, SP, 24H |

024A | ^{k}(71009B1E): MOV' R1, R0, FFFF9B1EH |

024B | ^{k}(4116A38D): IOR R1, R1, FFFFA38DH |

024C | ^{k}(00090001): SUB R0, R0, R1 |

024D | ^{l}(D915207C): BLNE MT [trap=7, pos=5408] |

(*h & a.m = N-1 & dpg0 = c.e[s-1].p*) | |

IF s < c.m THEN_{m} (*b := page to the right of a*) | |

024E | ^{m}(80E00010): LDR R0, SP, 10H |

024F | ^{m}(81E00004): LDR R1, SP, 4H |

0250 | ^{m}(81100004): LDR R1, R1, 4H |

0251 | ^{m}(00090001): SUB R0, R0, R1 |

0252 | ^{m}(ED0000EC): BGE 236 [033FH] |

dpg1 := c.e[s]_{n}.p;_{o} Kernel.GetSector(dpg1,_{p} b)_{q};_{r} ASSERT(b.mark = DirMark)_{s};_{t} | |

0253 | ^{n}(80E00010): LDR R0, SP, 10H |

0254 | ^{n}(41090018): SUB R1, R0, 18H |

0255 | ^{n}(DA15931C): BLCC MT [trap=1, pos=5523] |

0256 | ^{n}(400A0028): MUL R0, R0, 28H |

0257 | ^{n}(81E00004): LDR R1, SP, 4H |

0258 | ^{n}(00180000): ADD R0, R1, R0 |

0259 | ^{o}(80000064): LDR R0, R0, 64H |

025A | ^{o}(A0E00020): STR R0, SP, 20H |

025B | ^{p}(80E00020): LDR R0, SP, 20H |

025C | ^{q}(41E80424): ADD R1, SP, 424H |

025D | ^{r} .FIXUP P |

025D | ^{r}(F710F015): BL MOD1 [Kernel] PROC15 |

025E | ^{s}(80E00424): LDR R0, SP, 424H |

025F | ^{s}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0260 | ^{s}(4116A38D): IOR R1, R1, FFFFA38DH |

0261 | ^{s}(00090001): SUB R0, R0, R1 |

0262 | ^{t}(D915CB7C): BLNE MT [trap=7, pos=5579] |

k := (b.m-N+_{u}1)_{v} DIV 2;_{w} (*k = no. of items available on page b*) | |

0263 | ^{u}(80E00428): LDR R0, SP, 428H |

0264 | ^{u}(4009000C): SUB R0, R0, CH |

0265 | ^{v}(40080001): ADD R0, R0, 1H |

0266 | ^{w}(40020001): ASR R0, R0, 1H |

0267 | ^{w}(A0E0001C): STR R0, SP, 1CH |

a.e[N-1] := c.e[s]_{x};_{y} a.e[N-1].p := b.p0;_{z} | |

0268 | ^{x}(80E00010): LDR R0, SP, 10H |

0269 | ^{x}(41090018): SUB R1, R0, 18H |

026A | ^{x}(DA16291C): BLCC MT [trap=1, pos=5673] |

026B | ^{x}(400A0028): MUL R0, R0, 28H |

026C | ^{x}(81E00004): LDR R1, SP, 4H |

026D | ^{x}(00180000): ADD R0, R1, R0 |

026E | ^{y}(41E8021C): ADD R1, SP, 21CH |

026F | ^{y}(40080040): ADD R0, R0, 40H |

0270 | ^{y}(4200000A): MOV R2, R0, AH |

0271 | ^{y}(83000000): LDR R3, R0, 0H |

0272 | ^{y}(40080004): ADD R0, R0, 4H |

0273 | ^{y}(A3100000): STR R3, R1, 0H |

0274 | ^{y}(41180004): ADD R1, R1, 4H |

0275 | ^{y}(42290001): SUB R2, R2, 1H |

0276 | ^{y}(E9FFFFFA): BNE -6 [0271H] |

0277 | ^{z}(80E0042C): LDR R0, SP, 42CH |

0278 | ^{z}(A0E00240): STR R0, SP, 240H |

IF k > 0 THEN_{a} | |

0279 | ^{a}(80E0001C): LDR R0, SP, 1CH |

027A | ^{a}(40090000): SUB R0, R0, 0H |

027B | ^{a}(E6000071): BLE 113 [02EDH] |

(*move k-1 items from b to a, one to c*) i := 0;_{b} | |

027C | ^{b}(40000000): MOV R0, R0, 0H |

027D | ^{b}(A0E00018): STR R0, SP, 18H |

WHILE i < k-1 DO_{c} a.e[i+N]_{d} := b.e[i]_{e};_{f} INC(i) END_{g} ; | |

027E | ^{c}(80E0001C): LDR R0, SP, 1CH |

027F | ^{c}(40090001): SUB R0, R0, 1H |

0280 | ^{c}(81E00018): LDR R1, SP, 18H |

0281 | ^{c}(01190000): SUB R1, R1, R0 |

0282 | ^{c}(ED000018): BGE 24 [029BH] |

0283 | ^{d}(80E00018): LDR R0, SP, 18H |

0284 | ^{d}(4008000C): ADD R0, R0, CH |

0285 | ^{d}(41090018): SUB R1, R0, 18H |

0286 | ^{d}(DA16AD1C): BLCC MT [trap=1, pos=5805] |

0287 | ^{d}(400A0028): MUL R0, R0, 28H |

0288 | ^{d}(00E80000): ADD R0, SP, R0 |

0289 | ^{e}(81E00018): LDR R1, SP, 18H |

028A | ^{e}(42190018): SUB R2, R1, 18H |

028B | ^{e}(DA16B71C): BLCC MT [trap=1, pos=5815] |

028C | ^{e}(411A0028): MUL R1, R1, 28H |

028D | ^{e}(01E80001): ADD R1, SP, R1 |

028E | ^{f}(40080064): ADD R0, R0, 64H |

028F | ^{f}(41180464): ADD R1, R1, 464H |

0290 | ^{f}(4200000A): MOV R2, R0, AH |

0291 | ^{f}(83100000): LDR R3, R1, 0H |

0292 | ^{f}(41180004): ADD R1, R1, 4H |

0293 | ^{f}(A3000000): STR R3, R0, 0H |

0294 | ^{f}(40080004): ADD R0, R0, 4H |

0295 | ^{f}(42290001): SUB R2, R2, 1H |

0296 | ^{f}(E9FFFFFA): BNE -6 [0291H] |

0297 | ^{g}(80E00018): LDR R0, SP, 18H |

0298 | ^{g}(40080001): ADD R0, R0, 1H |

0299 | ^{g}(A0E00018): STR R0, SP, 18H |

029A | ^{g}(E7FFFFE3): B -29 [027EH] |

c.e[s]_{h} := b.e[i]_{i};_{j} b.p0 := c.e[s]_{k}.p;_{l} | |

029B | ^{h}(80E00010): LDR R0, SP, 10H |

029C | ^{h}(41090018): SUB R1, R0, 18H |

029D | ^{h}(DA16D41C): BLCC MT [trap=1, pos=5844] |

029E | ^{h}(400A0028): MUL R0, R0, 28H |

029F | ^{h}(81E00004): LDR R1, SP, 4H |

02A0 | ^{h}(00180000): ADD R0, R1, R0 |

02A1 | ^{i}(81E00018): LDR R1, SP, 18H |

02A2 | ^{i}(42190018): SUB R2, R1, 18H |

02A3 | ^{i}(DA16DE1C): BLCC MT [trap=1, pos=5854] |

02A4 | ^{i}(411A0028): MUL R1, R1, 28H |

02A5 | ^{i}(01E80001): ADD R1, SP, R1 |

02A6 | ^{j}(40080040): ADD R0, R0, 40H |

02A7 | ^{j}(41180464): ADD R1, R1, 464H |

02A8 | ^{j}(4200000A): MOV R2, R0, AH |

02A9 | ^{j}(83100000): LDR R3, R1, 0H |

02AA | ^{j}(41180004): ADD R1, R1, 4H |

02AB | ^{j}(A3000000): STR R3, R0, 0H |

02AC | ^{j}(40080004): ADD R0, R0, 4H |

02AD | ^{j}(42290001): SUB R2, R2, 1H |

02AE | ^{j}(E9FFFFFA): BNE -6 [02A9H] |

02AF | ^{k}(80E00010): LDR R0, SP, 10H |

02B0 | ^{k}(41090018): SUB R1, R0, 18H |

02B1 | ^{k}(DA16EE1C): BLCC MT [trap=1, pos=5870] |

02B2 | ^{k}(400A0028): MUL R0, R0, 28H |

02B3 | ^{k}(81E00004): LDR R1, SP, 4H |

02B4 | ^{k}(00180000): ADD R0, R1, R0 |

02B5 | ^{l}(80000064): LDR R0, R0, 64H |

02B6 | ^{l}(A0E0042C): STR R0, SP, 42CH |

c.e[s]_{m}.p := dpg1;_{n} b.m := b.m - k;_{o} i := 0;_{p} | |

02B7 | ^{m}(80E00010): LDR R0, SP, 10H |

02B8 | ^{m}(41090018): SUB R1, R0, 18H |

02B9 | ^{m}(DA17001C): BLCC MT [trap=1, pos=5888] |

02BA | ^{m}(400A0028): MUL R0, R0, 28H |

02BB | ^{m}(81E00004): LDR R1, SP, 4H |

02BC | ^{m}(00180000): ADD R0, R1, R0 |

02BD | ^{n}(81E00020): LDR R1, SP, 20H |

02BE | ^{n}(A1000064): STR R1, R0, 64H |

02BF | ^{o}(80E00428): LDR R0, SP, 428H |

02C0 | ^{o}(81E0001C): LDR R1, SP, 1CH |

02C1 | ^{o}(00090001): SUB R0, R0, R1 |

02C2 | ^{o}(A0E00428): STR R0, SP, 428H |

02C3 | ^{p}(40000000): MOV R0, R0, 0H |

02C4 | ^{p}(A0E00018): STR R0, SP, 18H |

WHILE i < b.m DO_{q} b.e[i]_{r} := b.e[i+k]_{s};_{t} INC(i) END_{u} ; | |

02C5 | ^{q}(80E00018): LDR R0, SP, 18H |

02C6 | ^{q}(81E00428): LDR R1, SP, 428H |

02C7 | ^{q}(00090001): SUB R0, R0, R1 |

02C8 | ^{q}(ED000019): BGE 25 [02E2H] |

02C9 | ^{r}(80E00018): LDR R0, SP, 18H |

02CA | ^{r}(41090018): SUB R1, R0, 18H |

02CB | ^{r}(DA17431C): BLCC MT [trap=1, pos=5955] |

02CC | ^{r}(400A0028): MUL R0, R0, 28H |

02CD | ^{r}(00E80000): ADD R0, SP, R0 |

02CE | ^{s}(81E00018): LDR R1, SP, 18H |

02CF | ^{s}(82E0001C): LDR R2, SP, 1CH |

02D0 | ^{s}(01180002): ADD R1, R1, R2 |

02D1 | ^{s}(42190018): SUB R2, R1, 18H |

02D2 | ^{s}(DA174F1C): BLCC MT [trap=1, pos=5967] |

02D3 | ^{s}(411A0028): MUL R1, R1, 28H |

02D4 | ^{s}(01E80001): ADD R1, SP, R1 |

02D5 | ^{t}(40080464): ADD R0, R0, 464H |

02D6 | ^{t}(41180464): ADD R1, R1, 464H |

02D7 | ^{t}(4200000A): MOV R2, R0, AH |

02D8 | ^{t}(83100000): LDR R3, R1, 0H |

02D9 | ^{t}(41180004): ADD R1, R1, 4H |

02DA | ^{t}(A3000000): STR R3, R0, 0H |

02DB | ^{t}(40080004): ADD R0, R0, 4H |

02DC | ^{t}(42290001): SUB R2, R2, 1H |

02DD | ^{t}(E9FFFFFA): BNE -6 [02D8H] |

02DE | ^{u}(80E00018): LDR R0, SP, 18H |

02DF | ^{u}(40080001): ADD R0, R0, 1H |

02E0 | ^{u}(A0E00018): STR R0, SP, 18H |

02E1 | ^{u}(E7FFFFE3): B -29 [02C5H] |

Kernel.PutSector(dpg1,_{v} b)_{w};_{x} a.m := N-1+k;_{y} h := FALSE | |

02E2 | ^{v}(80E00020): LDR R0, SP, 20H |

02E3 | ^{w}(41E80424): ADD R1, SP, 424H |

02E4 | ^{x} .FIXUP P |

02E4 | ^{x}(F7110087): BL MOD1 [Kernel] PROC16 |

02E5 | ^{y}(4000000B): MOV R0, R0, BH |

02E6 | ^{y}(81E0001C): LDR R1, SP, 1CH |

02E7 | ^{y}(00080001): ADD R0, R0, R1 |

02E8 | ^{y}(A0E00028): STR R0, SP, 28H |

ELSE_{z} (*merge pages a and b, discard b*) i_{a} := 0;_{b} | |

02E9 | ^{z}(40000000): MOV R0, R0, 0H |

02EA | ^{z}(81E00014): LDR R1, SP, 14H |

02EB | ^{z}(B0100000): STR R0, R1, 0H |

02EC | ^{a}(E700004E): B 78 [033BH] |

02ED | ^{b}(40000000): MOV R0, R0, 0H |

02EE | ^{b}(A0E00018): STR R0, SP, 18H |

WHILE i < N DO_{c} a.e[i+N]_{d} := b.e[i]_{e};_{f} INC(i) END_{g} ; | |

02EF | ^{c}(80E00018): LDR R0, SP, 18H |

02F0 | ^{c}(4009000C): SUB R0, R0, CH |

02F1 | ^{c}(ED000018): BGE 24 [030AH] |

02F2 | ^{d}(80E00018): LDR R0, SP, 18H |

02F3 | ^{d}(4008000C): ADD R0, R0, CH |

02F4 | ^{d}(41090018): SUB R1, R0, 18H |

02F5 | ^{d}(DA17EF1C): BLCC MT [trap=1, pos=6127] |

02F6 | ^{d}(400A0028): MUL R0, R0, 28H |

02F7 | ^{d}(00E80000): ADD R0, SP, R0 |

02F8 | ^{e}(81E00018): LDR R1, SP, 18H |

02F9 | ^{e}(42190018): SUB R2, R1, 18H |

02FA | ^{e}(DA17F91C): BLCC MT [trap=1, pos=6137] |

02FB | ^{e}(411A0028): MUL R1, R1, 28H |

02FC | ^{e}(01E80001): ADD R1, SP, R1 |

02FD | ^{f}(40080064): ADD R0, R0, 64H |

02FE | ^{f}(41180464): ADD R1, R1, 464H |

02FF | ^{f}(4200000A): MOV R2, R0, AH |

0300 | ^{f}(83100000): LDR R3, R1, 0H |

0301 | ^{f}(41180004): ADD R1, R1, 4H |

0302 | ^{f}(A3000000): STR R3, R0, 0H |

0303 | ^{f}(40080004): ADD R0, R0, 4H |

0304 | ^{f}(42290001): SUB R2, R2, 1H |

0305 | ^{f}(E9FFFFFA): BNE -6 [0300H] |

0306 | ^{g}(80E00018): LDR R0, SP, 18H |

0307 | ^{g}(40080001): ADD R0, R0, 1H |

0308 | ^{g}(A0E00018): STR R0, SP, 18H |

0309 | ^{g}(E7FFFFE5): B -27 [02EFH] |

i := s;_{h} DEC(c.m);_{i} | |

030A | ^{h}(80E00010): LDR R0, SP, 10H |

030B | ^{h}(A0E00018): STR R0, SP, 18H |

030C | ^{i}(80E00004): LDR R0, SP, 4H |

030D | ^{i}(40080004): ADD R0, R0, 4H |

030E | ^{i}(81000000): LDR R1, R0, 0H |

030F | ^{i}(41190001): SUB R1, R1, 1H |

0310 | ^{i}(A1000000): STR R1, R0, 0H |

WHILE i < c.m DO_{j} c.e[i]_{k} := c.e[i+1]_{l};_{m} INC(i) END_{n} ; | |

0311 | ^{j}(80E00018): LDR R0, SP, 18H |

0312 | ^{j}(81E00004): LDR R1, SP, 4H |

0313 | ^{j}(81100004): LDR R1, R1, 4H |

0314 | ^{j}(00090001): SUB R0, R0, R1 |

0315 | ^{j}(ED00001A): BGE 26 [0330H] |

0316 | ^{k}(80E00018): LDR R0, SP, 18H |

0317 | ^{k}(41090018): SUB R1, R0, 18H |

0318 | ^{k}(DA18411C): BLCC MT [trap=1, pos=6209] |

0319 | ^{k}(400A0028): MUL R0, R0, 28H |

031A | ^{k}(81E00004): LDR R1, SP, 4H |

031B | ^{k}(00180000): ADD R0, R1, R0 |

031C | ^{l}(81E00018): LDR R1, SP, 18H |

031D | ^{l}(41180001): ADD R1, R1, 1H |

031E | ^{l}(42190018): SUB R2, R1, 18H |

031F | ^{l}(DA184D1C): BLCC MT [trap=1, pos=6221] |

0320 | ^{l}(411A0028): MUL R1, R1, 28H |

0321 | ^{l}(82E00004): LDR R2, SP, 4H |

0322 | ^{l}(01280001): ADD R1, R2, R1 |

0323 | ^{m}(40080040): ADD R0, R0, 40H |

0324 | ^{m}(41180040): ADD R1, R1, 40H |

0325 | ^{m}(4200000A): MOV R2, R0, AH |

0326 | ^{m}(83100000): LDR R3, R1, 0H |

0327 | ^{m}(41180004): ADD R1, R1, 4H |

0328 | ^{m}(A3000000): STR R3, R0, 0H |

0329 | ^{m}(40080004): ADD R0, R0, 4H |

032A | ^{m}(42290001): SUB R2, R2, 1H |

032B | ^{m}(E9FFFFFA): BNE -6 [0326H] |

032C | ^{n}(80E00018): LDR R0, SP, 18H |

032D | ^{n}(40080001): ADD R0, R0, 1H |

032E | ^{n}(A0E00018): STR R0, SP, 18H |

032F | ^{n}(E7FFFFE1): B -31 [0311H] |

a.m := 2*N;_{o} h := c.m < N | |

0330 | ^{o}(40000018): MOV R0, R0, 18H |

0331 | ^{o}(A0E00028): STR R0, SP, 28H |

END_{p} ; | |

0332 | ^{p}(80E00004): LDR R0, SP, 4H |

0333 | ^{p}(80000004): LDR R0, R0, 4H |

0334 | ^{p}(4009000C): SUB R0, R0, CH |

0335 | ^{p}(ED000002): BGE 2 [0338H] |

0336 | ^{p}(40000001): MOV R0, R0, 1H |

0337 | ^{p}(E7000001): B 1 [0339H] |

0338 | ^{p}(40000000): MOV R0, R0, 0H |

0339 | ^{p}(81E00014): LDR R1, SP, 14H |

033A | ^{p}(B0100000): STR R0, R1, 0H |

Kernel.PutSector(dpg0,_{q} a)_{r} | |

033B | ^{q}(80E0000C): LDR R0, SP, CH |

033C | ^{r}(41E80024): ADD R1, SP, 24H |

ELSE_{s} (*b := page to the left of a*) DEC_{t}(s);_{u} | |

033D | ^{s} .FIXUP P |

033D | ^{s}(F7110059): BL MOD1 [Kernel] PROC16 |

033E | ^{t}(E70000F6): B 246 [0435H] |

033F | ^{u}(80E00010): LDR R0, SP, 10H |

0340 | ^{u}(40090001): SUB R0, R0, 1H |

0341 | ^{u}(A0E00010): STR R0, SP, 10H |

IF s = 0 THEN_{v} dpg1 := c.p0 ELSE_{w} dpg1_{x} := c.e[s-1]_{y}.p END_{z} ; | |

0342 | ^{v}(80E00010): LDR R0, SP, 10H |

0343 | ^{v}(E9000004): BNE 4 [0348H] |

0344 | ^{w}(80E00004): LDR R0, SP, 4H |

0345 | ^{w}(80000008): LDR R0, R0, 8H |

0346 | ^{w}(A0E00020): STR R0, SP, 20H |

0347 | ^{x}(E7000009): B 9 [0351H] |

0348 | ^{y}(80E00010): LDR R0, SP, 10H |

0349 | ^{y}(40090001): SUB R0, R0, 1H |

034A | ^{y}(41090018): SUB R1, R0, 18H |

034B | ^{y}(DA190F1C): BLCC MT [trap=1, pos=6415] |

034C | ^{y}(400A0028): MUL R0, R0, 28H |

034D | ^{y}(81E00004): LDR R1, SP, 4H |

034E | ^{y}(00180000): ADD R0, R1, R0 |

034F | ^{z}(80000064): LDR R0, R0, 64H |

0350 | ^{z}(A0E00020): STR R0, SP, 20H |

Kernel.GetSector(dpg1,_{a} b)_{b};_{c} ASSERT(b.mark = DirMark)_{d};_{e} | |

0351 | ^{a}(80E00020): LDR R0, SP, 20H |

0352 | ^{b}(41E80424): ADD R1, SP, 424H |

0353 | ^{c} .FIXUP P |

0353 | ^{c}(F710F016): BL MOD1 [Kernel] PROC15 |

0354 | ^{d}(80E00424): LDR R0, SP, 424H |

0355 | ^{d}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0356 | ^{d}(4116A38D): IOR R1, R1, FFFFA38DH |

0357 | ^{d}(00090001): SUB R0, R0, R1 |

0358 | ^{e}(D919527C): BLNE MT [trap=7, pos=6482] |

k := (b.m-N+_{f}1)_{g} DIV 2;_{h} (*k = no. of items available on page b*) | |

0359 | ^{f}(80E00428): LDR R0, SP, 428H |

035A | ^{f}(4009000C): SUB R0, R0, CH |

035B | ^{g}(40080001): ADD R0, R0, 1H |

035C | ^{h}(40020001): ASR R0, R0, 1H |

035D | ^{h}(A0E0001C): STR R0, SP, 1CH |

IF k > 0 THEN_{i} | |

035E | ^{i}(80E0001C): LDR R0, SP, 1CH |

035F | ^{i}(40090000): SUB R0, R0, 0H |

0360 | ^{i}(E600008C): BLE 140 [03EDH] |

i := N-1;_{j} | |

0361 | ^{j}(4000000B): MOV R0, R0, BH |

0362 | ^{j}(A0E00018): STR R0, SP, 18H |

WHILE i > 0 DO_{k} DEC(i);_{l} a.e[i+k]_{m} := a.e[i]_{n} END_{o} ; | |

0363 | ^{k}(80E00018): LDR R0, SP, 18H |

0364 | ^{k}(40090000): SUB R0, R0, 0H |

0365 | ^{k}(E6000019): BLE 25 [037FH] |

0366 | ^{l}(80E00018): LDR R0, SP, 18H |

0367 | ^{l}(40090001): SUB R0, R0, 1H |

0368 | ^{l}(A0E00018): STR R0, SP, 18H |

0369 | ^{m}(80E00018): LDR R0, SP, 18H |

036A | ^{m}(81E0001C): LDR R1, SP, 1CH |

036B | ^{m}(00080001): ADD R0, R0, R1 |

036C | ^{m}(41090018): SUB R1, R0, 18H |

036D | ^{m}(DA19E51C): BLCC MT [trap=1, pos=6629] |

036E | ^{m}(400A0028): MUL R0, R0, 28H |

036F | ^{m}(00E80000): ADD R0, SP, R0 |

0370 | ^{n}(81E00018): LDR R1, SP, 18H |

0371 | ^{n}(42190018): SUB R2, R1, 18H |

0372 | ^{n}(DA19EF1C): BLCC MT [trap=1, pos=6639] |

0373 | ^{n}(411A0028): MUL R1, R1, 28H |

0374 | ^{n}(01E80001): ADD R1, SP, R1 |

0375 | ^{o}(40080064): ADD R0, R0, 64H |

0376 | ^{o}(41180064): ADD R1, R1, 64H |

0377 | ^{o}(4200000A): MOV R2, R0, AH |

0378 | ^{o}(83100000): LDR R3, R1, 0H |

0379 | ^{o}(41180004): ADD R1, R1, 4H |

037A | ^{o}(A3000000): STR R3, R0, 0H |

037B | ^{o}(40080004): ADD R0, R0, 4H |

037C | ^{o}(42290001): SUB R2, R2, 1H |

037D | ^{o}(E9FFFFFA): BNE -6 [0378H] |

037E | ^{o}(E7FFFFE4): B -28 [0363H] |

i := k-1;_{p} a.e[i]_{q} := c.e[s]_{r};_{s} a.e[i]_{t}.p := a.p0;_{u} | |

037F | ^{p}(80E0001C): LDR R0, SP, 1CH |

0380 | ^{p}(40090001): SUB R0, R0, 1H |

0381 | ^{p}(A0E00018): STR R0, SP, 18H |

0382 | ^{q}(80E00018): LDR R0, SP, 18H |

0383 | ^{q}(41090018): SUB R1, R0, 18H |

0384 | ^{q}(DA1A0E1C): BLCC MT [trap=1, pos=6670] |

0385 | ^{q}(400A0028): MUL R0, R0, 28H |

0386 | ^{q}(00E80000): ADD R0, SP, R0 |

0387 | ^{r}(81E00010): LDR R1, SP, 10H |

0388 | ^{r}(42190018): SUB R2, R1, 18H |

0389 | ^{r}(DA1A181C): BLCC MT [trap=1, pos=6680] |

038A | ^{r}(411A0028): MUL R1, R1, 28H |

038B | ^{r}(82E00004): LDR R2, SP, 4H |

038C | ^{r}(01280001): ADD R1, R2, R1 |

038D | ^{s}(40080064): ADD R0, R0, 64H |

038E | ^{s}(41180040): ADD R1, R1, 40H |

038F | ^{s}(4200000A): MOV R2, R0, AH |

0390 | ^{s}(83100000): LDR R3, R1, 0H |

0391 | ^{s}(41180004): ADD R1, R1, 4H |

0392 | ^{s}(A3000000): STR R3, R0, 0H |

0393 | ^{s}(40080004): ADD R0, R0, 4H |

0394 | ^{s}(42290001): SUB R2, R2, 1H |

0395 | ^{s}(E9FFFFFA): BNE -6 [0390H] |

0396 | ^{t}(80E00018): LDR R0, SP, 18H |

0397 | ^{t}(41090018): SUB R1, R0, 18H |

0398 | ^{t}(DA1A201C): BLCC MT [trap=1, pos=6688] |

0399 | ^{t}(400A0028): MUL R0, R0, 28H |

039A | ^{t}(00E80000): ADD R0, SP, R0 |

039B | ^{u}(81E0002C): LDR R1, SP, 2CH |

039C | ^{u}(A1000088): STR R1, R0, 88H |

(*move k-1 items from b to a, one to c*) b.m := b.m - k;_{v} | |

039D | ^{v}(80E00428): LDR R0, SP, 428H |

039E | ^{v}(81E0001C): LDR R1, SP, 1CH |

039F | ^{v}(00090001): SUB R0, R0, R1 |

03A0 | ^{v}(A0E00428): STR R0, SP, 428H |

WHILE i > 0 DO_{w} DEC(i);_{x} a.e[i]_{y} := b.e[i+b.m+_{z}1]_{a} END_{b} ; | |

03A1 | ^{w}(80E00018): LDR R0, SP, 18H |

03A2 | ^{w}(40090000): SUB R0, R0, 0H |

03A3 | ^{w}(E600001A): BLE 26 [03BEH] |

03A4 | ^{x}(80E00018): LDR R0, SP, 18H |

03A5 | ^{x}(40090001): SUB R0, R0, 1H |

03A6 | ^{x}(A0E00018): STR R0, SP, 18H |

03A7 | ^{y}(80E00018): LDR R0, SP, 18H |

03A8 | ^{y}(41090018): SUB R1, R0, 18H |

03A9 | ^{y}(DA1A921C): BLCC MT [trap=1, pos=6802] |

03AA | ^{y}(400A0028): MUL R0, R0, 28H |

03AB | ^{y}(00E80000): ADD R0, SP, R0 |

03AC | ^{z}(81E00018): LDR R1, SP, 18H |

03AD | ^{z}(82E00428): LDR R2, SP, 428H |

03AE | ^{z}(01180002): ADD R1, R1, R2 |

03AF | ^{a}(41180001): ADD R1, R1, 1H |

03B0 | ^{a}(42190018): SUB R2, R1, 18H |

03B1 | ^{a}(DA1AA21C): BLCC MT [trap=1, pos=6818] |

03B2 | ^{a}(411A0028): MUL R1, R1, 28H |

03B3 | ^{a}(01E80001): ADD R1, SP, R1 |

03B4 | ^{b}(40080064): ADD R0, R0, 64H |

03B5 | ^{b}(41180464): ADD R1, R1, 464H |

03B6 | ^{b}(4200000A): MOV R2, R0, AH |

03B7 | ^{b}(83100000): LDR R3, R1, 0H |

03B8 | ^{b}(41180004): ADD R1, R1, 4H |

03B9 | ^{b}(A3000000): STR R3, R0, 0H |

03BA | ^{b}(40080004): ADD R0, R0, 4H |

03BB | ^{b}(42290001): SUB R2, R2, 1H |

03BC | ^{b}(E9FFFFFA): BNE -6 [03B7H] |

03BD | ^{b}(E7FFFFE3): B -29 [03A1H] |

c.e[s]_{c} := b.e[b.m]_{d};_{e} a.p0 := c.e[s]_{f}.p;_{g} | |

03BE | ^{c}(80E00010): LDR R0, SP, 10H |

03BF | ^{c}(41090018): SUB R1, R0, 18H |

03C0 | ^{c}(DA1AB71C): BLCC MT [trap=1, pos=6839] |

03C1 | ^{c}(400A0028): MUL R0, R0, 28H |

03C2 | ^{c}(81E00004): LDR R1, SP, 4H |

03C3 | ^{c}(00180000): ADD R0, R1, R0 |

03C4 | ^{d}(81E00428): LDR R1, SP, 428H |

03C5 | ^{d}(42190018): SUB R2, R1, 18H |

03C6 | ^{d}(DA1AC31C): BLCC MT [trap=1, pos=6851] |

03C7 | ^{d}(411A0028): MUL R1, R1, 28H |

03C8 | ^{d}(01E80001): ADD R1, SP, R1 |

03C9 | ^{e}(40080040): ADD R0, R0, 40H |

03CA | ^{e}(41180464): ADD R1, R1, 464H |

03CB | ^{e}(4200000A): MOV R2, R0, AH |

03CC | ^{e}(83100000): LDR R3, R1, 0H |

03CD | ^{e}(41180004): ADD R1, R1, 4H |

03CE | ^{e}(A3000000): STR R3, R0, 0H |

03CF | ^{e}(40080004): ADD R0, R0, 4H |

03D0 | ^{e}(42290001): SUB R2, R2, 1H |

03D1 | ^{e}(E9FFFFFA): BNE -6 [03CCH] |

03D2 | ^{f}(80E00010): LDR R0, SP, 10H |

03D3 | ^{f}(41090018): SUB R1, R0, 18H |

03D4 | ^{f}(DA1AD31C): BLCC MT [trap=1, pos=6867] |

03D5 | ^{f}(400A0028): MUL R0, R0, 28H |

03D6 | ^{f}(81E00004): LDR R1, SP, 4H |

03D7 | ^{f}(00180000): ADD R0, R1, R0 |

03D8 | ^{g}(80000064): LDR R0, R0, 64H |

03D9 | ^{g}(A0E0002C): STR R0, SP, 2CH |

c.e[s]_{h}.p := dpg0;_{i} a.m := N-1+k;_{j} h := FALSE;_{k} | |

03DA | ^{h}(80E00010): LDR R0, SP, 10H |

03DB | ^{h}(41090018): SUB R1, R0, 18H |

03DC | ^{h}(DA1AE51C): BLCC MT [trap=1, pos=6885] |

03DD | ^{h}(400A0028): MUL R0, R0, 28H |

03DE | ^{h}(81E00004): LDR R1, SP, 4H |

03DF | ^{h}(00180000): ADD R0, R1, R0 |

03E0 | ^{i}(81E0000C): LDR R1, SP, CH |

03E1 | ^{i}(A1000064): STR R1, R0, 64H |

03E2 | ^{j}(4000000B): MOV R0, R0, BH |

03E3 | ^{j}(81E0001C): LDR R1, SP, 1CH |

03E4 | ^{j}(00080001): ADD R0, R0, R1 |

03E5 | ^{j}(A0E00028): STR R0, SP, 28H |

03E6 | ^{k}(40000000): MOV R0, R0, 0H |

03E7 | ^{k}(81E00014): LDR R1, SP, 14H |

03E8 | ^{k}(B0100000): STR R0, R1, 0H |

Kernel.PutSector(dpg0,_{l} a)_{m} | |

03E9 | ^{l}(80E0000C): LDR R0, SP, CH |

03EA | ^{m}(41E80024): ADD R1, SP, 24H |

ELSE_{n} (*merge pages a and b, discard a*) | |

03EB | ^{n} .FIXUP P |

03EB | ^{n}(F7110098): BL MOD1 [Kernel] PROC16 |

c_{o}.e[s]_{p}.p := a.p0;_{q} b.e[N] := c.e[s]_{r};_{s} i := 0;_{t} | |

03EC | ^{o}(E7000045): B 69 [0432H] |

03ED | ^{p}(80E00010): LDR R0, SP, 10H |

03EE | ^{p}(41090018): SUB R1, R0, 18H |

03EF | ^{p}(DA1B691C): BLCC MT [trap=1, pos=7017] |

03F0 | ^{p}(400A0028): MUL R0, R0, 28H |

03F1 | ^{p}(81E00004): LDR R1, SP, 4H |

03F2 | ^{p}(00180000): ADD R0, R1, R0 |

03F3 | ^{q}(81E0002C): LDR R1, SP, 2CH |

03F4 | ^{q}(A1000064): STR R1, R0, 64H |

03F5 | ^{r}(80E00010): LDR R0, SP, 10H |

03F6 | ^{r}(41090018): SUB R1, R0, 18H |

03F7 | ^{r}(DA1B851C): BLCC MT [trap=1, pos=7045] |

03F8 | ^{r}(400A0028): MUL R0, R0, 28H |

03F9 | ^{r}(81E00004): LDR R1, SP, 4H |

03FA | ^{r}(00180000): ADD R0, R1, R0 |

03FB | ^{s}(41E80644): ADD R1, SP, 644H |

03FC | ^{s}(40080040): ADD R0, R0, 40H |

03FD | ^{s}(4200000A): MOV R2, R0, AH |

03FE | ^{s}(83000000): LDR R3, R0, 0H |

03FF | ^{s}(40080004): ADD R0, R0, 4H |

0400 | ^{s}(A3100000): STR R3, R1, 0H |

0401 | ^{s}(41180004): ADD R1, R1, 4H |

0402 | ^{s}(42290001): SUB R2, R2, 1H |

0403 | ^{s}(E9FFFFFA): BNE -6 [03FEH] |

0404 | ^{t}(40000000): MOV R0, R0, 0H |

0405 | ^{t}(A0E00018): STR R0, SP, 18H |

WHILE i < N-1 DO_{u} b.e[i+N+_{v}1]_{w} := a.e[i]_{x};_{y} INC(i) END_{z} ; | |

0406 | ^{u}(80E00018): LDR R0, SP, 18H |

0407 | ^{u}(4009000B): SUB R0, R0, BH |

0408 | ^{u}(ED000019): BGE 25 [0422H] |

0409 | ^{v}(80E00018): LDR R0, SP, 18H |

040A | ^{v}(4008000C): ADD R0, R0, CH |

040B | ^{w}(40080001): ADD R0, R0, 1H |

040C | ^{w}(41090018): SUB R1, R0, 18H |

040D | ^{w}(DA1BB21C): BLCC MT [trap=1, pos=7090] |

040E | ^{w}(400A0028): MUL R0, R0, 28H |

040F | ^{w}(00E80000): ADD R0, SP, R0 |

0410 | ^{x}(81E00018): LDR R1, SP, 18H |

0411 | ^{x}(42190018): SUB R2, R1, 18H |

0412 | ^{x}(DA1BBC1C): BLCC MT [trap=1, pos=7100] |

0413 | ^{x}(411A0028): MUL R1, R1, 28H |

0414 | ^{x}(01E80001): ADD R1, SP, R1 |

0415 | ^{y}(40080464): ADD R0, R0, 464H |

0416 | ^{y}(41180064): ADD R1, R1, 64H |

0417 | ^{y}(4200000A): MOV R2, R0, AH |

0418 | ^{y}(83100000): LDR R3, R1, 0H |

0419 | ^{y}(41180004): ADD R1, R1, 4H |

041A | ^{y}(A3000000): STR R3, R0, 0H |

041B | ^{y}(40080004): ADD R0, R0, 4H |

041C | ^{y}(42290001): SUB R2, R2, 1H |

041D | ^{y}(E9FFFFFA): BNE -6 [0418H] |

041E | ^{z}(80E00018): LDR R0, SP, 18H |

041F | ^{z}(40080001): ADD R0, R0, 1H |

0420 | ^{z}(A0E00018): STR R0, SP, 18H |

0421 | ^{z}(E7FFFFE4): B -28 [0406H] |

b.m := 2*N;_{a} DEC(c.m);_{b} h := c.m < N | |

0422 | ^{a}(40000018): MOV R0, R0, 18H |

0423 | ^{a}(A0E00428): STR R0, SP, 428H |

0424 | ^{b}(80E00004): LDR R0, SP, 4H |

0425 | ^{b}(40080004): ADD R0, R0, 4H |

0426 | ^{b}(81000000): LDR R1, R0, 0H |

0427 | ^{b}(41190001): SUB R1, R1, 1H |

0428 | ^{b}(A1000000): STR R1, R0, 0H |

END_{c} ; | |

0429 | ^{c}(80E00004): LDR R0, SP, 4H |

042A | ^{c}(80000004): LDR R0, R0, 4H |

042B | ^{c}(4009000C): SUB R0, R0, CH |

042C | ^{c}(ED000002): BGE 2 [042FH] |

042D | ^{c}(40000001): MOV R0, R0, 1H |

042E | ^{c}(E7000001): B 1 [0430H] |

042F | ^{c}(40000000): MOV R0, R0, 0H |

0430 | ^{c}(81E00014): LDR R1, SP, 14H |

0431 | ^{c}(B0100000): STR R0, R1, 0H |

Kernel.PutSector(dpg1,_{d} b)_{e} | |

0432 | ^{d}(80E00020): LDR R0, SP, 20H |

0433 | ^{e}(41E80424): ADD R1, SP, 424H |

END_{f} | |

0434 | ^{f} .FIXUP P |

0434 | ^{f}(F7110049): BL MOD1 [Kernel] PROC16 |

END_{g} underflow; | |

0435 | ^{g}(8FE00000): LDR LNK, SP, 0H |

0436 | ^{g}(4EE80824): ADD SP, SP, 824H |

0437 | ^{g}(C700000F): B LNK |

PROCEDURE delete(name: FileName; | |

dpg0: DiskAdr; | |

VAR h: BOOLEAN; | |

VAR fad: DiskAdr); | |

(*search and delete entry with key name; if a page underflow arises, | |

balance with adjacent page or merge; h := "page dpg0 is undersize"*) | |

VAR i, L, R: INTEGER; | |

dpg1: DiskAdr; | |

a: DirPage; | |

PROCEDURE_{h} del(VAR a: DirPage; R: INTEGER; dpg1: DiskAdr; VAR h: BOOLEAN); | |

0438 | ^{h}(E7000061): B 97 [049AH] |

VAR dpg2: DiskAdr; (*global: a, R*) | |

b: DirPage; | |

BEGIN_{i} Kernel.GetSector(dpg1,_{j} b)_{k};_{l} ASSERT(b.mark = DirMark)_{m};_{n} dpg2 := b.e[b.m-1]_{o}.p;_{p} | |

0439 | ^{i}(4EE9041C): SUB SP, SP, 41CH |

043A | ^{i}(AFE00000): STR LNK, SP, 0H |

043B | ^{i}(A0E00004): STR R0, SP, 4H |

043C | ^{i}(A1E00008): STR R1, SP, 8H |

043D | ^{i}(A2E0000C): STR R2, SP, CH |

043E | ^{i}(A3E00010): STR R3, SP, 10H |

043F | ^{i}(A4E00014): STR R4, SP, 14H |

0440 | ^{j}(80E00010): LDR R0, SP, 10H |

0441 | ^{k}(41E8001C): ADD R1, SP, 1CH |

0442 | ^{l} .FIXUP P |

0442 | ^{l}(F710F00E): BL MOD1 [Kernel] PROC15 |

0443 | ^{m}(80E0001C): LDR R0, SP, 1CH |

0444 | ^{m}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0445 | ^{m}(4116A38D): IOR R1, R1, FFFFA38DH |

0446 | ^{m}(00090001): SUB R0, R0, R1 |

0447 | ^{n}(D91E6A7C): BLNE MT [trap=7, pos=7786] |

0448 | ^{o}(80E00020): LDR R0, SP, 20H |

0449 | ^{o}(40090001): SUB R0, R0, 1H |

044A | ^{o}(41090018): SUB R1, R0, 18H |

044B | ^{o}(DA1E7D1C): BLCC MT [trap=1, pos=7805] |

044C | ^{o}(400A0028): MUL R0, R0, 28H |

044D | ^{o}(00E80000): ADD R0, SP, R0 |

044E | ^{p}(80000080): LDR R0, R0, 80H |

044F | ^{p}(A0E00018): STR R0, SP, 18H |

IF dpg2 # 0 THEN_{q} del(a,_{r} R,_{s} dpg2,_{t} h)_{u};_{v} | |

0450 | ^{q}(80E00018): LDR R0, SP, 18H |

0451 | ^{q}(E1000014): BEQ 20 [0466H] |

0452 | ^{r}(80E00004): LDR R0, SP, 4H |

0453 | ^{r}(81E00008): LDR R1, SP, 8H |

0454 | ^{s}(82E0000C): LDR R2, SP, CH |

0455 | ^{t}(83E00018): LDR R3, SP, 18H |

0456 | ^{u}(84E00014): LDR R4, SP, 14H |

0457 | ^{v}(F7FFFFE1): BL -31 [0439H] |

IF h THEN_{w} underflow(b,_{x} dpg2,_{y} b.m,_{z} h)_{a};_{b} Kernel.PutSector(dpg1,_{c} b)_{d} END_{e} | |

0458 | ^{w}(80E00014): LDR R0, SP, 14H |

0459 | ^{w}(90000000): LDR R0, R0, 0H |

045A | ^{w}(E100000A): BEQ 10 [0465H] |

045B | ^{x}(40E8001C): ADD R0, SP, 1CH |

045C | ^{x} .FIXUP D |

045C | ^{x}(8D000247): LDR SB, MT, MOD0 [FileDir] |

045D | ^{x}(41D80028): ADD R1, SB, 28H [data] |

045E | ^{y}(82E00018): LDR R2, SP, 18H |

045F | ^{z}(83E00020): LDR R3, SP, 20H |

0460 | ^{a}(84E00014): LDR R4, SP, 14H |

0461 | ^{b}(F7FFFDDD): BL -547 [023FH] |

0462 | ^{c}(80E00010): LDR R0, SP, 10H |

0463 | ^{d}(41E8001C): ADD R1, SP, 1CH |

0464 | ^{e} .FIXUP P |

0464 | ^{e}(F7110022): BL MOD1 [Kernel] PROC16 |

ELSE | |

b_{f}.e[b.m-1]_{g}.p := a.e[R]_{h}.p;_{i} a.e[R]_{j} := b.e[b.m-1]_{k};_{l} | |

0465 | ^{f}(E7000031): B 49 [0497H] |

0466 | ^{g}(80E00020): LDR R0, SP, 20H |

0467 | ^{g}(40090001): SUB R0, R0, 1H |

0468 | ^{g}(41090018): SUB R1, R0, 18H |

0469 | ^{g}(DA1F151C): BLCC MT [trap=1, pos=7957] |

046A | ^{g}(400A0028): MUL R0, R0, 28H |

046B | ^{g}(00E80000): ADD R0, SP, R0 |

046C | ^{h}(81E0000C): LDR R1, SP, CH |

046D | ^{h}(42190018): SUB R2, R1, 18H |

046E | ^{h}(DA1F211C): BLCC MT [trap=1, pos=7969] |

046F | ^{h}(411A0028): MUL R1, R1, 28H |

0470 | ^{h}(82E00004): LDR R2, SP, 4H |

0471 | ^{h}(01280001): ADD R1, R2, R1 |

0472 | ^{i}(81100064): LDR R1, R1, 64H |

0473 | ^{i}(A1000080): STR R1, R0, 80H |

0474 | ^{j}(80E0000C): LDR R0, SP, CH |

0475 | ^{j}(41090018): SUB R1, R0, 18H |

0476 | ^{j}(DA1F2B1C): BLCC MT [trap=1, pos=7979] |

0477 | ^{j}(400A0028): MUL R0, R0, 28H |

0478 | ^{j}(81E00004): LDR R1, SP, 4H |

0479 | ^{j}(00180000): ADD R0, R1, R0 |

047A | ^{k}(81E00020): LDR R1, SP, 20H |

047B | ^{k}(41190001): SUB R1, R1, 1H |

047C | ^{k}(42190018): SUB R2, R1, 18H |

047D | ^{k}(DA1F391C): BLCC MT [trap=1, pos=7993] |

047E | ^{k}(411A0028): MUL R1, R1, 28H |

047F | ^{k}(01E80001): ADD R1, SP, R1 |

0480 | ^{l}(40080040): ADD R0, R0, 40H |

0481 | ^{l}(4118005C): ADD R1, R1, 5CH |

0482 | ^{l}(4200000A): MOV R2, R0, AH |

0483 | ^{l}(83100000): LDR R3, R1, 0H |

0484 | ^{l}(41180004): ADD R1, R1, 4H |

0485 | ^{l}(A3000000): STR R3, R0, 0H |

0486 | ^{l}(40080004): ADD R0, R0, 4H |

0487 | ^{l}(42290001): SUB R2, R2, 1H |

0488 | ^{l}(E9FFFFFA): BNE -6 [0483H] |

DEC(b.m);_{m} h := b.m < N;_{n} Kernel.PutSector(dpg1,_{o} b)_{p} | |

0489 | ^{m}(80E00020): LDR R0, SP, 20H |

048A | ^{m}(40090001): SUB R0, R0, 1H |

048B | ^{m}(A0E00020): STR R0, SP, 20H |

048C | ^{n}(80E00020): LDR R0, SP, 20H |

048D | ^{n}(4009000C): SUB R0, R0, CH |

048E | ^{n}(ED000002): BGE 2 [0491H] |

048F | ^{n}(40000001): MOV R0, R0, 1H |

0490 | ^{n}(E7000001): B 1 [0492H] |

0491 | ^{n}(40000000): MOV R0, R0, 0H |

0492 | ^{n}(81E00014): LDR R1, SP, 14H |

0493 | ^{n}(B0100000): STR R0, R1, 0H |

0494 | ^{o}(80E00010): LDR R0, SP, 10H |

0495 | ^{p}(41E8001C): ADD R1, SP, 1CH |

END_{q} | |

0496 | ^{q} .FIXUP P |

0496 | ^{q}(F7110032): BL MOD1 [Kernel] PROC16 |

END_{r} del; | |

0497 | ^{r}(8FE00000): LDR LNK, SP, 0H |

0498 | ^{r}(4EE8041C): ADD SP, SP, 41CH |

0499 | ^{r}(C700000F): B LNK |

BEGIN_{s} (*~h*) Kernel.GetSector(dpg0,_{t} a)_{u};_{v} ASSERT(a.mark = DirMark)_{w};_{x} | |

049A | ^{s}(4EE90424): SUB SP, SP, 424H |

049B | ^{s}(AFE00000): STR LNK, SP, 0H |

049C | ^{s}(A0E00004): STR R0, SP, 4H |

049D | ^{s}(A1E00008): STR R1, SP, 8H |

049E | ^{s}(A2E0000C): STR R2, SP, CH |

049F | ^{s}(A3E00010): STR R3, SP, 10H |

04A0 | ^{t}(80E00008): LDR R0, SP, 8H |

04A1 | ^{u}(41E80024): ADD R1, SP, 24H |

04A2 | ^{v} .FIXUP P |

04A2 | ^{v}(F710F00C): BL MOD1 [Kernel] PROC15 |

04A3 | ^{w}(80E00024): LDR R0, SP, 24H |

04A4 | ^{w}(71009B1E): MOV' R1, R0, FFFF9B1EH |

04A5 | ^{w}(4116A38D): IOR R1, R1, FFFFA38DH |

04A6 | ^{w}(00090001): SUB R0, R0, R1 |

04A7 | ^{x}(D91FD07C): BLNE MT [trap=7, pos=8144] |

L := 0;_{y} R := a.m;_{z} (*binary search*) | |

04A8 | ^{y}(40000000): MOV R0, R0, 0H |

04A9 | ^{y}(A0E00018): STR R0, SP, 18H |

04AA | ^{z}(80E00028): LDR R0, SP, 28H |

04AB | ^{z}(A0E0001C): STR R0, SP, 1CH |

WHILE L < R DO_{a} | |

04AC | ^{a}(80E00018): LDR R0, SP, 18H |

04AD | ^{a}(81E0001C): LDR R1, SP, 1CH |

04AE | ^{a}(00090001): SUB R0, R0, R1 |

04AF | ^{a}(ED00001C): BGE 28 [04CCH] |

i := (L+R)_{b} DIV 2;_{c} | |

04B0 | ^{b}(80E00018): LDR R0, SP, 18H |

04B1 | ^{b}(81E0001C): LDR R1, SP, 1CH |

04B2 | ^{b}(00080001): ADD R0, R0, R1 |

04B3 | ^{c}(40020001): ASR R0, R0, 1H |

04B4 | ^{c}(A0E00014): STR R0, SP, 14H |

IF name <= a.e[i]_{d}.name THEN_{e} R := i ELSE_{f} L_{g} := i+1 END_{h} | |

04B5 | ^{d}(80E00014): LDR R0, SP, 14H |

04B6 | ^{d}(41090018): SUB R1, R0, 18H |

04B7 | ^{d}(DA203B1C): BLCC MT [trap=1, pos=8251] |

04B8 | ^{d}(400A0028): MUL R0, R0, 28H |

04B9 | ^{d}(00E80000): ADD R0, SP, R0 |

04BA | ^{e}(81E00004): LDR R1, SP, 4H |

04BB | ^{e}(40080064): ADD R0, R0, 64H |

04BC | ^{e}(92100000): LDR R2, R1, 0H |

04BD | ^{e}(41180001): ADD R1, R1, 1H |

04BE | ^{e}(93000000): LDR R3, R0, 0H |

04BF | ^{e}(40080001): ADD R0, R0, 1H |

04C0 | ^{e}(04290003): SUB R4, R2, R3 |

04C1 | ^{e}(E9000002): BNE 2 [04C4H] |

04C2 | ^{e}(44290000): SUB R4, R2, 0H |

04C3 | ^{e}(E9FFFFF8): BNE -8 [04BCH] |

04C4 | ^{e}(EE000003): BGT 3 [04C8H] |

04C5 | ^{f}(80E00014): LDR R0, SP, 14H |

04C6 | ^{f}(A0E0001C): STR R0, SP, 1CH |

04C7 | ^{g}(E7000003): B 3 [04CBH] |

04C8 | ^{h}(80E00014): LDR R0, SP, 14H |

04C9 | ^{h}(40080001): ADD R0, R0, 1H |

04CA | ^{h}(A0E00018): STR R0, SP, 18H |

END_{i} ; | |

04CB | ^{i}(E7FFFFE0): B -32 [04ACH] |

IF R = 0 THEN_{j} dpg1 := a.p0 ELSE_{k} dpg1_{l} := a.e[R-1]_{m}.p END_{n} ; | |

04CC | ^{j}(80E0001C): LDR R0, SP, 1CH |

04CD | ^{j}(E9000003): BNE 3 [04D1H] |

04CE | ^{k}(80E0002C): LDR R0, SP, 2CH |

04CF | ^{k}(A0E00020): STR R0, SP, 20H |

04D0 | ^{l}(E7000008): B 8 [04D9H] |

04D1 | ^{m}(80E0001C): LDR R0, SP, 1CH |

04D2 | ^{m}(40090001): SUB R0, R0, 1H |

04D3 | ^{m}(41090018): SUB R1, R0, 18H |

04D4 | ^{m}(DA209D1C): BLCC MT [trap=1, pos=8349] |

04D5 | ^{m}(400A0028): MUL R0, R0, 28H |

04D6 | ^{m}(00E80000): ADD R0, SP, R0 |

04D7 | ^{n}(80000088): LDR R0, R0, 88H |

04D8 | ^{n}(A0E00020): STR R0, SP, 20H |

IF (R < a.m)_{o} & (_{p}name = a.e[R]_{q}.name)_{r} THEN_{s} | |

04D9 | ^{o}(80E0001C): LDR R0, SP, 1CH |

04DA | ^{o}(81E00028): LDR R1, SP, 28H |

04DB | ^{o}(00090001): SUB R0, R0, R1 |

04DC | ^{p}(ED000059): BGE 89 [0536H] |

04DD | ^{q}(80E0001C): LDR R0, SP, 1CH |

04DE | ^{q}(41090018): SUB R1, R0, 18H |

04DF | ^{q}(DA20C71C): BLCC MT [trap=1, pos=8391] |

04E0 | ^{q}(400A0028): MUL R0, R0, 28H |

04E1 | ^{q}(00E80000): ADD R0, SP, R0 |

04E2 | ^{r}(81E00004): LDR R1, SP, 4H |

04E3 | ^{r}(40080064): ADD R0, R0, 64H |

04E4 | ^{r}(92100000): LDR R2, R1, 0H |

04E5 | ^{r}(41180001): ADD R1, R1, 1H |

04E6 | ^{r}(93000000): LDR R3, R0, 0H |

04E7 | ^{r}(40080001): ADD R0, R0, 1H |

04E8 | ^{r}(04290003): SUB R4, R2, R3 |

04E9 | ^{r}(E9000002): BNE 2 [04ECH] |

04EA | ^{r}(44290000): SUB R4, R2, 0H |

04EB | ^{r}(E9FFFFF8): BNE -8 [04E4H] |

04EC | ^{s}(E9000049): BNE 73 [0536H] |

(*found, now delete*) fad := a.e[R]_{t}.adr;_{u} | |

04ED | ^{t}(80E0001C): LDR R0, SP, 1CH |

04EE | ^{t}(41090018): SUB R1, R0, 18H |

04EF | ^{t}(DA20FC1C): BLCC MT [trap=1, pos=8444] |

04F0 | ^{t}(400A0028): MUL R0, R0, 28H |

04F1 | ^{t}(00E80000): ADD R0, SP, R0 |

04F2 | ^{u}(80000084): LDR R0, R0, 84H |

04F3 | ^{u}(81E00010): LDR R1, SP, 10H |

04F4 | ^{u}(A0100000): STR R0, R1, 0H |

IF dpg1 = 0 THEN_{v} (*a is a leaf page*) | |

04F5 | ^{v}(80E00020): LDR R0, SP, 20H |

04F6 | ^{v}(E900002A): BNE 42 [0521H] |

DEC(a.m);_{w} h := a.m < N;_{x} i := R;_{y} | |

04F7 | ^{w}(80E00028): LDR R0, SP, 28H |

04F8 | ^{w}(40090001): SUB R0, R0, 1H |

04F9 | ^{w}(A0E00028): STR R0, SP, 28H |

04FA | ^{x}(80E00028): LDR R0, SP, 28H |

04FB | ^{x}(4009000C): SUB R0, R0, CH |

04FC | ^{x}(ED000002): BGE 2 [04FFH] |

04FD | ^{x}(40000001): MOV R0, R0, 1H |

04FE | ^{x}(E7000001): B 1 [0500H] |

04FF | ^{x}(40000000): MOV R0, R0, 0H |

0500 | ^{x}(81E0000C): LDR R1, SP, CH |

0501 | ^{x}(B0100000): STR R0, R1, 0H |

0502 | ^{y}(80E0001C): LDR R0, SP, 1CH |

0503 | ^{y}(A0E00014): STR R0, SP, 14H |

WHILE i < a.m DO_{z} a.e[i]_{a} := a.e[i+1]_{b};_{c} INC(i) END_{d} | |

0504 | ^{z}(80E00014): LDR R0, SP, 14H |

0505 | ^{z}(81E00028): LDR R1, SP, 28H |

0506 | ^{z}(00090001): SUB R0, R0, R1 |

0507 | ^{z}(ED000018): BGE 24 [0520H] |

0508 | ^{a}(80E00014): LDR R0, SP, 14H |

0509 | ^{a}(41090018): SUB R1, R0, 18H |

050A | ^{a}(DA21761C): BLCC MT [trap=1, pos=8566] |

050B | ^{a}(400A0028): MUL R0, R0, 28H |

050C | ^{a}(00E80000): ADD R0, SP, R0 |

050D | ^{b}(81E00014): LDR R1, SP, 14H |

050E | ^{b}(41180001): ADD R1, R1, 1H |

050F | ^{b}(42190018): SUB R2, R1, 18H |

0510 | ^{b}(DA21821C): BLCC MT [trap=1, pos=8578] |

0511 | ^{b}(411A0028): MUL R1, R1, 28H |

0512 | ^{b}(01E80001): ADD R1, SP, R1 |

0513 | ^{c}(40080064): ADD R0, R0, 64H |

0514 | ^{c}(41180064): ADD R1, R1, 64H |

0515 | ^{c}(4200000A): MOV R2, R0, AH |

0516 | ^{c}(83100000): LDR R3, R1, 0H |

0517 | ^{c}(41180004): ADD R1, R1, 4H |

0518 | ^{c}(A3000000): STR R3, R0, 0H |

0519 | ^{c}(40080004): ADD R0, R0, 4H |

051A | ^{c}(42290001): SUB R2, R2, 1H |

051B | ^{c}(E9FFFFFA): BNE -6 [0516H] |

051C | ^{d}(80E00014): LDR R0, SP, 14H |

051D | ^{d}(40080001): ADD R0, R0, 1H |

051E | ^{d}(A0E00014): STR R0, SP, 14H |

051F | ^{d}(E7FFFFE4): B -28 [0504H] |

ELSE del_{e}(a,_{f} R,_{g} dpg1,_{h} h)_{i};_{j} | |

0520 | ^{e}(E7000011): B 17 [0532H] |

0521 | ^{f}(40E80024): ADD R0, SP, 24H |

0522 | ^{f} .FIXUP D |

0522 | ^{f}(8D0000C6): LDR SB, MT, MOD0 [FileDir] |

0523 | ^{f}(41D80028): ADD R1, SB, 28H [data] |

0524 | ^{g}(82E0001C): LDR R2, SP, 1CH |

0525 | ^{h}(83E00020): LDR R3, SP, 20H |

0526 | ^{i}(84E0000C): LDR R4, SP, CH |

0527 | ^{j}(F7FFFF11): BL -239 [0439H] |

IF h THEN_{k} underflow(a,_{l} dpg1,_{m} R,_{n} h)_{o} END_{p} | |

0528 | ^{k}(80E0000C): LDR R0, SP, CH |

0529 | ^{k}(90000000): LDR R0, R0, 0H |

052A | ^{k}(E1000007): BEQ 7 [0532H] |

052B | ^{l}(40E80024): ADD R0, SP, 24H |

052C | ^{l} .FIXUP D |

052C | ^{l}(8D00000A): LDR SB, MT, MOD0 [FileDir] |

052D | ^{l}(41D80028): ADD R1, SB, 28H [data] |

052E | ^{m}(82E00020): LDR R2, SP, 20H |

052F | ^{n}(83E0001C): LDR R3, SP, 1CH |

0530 | ^{o}(84E0000C): LDR R4, SP, CH |

0531 | ^{p}(F7FFFD0D): BL -755 [023FH] |

END ; | |

Kernel.PutSector(dpg0,_{q} a)_{r} | |

0532 | ^{q}(80E00008): LDR R0, SP, 8H |

0533 | ^{r}(41E80024): ADD R1, SP, 24H |

ELSIF_{s} dpg1_{t} # 0 THEN_{u} | |

0534 | ^{s} .FIXUP P |

0534 | ^{s}(F7110092): BL MOD1 [Kernel] PROC16 |

0535 | ^{t}(E7000018): B 24 [054EH] |

0536 | ^{u}(80E00020): LDR R0, SP, 20H |

0537 | ^{u}(E1000013): BEQ 19 [054BH] |

delete(name,_{v} dpg1,_{w} h,_{x} fad)_{y};_{z} | |

0538 | ^{v}(80E00004): LDR R0, SP, 4H |

0539 | ^{w}(81E00020): LDR R1, SP, 20H |

053A | ^{x}(82E0000C): LDR R2, SP, CH |

053B | ^{y}(83E00010): LDR R3, SP, 10H |

053C | ^{z}(F7FFFF5D): BL -163 [049AH] |

IF h THEN_{a} underflow(a,_{b} dpg1,_{c} R,_{d} h)_{e};_{f} Kernel.PutSector(dpg0,_{g} a)_{h} END_{i} | |

053D | ^{a}(80E0000C): LDR R0, SP, CH |

053E | ^{a}(90000000): LDR R0, R0, 0H |

053F | ^{a}(E100000A): BEQ 10 [054AH] |

0540 | ^{b}(40E80024): ADD R0, SP, 24H |

0541 | ^{b} .FIXUP D |

0541 | ^{b}(8D000015): LDR SB, MT, MOD0 [FileDir] |

0542 | ^{b}(41D80028): ADD R1, SB, 28H [data] |

0543 | ^{c}(82E00020): LDR R2, SP, 20H |

0544 | ^{d}(83E0001C): LDR R3, SP, 1CH |

0545 | ^{e}(84E0000C): LDR R4, SP, CH |

0546 | ^{f}(F7FFFCF8): BL -776 [023FH] |

0547 | ^{g}(80E00008): LDR R0, SP, 8H |

0548 | ^{h}(41E80024): ADD R1, SP, 24H |

0549 | ^{i} .FIXUP P |

0549 | ^{i}(F7110015): BL MOD1 [Kernel] PROC16 |

ELSE (*not in tree*) fad_{j} := 0 | |

054A | ^{j}(E7000003): B 3 [054EH] |

END_{k} | |

054B | ^{k}(40000000): MOV R0, R0, 0H |

054C | ^{k}(81E00010): LDR R1, SP, 10H |

054D | ^{k}(A0100000): STR R0, R1, 0H |

END_{l} delete; | |

054E | ^{l}(8FE00000): LDR LNK, SP, 0H |

054F | ^{l}(4EE80424): ADD SP, SP, 424H |

0550 | ^{l}(C700000F): B LNK |

PROCEDURE Delete*(name: FileName; VAR fad: DiskAdr); | |

VAR h: BOOLEAN; newroot: DiskAdr; | |

a: DirPage; | |

BEGIN_{m} h := FALSE;_{n} | |

0551 | ^{m} .PROC 6 |

0551 | ^{m}(4EE90414): SUB SP, SP, 414H |

0552 | ^{m}(AFE00000): STR LNK, SP, 0H |

0553 | ^{m}(A0E00004): STR R0, SP, 4H |

0554 | ^{m}(A1E00008): STR R1, SP, 8H |

0555 | ^{n}(40000000): MOV R0, R0, 0H |

0556 | ^{n}(B0E0000C): STR R0, SP, CH |

delete(name,_{o} DirRootAdr,_{p} h,_{q} fad)_{r};_{s} | |

0557 | ^{o}(80E00004): LDR R0, SP, 4H |

0558 | ^{p}(4100001D): MOV R1, R0, 1DH |

0559 | ^{q}(42E8000C): ADD R2, SP, CH |

055A | ^{r}(83E00008): LDR R3, SP, 8H |

055B | ^{s}(F7FFFF3E): BL -194 [049AH] |

IF h THEN_{t} (*root underflow*) | |

055C | ^{t}(90E0000C): LDR R0, SP, CH |

055D | ^{t}(E1000019): BEQ 25 [0577H] |

Kernel.GetSector(DirRootAdr,_{u} a)_{v};_{w} ASSERT(a.mark = DirMark)_{x};_{y} | |

055E | ^{u}(4000001D): MOV R0, R0, 1DH |

055F | ^{v}(41E80014): ADD R1, SP, 14H |

0560 | ^{w} .FIXUP P |

0560 | ^{w}(F710F017): BL MOD1 [Kernel] PROC15 |

0561 | ^{x}(80E00014): LDR R0, SP, 14H |

0562 | ^{x}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0563 | ^{x}(4116A38D): IOR R1, R1, FFFFA38DH |

0564 | ^{x}(00090001): SUB R0, R0, R1 |

0565 | ^{y}(D923CE7C): BLNE MT [trap=7, pos=9166] |

IF (a.m = 0)_{z} & (_{a}a.p0 # 0)_{b} THEN_{c} | |

0566 | ^{z}(80E00018): LDR R0, SP, 18H |

0567 | ^{a}(E900000F): BNE 15 [0577H] |

0568 | ^{b}(80E0001C): LDR R0, SP, 1CH |

0569 | ^{c}(E100000D): BEQ 13 [0577H] |

newroot := a.p0;_{d} Kernel.GetSector(newroot,_{e} a)_{f};_{g} ASSERT(a.mark = DirMark)_{h};_{i} | |

056A | ^{d}(80E0001C): LDR R0, SP, 1CH |

056B | ^{d}(A0E00010): STR R0, SP, 10H |

056C | ^{e}(80E00010): LDR R0, SP, 10H |

056D | ^{f}(41E80014): ADD R1, SP, 14H |

056E | ^{g} .FIXUP P |

056E | ^{g}(F710F00E): BL MOD1 [Kernel] PROC15 |

056F | ^{h}(80E00014): LDR R0, SP, 14H |

0570 | ^{h}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0571 | ^{h}(4116A38D): IOR R1, R1, FFFFA38DH |

0572 | ^{h}(00090001): SUB R0, R0, R1 |

0573 | ^{i}(D924447C): BLNE MT [trap=7, pos=9284] |

Kernel.PutSector(DirRootAdr,_{j} a)_{k} (*discard newroot*) | |

0574 | ^{j}(4000001D): MOV R0, R0, 1DH |

0575 | ^{k}(41E80014): ADD R1, SP, 14H |

END_{l} | |

0576 | ^{l} .FIXUP P |

0576 | ^{l}(F7110008): BL MOD1 [Kernel] PROC16 |

END | |

END_{m} Delete; | |

0577 | ^{m}(8FE00000): LDR LNK, SP, 0H |

0578 | ^{m}(4EE80414): ADD SP, SP, 414H |

0579 | ^{m}(C700000F): B LNK |

PROCEDURE enumerate(prefix: ARRAY OF CHAR; | |

dpg: DiskAdr; | |

proc: EntryHandler; | |

VAR continue: BOOLEAN); | |

VAR i, j: INTEGER; pfx, nmx: CHAR; | |

dpg1: DiskAdr; a: DirPage; | |

BEGIN_{n} Kernel.GetSector(dpg,_{o} a)_{p};_{q} ASSERT(a.mark = DirMark)_{r};_{s} i := 0;_{t} | |

057A | ^{n}(4EE90428): SUB SP, SP, 428H |

057B | ^{n}(AFE00000): STR LNK, SP, 0H |

057C | ^{n}(A0E00004): STR R0, SP, 4H |

057D | ^{n}(A1E00008): STR R1, SP, 8H |

057E | ^{n}(A2E0000C): STR R2, SP, CH |

057F | ^{n}(A3E00010): STR R3, SP, 10H |

0580 | ^{n}(A4E00014): STR R4, SP, 14H |

0581 | ^{o}(80E0000C): LDR R0, SP, CH |

0582 | ^{p}(41E80028): ADD R1, SP, 28H |

0583 | ^{q} .FIXUP P |

0583 | ^{q}(F710F00D): BL MOD1 [Kernel] PROC15 |

0584 | ^{r}(80E00028): LDR R0, SP, 28H |

0585 | ^{r}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0586 | ^{r}(4116A38D): IOR R1, R1, FFFFA38DH |

0587 | ^{r}(00090001): SUB R0, R0, R1 |

0588 | ^{s}(D925E17C): BLNE MT [trap=7, pos=9697] |

0589 | ^{t}(40000000): MOV R0, R0, 0H |

058A | ^{t}(A0E00018): STR R0, SP, 18H |

WHILE (i < a.m)_{u} & continue_{v} DO_{w} | |

058B | ^{u}(80E00018): LDR R0, SP, 18H |

058C | ^{u}(81E0002C): LDR R1, SP, 2CH |

058D | ^{u}(00090001): SUB R0, R0, R1 |

058E | ^{v}(ED000057): BGE 87 [05E6H] |

058F | ^{w}(80E00014): LDR R0, SP, 14H |

0590 | ^{w}(90000000): LDR R0, R0, 0H |

0591 | ^{w}(E1000054): BEQ 84 [05E6H] |

j := 0;_{x} | |

0592 | ^{x}(40000000): MOV R0, R0, 0H |

0593 | ^{x}(A0E0001C): STR R0, SP, 1CH |

REPEAT pfx := prefix[j]_{y};_{z} nmx := a.e[i]_{a}.name[j]_{b};_{c} INC(j) | |

0594 | ^{y}(80E0001C): LDR R0, SP, 1CH |

0595 | ^{y}(81E00008): LDR R1, SP, 8H |

0596 | ^{y}(01090001): SUB R1, R0, R1 |

0597 | ^{y}(DA26371C): BLCC MT [trap=1, pos=9783] |

0598 | ^{y}(81E00004): LDR R1, SP, 4H |

0599 | ^{y}(00180000): ADD R0, R1, R0 |

059A | ^{z}(90000000): LDR R0, R0, 0H |

059B | ^{z}(B0E00020): STR R0, SP, 20H |

059C | ^{a}(80E00018): LDR R0, SP, 18H |

059D | ^{a}(41090018): SUB R1, R0, 18H |

059E | ^{a}(DA26461C): BLCC MT [trap=1, pos=9798] |

059F | ^{a}(400A0028): MUL R0, R0, 28H |

05A0 | ^{a}(00E80000): ADD R0, SP, R0 |

05A1 | ^{b}(81E0001C): LDR R1, SP, 1CH |

05A2 | ^{b}(42190020): SUB R2, R1, 20H |

05A3 | ^{b}(DA264E1C): BLCC MT [trap=1, pos=9806] |

05A4 | ^{b}(00080001): ADD R0, R0, R1 |

05A5 | ^{c}(90000068): LDR R0, R0, 68H |

05A6 | ^{c}(B0E00021): STR R0, SP, 21H |

UNTIL_{d} (nmx # pfx)_{e} OR (_{f}pfx = 0X)_{g};_{h} | |

05A7 | ^{d}(80E0001C): LDR R0, SP, 1CH |

05A8 | ^{d}(40080001): ADD R0, R0, 1H |

05A9 | ^{d}(A0E0001C): STR R0, SP, 1CH |

05AA | ^{e}(90E00021): LDR R0, SP, 21H |

05AB | ^{e}(91E00020): LDR R1, SP, 20H |

05AC | ^{e}(00090001): SUB R0, R0, R1 |

05AD | ^{f}(E9000002): BNE 2 [05B0H] |

05AE | ^{g}(90E00020): LDR R0, SP, 20H |

05AF | ^{h}(E9FFFFE4): BNE -28 [0594H] |

IF nmx >= pfx THEN_{i} | |

05B0 | ^{i}(90E00021): LDR R0, SP, 21H |

05B1 | ^{i}(91E00020): LDR R1, SP, 20H |

05B2 | ^{i}(00090001): SUB R0, R0, R1 |

05B3 | ^{i}(E500002E): BLT 46 [05E2H] |

IF i = 0 THEN_{j} dpg1 := a.p0 ELSE_{k} dpg1_{l} := a.e[i-1]_{m}.p END_{n} ; | |

05B4 | ^{j}(80E00018): LDR R0, SP, 18H |

05B5 | ^{j}(E9000003): BNE 3 [05B9H] |

05B6 | ^{k}(80E00030): LDR R0, SP, 30H |

05B7 | ^{k}(A0E00024): STR R0, SP, 24H |

05B8 | ^{l}(E7000008): B 8 [05C1H] |

05B9 | ^{m}(80E00018): LDR R0, SP, 18H |

05BA | ^{m}(40090001): SUB R0, R0, 1H |

05BB | ^{m}(41090018): SUB R1, R0, 18H |

05BC | ^{m}(DA26CF1C): BLCC MT [trap=1, pos=9935] |

05BD | ^{m}(400A0028): MUL R0, R0, 28H |

05BE | ^{m}(00E80000): ADD R0, SP, R0 |

05BF | ^{n}(8000008C): LDR R0, R0, 8CH |

05C0 | ^{n}(A0E00024): STR R0, SP, 24H |

IF dpg1 # 0 THEN_{o} enumerate(prefix,_{p} dpg1,_{q} proc,_{r} continue)_{s} END_{t} ; | |

05C1 | ^{o}(80E00024): LDR R0, SP, 24H |

05C2 | ^{o}(E1000006): BEQ 6 [05C9H] |

05C3 | ^{p}(80E00004): LDR R0, SP, 4H |

05C4 | ^{p}(81E00008): LDR R1, SP, 8H |

05C5 | ^{q}(82E00024): LDR R2, SP, 24H |

05C6 | ^{r}(83E00010): LDR R3, SP, 10H |

05C7 | ^{s}(84E00014): LDR R4, SP, 14H |

05C8 | ^{t}(F7FFFFB1): BL -79 [057AH] |

IF pfx = 0X THEN_{u} | |

05C9 | ^{u}(90E00020): LDR R0, SP, 20H |

05CA | ^{u}(E9000014): BNE 20 [05DFH] |

IF continue THEN_{v} proc(a.e[i]_{w}.name,_{x} a.e[i]_{y}.adr,_{z} continue)_{a} END_{b} | |

05CB | ^{v}(80E00014): LDR R0, SP, 14H |

05CC | ^{v}(90000000): LDR R0, R0, 0H |

05CD | ^{v}(E1000010): BEQ 16 [05DEH] |

05CE | ^{w}(80E00018): LDR R0, SP, 18H |

05CF | ^{w}(41090018): SUB R1, R0, 18H |

05D0 | ^{w}(DA275E1C): BLCC MT [trap=1, pos=10078] |

05D1 | ^{w}(400A0028): MUL R0, R0, 28H |

05D2 | ^{w}(00E80000): ADD R0, SP, R0 |

05D3 | ^{x}(40080068): ADD R0, R0, 68H |

05D4 | ^{y}(81E00018): LDR R1, SP, 18H |

05D5 | ^{y}(42190018): SUB R2, R1, 18H |

05D6 | ^{y}(DA276B1C): BLCC MT [trap=1, pos=10091] |

05D7 | ^{y}(411A0028): MUL R1, R1, 28H |

05D8 | ^{y}(01E80001): ADD R1, SP, R1 |

05D9 | ^{z}(81100088): LDR R1, R1, 88H |

05DA | ^{a}(82E00014): LDR R2, SP, 14H |

05DB | ^{b}(83E00010): LDR R3, SP, 10H |

05DC | ^{b}(D1277E5C): BLEQ MT [trap=5, pos=10110] |

05DD | ^{b}(D7000003): BL R3 |

ELSE continue_{c} := FALSE | |

05DE | ^{c}(E7000003): B 3 [05E2H] |

END_{d} | |

05DF | ^{d}(40000000): MOV R0, R0, 0H |

05E0 | ^{d}(81E00014): LDR R1, SP, 14H |

05E1 | ^{d}(B0100000): STR R0, R1, 0H |

END ; | |

INC(i) | |

END_{e} ; | |

05E2 | ^{e}(80E00018): LDR R0, SP, 18H |

05E3 | ^{e}(40080001): ADD R0, R0, 1H |

05E4 | ^{e}(A0E00018): STR R0, SP, 18H |

05E5 | ^{e}(E7FFFFA5): B -91 [058BH] |

IF continue & (_{f}i > 0)_{g} & (_{h}a.e[i-1]_{i}.p # 0)_{j} THEN_{k} | |

05E6 | ^{f}(80E00014): LDR R0, SP, 14H |

05E7 | ^{f}(90000000): LDR R0, R0, 0H |

05E8 | ^{f}(E1000017): BEQ 23 [0600H] |

05E9 | ^{g}(80E00018): LDR R0, SP, 18H |

05EA | ^{g}(40090000): SUB R0, R0, 0H |

05EB | ^{h}(E6000014): BLE 20 [0600H] |

05EC | ^{i}(80E00018): LDR R0, SP, 18H |

05ED | ^{i}(40090001): SUB R0, R0, 1H |

05EE | ^{i}(41090018): SUB R1, R0, 18H |

05EF | ^{i}(DA27F21C): BLCC MT [trap=1, pos=10226] |

05F0 | ^{i}(400A0028): MUL R0, R0, 28H |

05F1 | ^{i}(00E80000): ADD R0, SP, R0 |

05F2 | ^{j}(8000008C): LDR R0, R0, 8CH |

05F3 | ^{k}(E100000C): BEQ 12 [0600H] |

enumerate(prefix,_{l} a.e[i-1]_{m}.p,_{n} proc,_{o} continue)_{p} | |

05F4 | ^{l}(80E00004): LDR R0, SP, 4H |

05F5 | ^{l}(81E00008): LDR R1, SP, 8H |

05F6 | ^{m}(82E00018): LDR R2, SP, 18H |

05F7 | ^{m}(42290001): SUB R2, R2, 1H |

05F8 | ^{m}(43290018): SUB R3, R2, 18H |

05F9 | ^{m}(DA281F1C): BLCC MT [trap=1, pos=10271] |

05FA | ^{m}(422A0028): MUL R2, R2, 28H |

05FB | ^{m}(02E80002): ADD R2, SP, R2 |

05FC | ^{n}(8220008C): LDR R2, R2, 8CH |

05FD | ^{o}(83E00010): LDR R3, SP, 10H |

05FE | ^{p}(84E00014): LDR R4, SP, 14H |

END_{q} | |

05FF | ^{q}(F7FFFF7A): BL -134 [057AH] |

END_{r} enumerate; | |

0600 | ^{r}(8FE00000): LDR LNK, SP, 0H |

0601 | ^{r}(4EE80428): ADD SP, SP, 428H |

0602 | ^{r}(C700000F): B LNK |

PROCEDURE Enumerate*(prefix: ARRAY OF CHAR; proc: EntryHandler); | |

VAR b: BOOLEAN; | |

BEGIN_{s} b := TRUE;_{t} enumerate(prefix,_{u} DirRootAdr,_{v} proc,_{w} b)_{x} | |

0603 | ^{s} .PROC 7 |

0603 | ^{s}(4EE90014): SUB SP, SP, 14H |

0604 | ^{s}(AFE00000): STR LNK, SP, 0H |

0605 | ^{s}(A0E00004): STR R0, SP, 4H |

0606 | ^{s}(A1E00008): STR R1, SP, 8H |

0607 | ^{s}(A2E0000C): STR R2, SP, CH |

0608 | ^{t}(40000001): MOV R0, R0, 1H |

0609 | ^{t}(B0E00010): STR R0, SP, 10H |

060A | ^{u}(80E00004): LDR R0, SP, 4H |

060B | ^{u}(81E00008): LDR R1, SP, 8H |

060C | ^{v}(4200001D): MOV R2, R0, 1DH |

060D | ^{w}(83E0000C): LDR R3, SP, CH |

060E | ^{x}(44E80010): ADD R4, SP, 10H |

END_{y} Enumerate; | |

060F | ^{y}(F7FFFF6A): BL -150 [057AH] |

0610 | ^{y}(8FE00000): LDR LNK, SP, 0H |

0611 | ^{y}(4EE80014): ADD SP, SP, 14H |

0612 | ^{y}(C700000F): B LNK |

(* ----- initialization ----- *) | |

PROCEDURE Init*; | |

VAR k: INTEGER; | |

A: ARRAY 2000 OF DiskAdr; | |

PROCEDURE_{z} MarkSectors(VAR A: ARRAY OF DiskAdr; k: INTEGER); | |

0613 | ^{z}(E7000178): B 376 [078CH] |

VAR L, R, i, j, n: INTEGER; x: DiskAdr; | |

hd: FileHeader; | |

B: IndexSector; | |

PROCEDURE_{a} sift(VAR A: ARRAY OF DiskAdr; L, R: INTEGER); | |

0614 | ^{a}(E700006C): B 108 [0681H] |

VAR i, j: INTEGER; x: DiskAdr; | |

BEGIN_{b} j := L;_{c} x := A[j]_{d};_{e} | |

0615 | ^{b}(4EE90020): SUB SP, SP, 20H |

0616 | ^{b}(AFE00000): STR LNK, SP, 0H |

0617 | ^{b}(A0E00004): STR R0, SP, 4H |

0618 | ^{b}(A1E00008): STR R1, SP, 8H |

0619 | ^{b}(A2E0000C): STR R2, SP, CH |

061A | ^{b}(A3E00010): STR R3, SP, 10H |

061B | ^{c}(80E0000C): LDR R0, SP, CH |

061C | ^{c}(A0E00018): STR R0, SP, 18H |

061D | ^{d}(80E00018): LDR R0, SP, 18H |

061E | ^{d}(81E00008): LDR R1, SP, 8H |

061F | ^{d}(01090001): SUB R1, R0, R1 |

0620 | ^{d}(DA2A7B1C): BLCC MT [trap=1, pos=10875] |

0621 | ^{d}(40010002): LSL R0, R0, 2H |

0622 | ^{d}(81E00004): LDR R1, SP, 4H |

0623 | ^{d}(00180000): ADD R0, R1, R0 |

0624 | ^{e}(80000000): LDR R0, R0, 0H |

0625 | ^{e}(A0E0001C): STR R0, SP, 1CH |

REPEAT i := j;_{f} j := 2*j +_{g} 1;_{h} | |

0626 | ^{f}(80E00018): LDR R0, SP, 18H |

0627 | ^{f}(A0E00014): STR R0, SP, 14H |

0628 | ^{g}(80E00018): LDR R0, SP, 18H |

0629 | ^{g}(40010001): LSL R0, R0, 1H |

062A | ^{h}(40080001): ADD R0, R0, 1H |

062B | ^{h}(A0E00018): STR R0, SP, 18H |

IF (j+1 <_{i} R)_{j} & (_{k}A[j]_{l} < A[j+1]_{m})_{n} THEN_{o} INC(j) END_{p} ; | |

062C | ^{i}(80E00018): LDR R0, SP, 18H |

062D | ^{i}(40080001): ADD R0, R0, 1H |

062E | ^{j}(81E00010): LDR R1, SP, 10H |

062F | ^{j}(00090001): SUB R0, R0, R1 |

0630 | ^{k}(ED000016): BGE 22 [0647H] |

0631 | ^{l}(80E00018): LDR R0, SP, 18H |

0632 | ^{l}(81E00008): LDR R1, SP, 8H |

0633 | ^{l}(01090001): SUB R1, R0, R1 |

0634 | ^{l}(DA2AC01C): BLCC MT [trap=1, pos=10944] |

0635 | ^{l}(40010002): LSL R0, R0, 2H |

0636 | ^{l}(81E00004): LDR R1, SP, 4H |

0637 | ^{l}(00180000): ADD R0, R1, R0 |

0638 | ^{m}(81E00018): LDR R1, SP, 18H |

0639 | ^{m}(41180001): ADD R1, R1, 1H |

063A | ^{m}(82E00008): LDR R2, SP, 8H |

063B | ^{m}(02190002): SUB R2, R1, R2 |

063C | ^{m}(DA2AC91C): BLCC MT [trap=1, pos=10953] |

063D | ^{m}(41110002): LSL R1, R1, 2H |

063E | ^{m}(82E00004): LDR R2, SP, 4H |

063F | ^{m}(01280001): ADD R1, R2, R1 |

0640 | ^{n}(80000000): LDR R0, R0, 0H |

0641 | ^{n}(81100000): LDR R1, R1, 0H |

0642 | ^{n}(00090001): SUB R0, R0, R1 |

0643 | ^{o}(ED000003): BGE 3 [0647H] |

0644 | ^{p}(80E00018): LDR R0, SP, 18H |

0645 | ^{p}(40080001): ADD R0, R0, 1H |

0646 | ^{p}(A0E00018): STR R0, SP, 18H |

IF (j < R)_{q} & (_{r}x <= A[j]_{s})_{t} THEN_{u} A[i]_{v} := A[j]_{w} END_{x} | |

0647 | ^{q}(80E00018): LDR R0, SP, 18H |

0648 | ^{q}(81E00010): LDR R1, SP, 10H |

0649 | ^{q}(00090001): SUB R0, R0, R1 |

064A | ^{r}(ED00001B): BGE 27 [0666H] |

064B | ^{s}(80E00018): LDR R0, SP, 18H |

064C | ^{s}(81E00008): LDR R1, SP, 8H |

064D | ^{s}(01090001): SUB R1, R0, R1 |

064E | ^{s}(DA2AFE1C): BLCC MT [trap=1, pos=11006] |

064F | ^{s}(40010002): LSL R0, R0, 2H |

0650 | ^{s}(81E00004): LDR R1, SP, 4H |

0651 | ^{s}(00180000): ADD R0, R1, R0 |

0652 | ^{t}(81E0001C): LDR R1, SP, 1CH |

0653 | ^{t}(80000000): LDR R0, R0, 0H |

0654 | ^{t}(01190000): SUB R1, R1, R0 |

0655 | ^{u}(EE000010): BGT 16 [0666H] |

0656 | ^{v}(80E00014): LDR R0, SP, 14H |

0657 | ^{v}(81E00008): LDR R1, SP, 8H |

0658 | ^{v}(01090001): SUB R1, R0, R1 |

0659 | ^{v}(DA2B091C): BLCC MT [trap=1, pos=11017] |

065A | ^{v}(40010002): LSL R0, R0, 2H |

065B | ^{v}(81E00004): LDR R1, SP, 4H |

065C | ^{v}(00180000): ADD R0, R1, R0 |

065D | ^{w}(81E00018): LDR R1, SP, 18H |

065E | ^{w}(82E00008): LDR R2, SP, 8H |

065F | ^{w}(02190002): SUB R2, R1, R2 |

0660 | ^{w}(DA2B111C): BLCC MT [trap=1, pos=11025] |

0661 | ^{w}(41110002): LSL R1, R1, 2H |

0662 | ^{w}(82E00004): LDR R2, SP, 4H |

0663 | ^{w}(01280001): ADD R1, R2, R1 |

0664 | ^{x}(81100000): LDR R1, R1, 0H |

0665 | ^{x}(A1000000): STR R1, R0, 0H |

UNTIL (j >= R)_{y} OR (_{z}x > A[j]_{a})_{b};_{c} | |

0666 | ^{y}(80E00018): LDR R0, SP, 18H |

0667 | ^{y}(81E00010): LDR R1, SP, 10H |

0668 | ^{y}(00090001): SUB R0, R0, R1 |

0669 | ^{z}(ED00000B): BGE 11 [0675H] |

066A | ^{a}(80E00018): LDR R0, SP, 18H |

066B | ^{a}(81E00008): LDR R1, SP, 8H |

066C | ^{a}(01090001): SUB R1, R0, R1 |

066D | ^{a}(DA2B391C): BLCC MT [trap=1, pos=11065] |

066E | ^{a}(40010002): LSL R0, R0, 2H |

066F | ^{a}(81E00004): LDR R1, SP, 4H |

0670 | ^{a}(00180000): ADD R0, R1, R0 |

0671 | ^{b}(81E0001C): LDR R1, SP, 1CH |

0672 | ^{b}(80000000): LDR R0, R0, 0H |

0673 | ^{b}(01190000): SUB R1, R1, R0 |

0674 | ^{c}(E6FFFFB1): BLE -79 [0626H] |

A[i]_{d} := x | |

0675 | ^{d}(80E00014): LDR R0, SP, 14H |

0676 | ^{d}(81E00008): LDR R1, SP, 8H |

0677 | ^{d}(01090001): SUB R1, R0, R1 |

0678 | ^{d}(DA2B481C): BLCC MT [trap=1, pos=11080] |

0679 | ^{d}(40010002): LSL R0, R0, 2H |

067A | ^{d}(81E00004): LDR R1, SP, 4H |

067B | ^{d}(00180000): ADD R0, R1, R0 |

END_{e} sift; | |

067C | ^{e}(81E0001C): LDR R1, SP, 1CH |

067D | ^{e}(A1000000): STR R1, R0, 0H |

067E | ^{e}(8FE00000): LDR LNK, SP, 0H |

067F | ^{e}(4EE80020): ADD SP, SP, 20H |

0680 | ^{e}(C700000F): B LNK |

BEGIN_{f} L := k DIV 2;_{g} R := k;_{h} (*heapsort*) | |

0681 | ^{f}(4EE90828): SUB SP, SP, 828H |

0682 | ^{f}(AFE00000): STR LNK, SP, 0H |

0683 | ^{f}(A0E00004): STR R0, SP, 4H |

0684 | ^{f}(A1E00008): STR R1, SP, 8H |

0685 | ^{f}(A2E0000C): STR R2, SP, CH |

0686 | ^{g}(80E0000C): LDR R0, SP, CH |

0687 | ^{g}(40020001): ASR R0, R0, 1H |

0688 | ^{g}(A0E00010): STR R0, SP, 10H |

0689 | ^{h}(80E0000C): LDR R0, SP, CH |

068A | ^{h}(A0E00014): STR R0, SP, 14H |

WHILE L > 0 DO_{i} DEC(L);_{j} sift(A,_{k} L,_{l} R)_{m} END_{n} ; | |

068B | ^{i}(80E00010): LDR R0, SP, 10H |

068C | ^{i}(40090000): SUB R0, R0, 0H |

068D | ^{i}(E6000009): BLE 9 [0697H] |

068E | ^{j}(80E00010): LDR R0, SP, 10H |

068F | ^{j}(40090001): SUB R0, R0, 1H |

0690 | ^{j}(A0E00010): STR R0, SP, 10H |

0691 | ^{k}(80E00004): LDR R0, SP, 4H |

0692 | ^{k}(81E00008): LDR R1, SP, 8H |

0693 | ^{l}(82E00010): LDR R2, SP, 10H |

0694 | ^{m}(83E00014): LDR R3, SP, 14H |

0695 | ^{n}(F7FFFF7F): BL -129 [0615H] |

0696 | ^{n}(E7FFFFF4): B -12 [068BH] |

WHILE R > 0 DO_{o} | |

0697 | ^{o}(80E00014): LDR R0, SP, 14H |

0698 | ^{o}(40090000): SUB R0, R0, 0H |

0699 | ^{o}(E600002B): BLE 43 [06C5H] |

DEC(R);_{p} x := A[0]_{q};_{r} A[0]_{s} := A[R]_{t};_{u} A[R]_{v} := x;_{w} sift(A,_{x} L,_{y} R)_{z} | |

069A | ^{p}(80E00014): LDR R0, SP, 14H |

069B | ^{p}(40090001): SUB R0, R0, 1H |

069C | ^{p}(A0E00014): STR R0, SP, 14H |

069D | ^{q}(40000000): MOV R0, R0, 0H |

069E | ^{q}(81E00008): LDR R1, SP, 8H |

069F | ^{q}(01090001): SUB R1, R0, R1 |

06A0 | ^{q}(DA2BEB1C): BLCC MT [trap=1, pos=11243] |

06A1 | ^{q}(40010002): LSL R0, R0, 2H |

06A2 | ^{q}(81E00004): LDR R1, SP, 4H |

06A3 | ^{q}(00180000): ADD R0, R1, R0 |

06A4 | ^{r}(80000000): LDR R0, R0, 0H |

06A5 | ^{r}(A0E00024): STR R0, SP, 24H |

06A6 | ^{s}(40000000): MOV R0, R0, 0H |

06A7 | ^{s}(81E00008): LDR R1, SP, 8H |

06A8 | ^{s}(01090001): SUB R1, R0, R1 |

06A9 | ^{s}(DA2BF11C): BLCC MT [trap=1, pos=11249] |

06AA | ^{s}(40010002): LSL R0, R0, 2H |

06AB | ^{s}(81E00004): LDR R1, SP, 4H |

06AC | ^{s}(00180000): ADD R0, R1, R0 |

06AD | ^{t}(81E00014): LDR R1, SP, 14H |

06AE | ^{t}(82E00008): LDR R2, SP, 8H |

06AF | ^{t}(02190002): SUB R2, R1, R2 |

06B0 | ^{t}(DA2BF91C): BLCC MT [trap=1, pos=11257] |

06B1 | ^{t}(41110002): LSL R1, R1, 2H |

06B2 | ^{t}(82E00004): LDR R2, SP, 4H |

06B3 | ^{t}(01280001): ADD R1, R2, R1 |

06B4 | ^{u}(81100000): LDR R1, R1, 0H |

06B5 | ^{u}(A1000000): STR R1, R0, 0H |

06B6 | ^{v}(80E00014): LDR R0, SP, 14H |

06B7 | ^{v}(81E00008): LDR R1, SP, 8H |

06B8 | ^{v}(01090001): SUB R1, R0, R1 |

06B9 | ^{v}(DA2BFF1C): BLCC MT [trap=1, pos=11263] |

06BA | ^{v}(40010002): LSL R0, R0, 2H |

06BB | ^{v}(81E00004): LDR R1, SP, 4H |

06BC | ^{v}(00180000): ADD R0, R1, R0 |

06BD | ^{w}(81E00024): LDR R1, SP, 24H |

06BE | ^{w}(A1000000): STR R1, R0, 0H |

06BF | ^{x}(80E00004): LDR R0, SP, 4H |

06C0 | ^{x}(81E00008): LDR R1, SP, 8H |

06C1 | ^{y}(82E00010): LDR R2, SP, 10H |

06C2 | ^{z}(83E00014): LDR R3, SP, 14H |

END_{a} ; | |

06C3 | ^{a}(F7FFFF51): BL -175 [0615H] |

06C4 | ^{a}(E7FFFFD2): B -46 [0697H] |

WHILE L < k DO_{b} | |

06C5 | ^{b}(80E00010): LDR R0, SP, 10H |

06C6 | ^{b}(81E0000C): LDR R1, SP, CH |

06C7 | ^{b}(00090001): SUB R0, R0, R1 |

06C8 | ^{b}(ED000069): BGE 105 [0732H] |

Kernel.GetSector(A[L]_{c},_{d} hd)_{e};_{f} ASSERT(hd.mark = HeaderMark)_{g};_{h} | |

06C9 | ^{c}(80E00010): LDR R0, SP, 10H |

06CA | ^{c}(81E00008): LDR R1, SP, 8H |

06CB | ^{c}(01090001): SUB R1, R0, R1 |

06CC | ^{c}(DA2C521C): BLCC MT [trap=1, pos=11346] |

06CD | ^{c}(40010002): LSL R0, R0, 2H |

06CE | ^{c}(81E00004): LDR R1, SP, 4H |

06CF | ^{c}(00180000): ADD R0, R1, R0 |

06D0 | ^{d}(80000000): LDR R0, R0, 0H |

06D1 | ^{e}(41E80028): ADD R1, SP, 28H |

06D2 | ^{f} .FIXUP P |

06D2 | ^{f}(F710F14F): BL MOD1 [Kernel] PROC15 |

06D3 | ^{g}(80E00028): LDR R0, SP, 28H |

06D4 | ^{g}(71009BA7): MOV' R1, R0, FFFF9BA7H |

06D5 | ^{g}(41161D86): IOR R1, R1, 1D86H |

06D6 | ^{g}(00090001): SUB R0, R0, R1 |

06D7 | ^{h}(D92C767C): BLNE MT [trap=7, pos=11382] |

IF hd.aleng < SecTabSize THEN_{i} j := hd.aleng + 1;_{j} | |

06D8 | ^{i}(80E0004C): LDR R0, SP, 4CH |

06D9 | ^{i}(40090040): SUB R0, R0, 40H |

06DA | ^{i}(ED000010): BGE 16 [06EBH] |

06DB | ^{j}(80E0004C): LDR R0, SP, 4CH |

06DC | ^{j}(40080001): ADD R0, R0, 1H |

06DD | ^{j}(A0E0001C): STR R0, SP, 1CH |

REPEAT DEC(j);_{k} Kernel.MarkSector(hd.sec[j]_{l})_{m} UNTIL_{n} j = 0 | |

06DE | ^{k}(80E0001C): LDR R0, SP, 1CH |

06DF | ^{k}(40090001): SUB R0, R0, 1H |

06E0 | ^{k}(A0E0001C): STR R0, SP, 1CH |

06E1 | ^{l}(80E0001C): LDR R0, SP, 1CH |

06E2 | ^{l}(41090040): SUB R1, R0, 40H |

06E3 | ^{l}(DA2CE41C): BLCC MT [trap=1, pos=11492] |

06E4 | ^{l}(40010002): LSL R0, R0, 2H |

06E5 | ^{l}(00E80000): ADD R0, SP, R0 |

06E6 | ^{m}(80000088): LDR R0, R0, 88H |

06E7 | ^{n} .FIXUP P |

06E7 | ^{n}(F710C015): BL MOD1 [Kernel] PROC12 |

ELSE_{o} j_{p} := SecTabSize;_{q} | |

06E8 | ^{o}(80E0001C): LDR R0, SP, 1CH |

06E9 | ^{o}(E9FFFFF4): BNE -12 [06DEH] |

06EA | ^{p}(E7000043): B 67 [072EH] |

06EB | ^{q}(40000040): MOV R0, R0, 40H |

06EC | ^{q}(A0E0001C): STR R0, SP, 1CH |

REPEAT DEC(j);_{r} Kernel.MarkSector(hd.sec[j]_{s})_{t} UNTIL_{u} j = 0;_{v} | |

06ED | ^{r}(80E0001C): LDR R0, SP, 1CH |

06EE | ^{r}(40090001): SUB R0, R0, 1H |

06EF | ^{r}(A0E0001C): STR R0, SP, 1CH |

06F0 | ^{s}(80E0001C): LDR R0, SP, 1CH |

06F1 | ^{s}(41090040): SUB R1, R0, 40H |

06F2 | ^{s}(DA2D441C): BLCC MT [trap=1, pos=11588] |

06F3 | ^{s}(40010002): LSL R0, R0, 2H |

06F4 | ^{s}(00E80000): ADD R0, SP, R0 |

06F5 | ^{t}(80000088): LDR R0, R0, 88H |

06F6 | ^{u} .FIXUP P |

06F6 | ^{u}(F710C00F): BL MOD1 [Kernel] PROC12 |

06F7 | ^{v}(80E0001C): LDR R0, SP, 1CH |

06F8 | ^{v}(E9FFFFF4): BNE -12 [06EDH] |

n := (hd.aleng - SecTabSize)_{w} DIV 256;_{x} i := 0;_{y} | |

06F9 | ^{w}(80E0004C): LDR R0, SP, 4CH |

06FA | ^{w}(40090040): SUB R0, R0, 40H |

06FB | ^{x}(40020008): ASR R0, R0, 8H |

06FC | ^{x}(A0E00020): STR R0, SP, 20H |

06FD | ^{y}(40000000): MOV R0, R0, 0H |

06FE | ^{y}(A0E00018): STR R0, SP, 18H |

WHILE i <= n DO_{z} | |

06FF | ^{z}(80E00018): LDR R0, SP, 18H |

0700 | ^{z}(81E00020): LDR R1, SP, 20H |

0701 | ^{z}(00090001): SUB R0, R0, R1 |

0702 | ^{z}(EE00002B): BGT 43 [072EH] |

Kernel.MarkSector(hd.ext[i]_{a})_{b};_{c} | |

0703 | ^{a}(80E00018): LDR R0, SP, 18H |

0704 | ^{a}(4109000C): SUB R1, R0, CH |

0705 | ^{a}(DA2DCC1C): BLCC MT [trap=1, pos=11724] |

0706 | ^{a}(40010002): LSL R0, R0, 2H |

0707 | ^{a}(00E80000): ADD R0, SP, R0 |

0708 | ^{b}(80000058): LDR R0, R0, 58H |

0709 | ^{c} .FIXUP P |

0709 | ^{c}(F710C013): BL MOD1 [Kernel] PROC12 |

Kernel.GetSector(hd.ext[i]_{d},_{e} B)_{f};_{g} (*index sector*) | |

070A | ^{d}(80E00018): LDR R0, SP, 18H |

070B | ^{d}(4109000C): SUB R1, R0, CH |

070C | ^{d}(DA2DF51C): BLCC MT [trap=1, pos=11765] |

070D | ^{d}(40010002): LSL R0, R0, 2H |

070E | ^{d}(00E80000): ADD R0, SP, R0 |

070F | ^{e}(80000058): LDR R0, R0, 58H |

0710 | ^{f}(41E80428): ADD R1, SP, 428H |

0711 | ^{g} .FIXUP P |

0711 | ^{g}(F710F008): BL MOD1 [Kernel] PROC15 |

IF i < n THEN_{h} j := 256 ELSE_{i} j_{j} := (hd.aleng - SecTabSize)_{k} MOD 256 +_{l} 1 END_{m} ; | |

0712 | ^{h}(80E00018): LDR R0, SP, 18H |

0713 | ^{h}(81E00020): LDR R1, SP, 20H |

0714 | ^{h}(00090001): SUB R0, R0, R1 |

0715 | ^{h}(ED000003): BGE 3 [0719H] |

0716 | ^{i}(40000100): MOV R0, R0, 100H |

0717 | ^{i}(A0E0001C): STR R0, SP, 1CH |

0718 | ^{j}(E7000005): B 5 [071EH] |

0719 | ^{k}(80E0004C): LDR R0, SP, 4CH |

071A | ^{k}(40090040): SUB R0, R0, 40H |

071B | ^{l}(400400FF): AND R0, R0, FFH |

071C | ^{m}(40080001): ADD R0, R0, 1H |

071D | ^{m}(A0E0001C): STR R0, SP, 1CH |

REPEAT DEC(j);_{n} Kernel.MarkSector(B[j]_{o})_{p} UNTIL_{q} j = 0;_{r} | |

071E | ^{n}(80E0001C): LDR R0, SP, 1CH |

071F | ^{n}(40090001): SUB R0, R0, 1H |

0720 | ^{n}(A0E0001C): STR R0, SP, 1CH |

0721 | ^{o}(80E0001C): LDR R0, SP, 1CH |

0722 | ^{o}(41090100): SUB R1, R0, 100H |

0723 | ^{o}(DA2E941C): BLCC MT [trap=1, pos=11924] |

0724 | ^{o}(40010002): LSL R0, R0, 2H |

0725 | ^{o}(00E80000): ADD R0, SP, R0 |

0726 | ^{p}(80000428): LDR R0, R0, 428H |

0727 | ^{q} .FIXUP P |

0727 | ^{q}(F710C016): BL MOD1 [Kernel] PROC12 |

0728 | ^{r}(80E0001C): LDR R0, SP, 1CH |

0729 | ^{r}(E9FFFFF4): BNE -12 [071EH] |

INC(i) | |

END_{s} | |

072A | ^{s}(80E00018): LDR R0, SP, 18H |

072B | ^{s}(40080001): ADD R0, R0, 1H |

072C | ^{s}(A0E00018): STR R0, SP, 18H |

072D | ^{s}(E7FFFFD1): B -47 [06FFH] |

END ; | |

INC(L) | |

END_{t} | |

072E | ^{t}(80E00010): LDR R0, SP, 10H |

072F | ^{t}(40080001): ADD R0, R0, 1H |

0730 | ^{t}(A0E00010): STR R0, SP, 10H |

0731 | ^{t}(E7FFFF93): B -109 [06C5H] |

END_{u} MarkSectors; | |

0732 | ^{u}(8FE00000): LDR LNK, SP, 0H |

0733 | ^{u}(4EE80828): ADD SP, SP, 828H |

0734 | ^{u}(C700000F): B LNK |

PROCEDURE TraverseDir(VAR A: ARRAY OF DiskAdr; VAR k: INTEGER; dpg: DiskAdr); | |

VAR i: INTEGER; a: DirPage; | |

BEGIN_{v} Kernel.GetSector(dpg,_{w} a)_{x};_{y} ASSERT(a.mark = DirMark)_{z};_{a} Kernel.MarkSector(dpg)_{b};_{c} i := 0;_{d} | |

0735 | ^{v}(4EE90418): SUB SP, SP, 418H |

0736 | ^{v}(AFE00000): STR LNK, SP, 0H |

0737 | ^{v}(A0E00004): STR R0, SP, 4H |

0738 | ^{v}(A1E00008): STR R1, SP, 8H |

0739 | ^{v}(A2E0000C): STR R2, SP, CH |

073A | ^{v}(A3E00010): STR R3, SP, 10H |

073B | ^{w}(80E00010): LDR R0, SP, 10H |

073C | ^{x}(41E80018): ADD R1, SP, 18H |

073D | ^{y} .FIXUP P |

073D | ^{y}(F710F016): BL MOD1 [Kernel] PROC15 |

073E | ^{z}(80E00018): LDR R0, SP, 18H |

073F | ^{z}(71009B1E): MOV' R1, R0, FFFF9B1EH |

0740 | ^{z}(4116A38D): IOR R1, R1, FFFFA38DH |

0741 | ^{z}(00090001): SUB R0, R0, R1 |

0742 | ^{a}(D92FB27C): BLNE MT [trap=7, pos=12210] |

0743 | ^{b}(80E00010): LDR R0, SP, 10H |

0744 | ^{c} .FIXUP P |

0744 | ^{c}(F710C007): BL MOD1 [Kernel] PROC12 |

0745 | ^{d}(40000000): MOV R0, R0, 0H |

0746 | ^{d}(A0E00014): STR R0, SP, 14H |

WHILE i < a.m DO_{e} | |

0747 | ^{e}(80E00014): LDR R0, SP, 14H |

0748 | ^{e}(81E0001C): LDR R1, SP, 1CH |

0749 | ^{e}(00090001): SUB R0, R0, R1 |

074A | ^{e}(ED000023): BGE 35 [076EH] |

A[k]_{f} := a.e[i]_{g}.adr;_{h} INC(k);_{i} INC(i);_{j} | |

074B | ^{f}(80E0000C): LDR R0, SP, CH |

074C | ^{f}(80000000): LDR R0, R0, 0H |

074D | ^{f}(81E00008): LDR R1, SP, 8H |

074E | ^{f}(01090001): SUB R1, R0, R1 |

074F | ^{f}(DA2FF61C): BLCC MT [trap=1, pos=12278] |

0750 | ^{f}(40010002): LSL R0, R0, 2H |

0751 | ^{f}(81E00004): LDR R1, SP, 4H |

0752 | ^{f}(00180000): ADD R0, R1, R0 |

0753 | ^{g}(81E00014): LDR R1, SP, 14H |

0754 | ^{g}(42190018): SUB R2, R1, 18H |

0755 | ^{g}(DA30001C): BLCC MT [trap=1, pos=12288] |

0756 | ^{g}(411A0028): MUL R1, R1, 28H |

0757 | ^{g}(01E80001): ADD R1, SP, R1 |

0758 | ^{h}(81100078): LDR R1, R1, 78H |

0759 | ^{h}(A1000000): STR R1, R0, 0H |

075A | ^{i}(80E0000C): LDR R0, SP, CH |

075B | ^{i}(81000000): LDR R1, R0, 0H |

075C | ^{i}(41180001): ADD R1, R1, 1H |

075D | ^{i}(A1000000): STR R1, R0, 0H |

075E | ^{j}(80E00014): LDR R0, SP, 14H |

075F | ^{j}(40080001): ADD R0, R0, 1H |

0760 | ^{j}(A0E00014): STR R0, SP, 14H |

IF k = 2000 THEN_{k} MarkSectors(A,_{l} k)_{m};_{n} k := 0 END_{o} | |

0761 | ^{k}(80E0000C): LDR R0, SP, CH |

0762 | ^{k}(80000000): LDR R0, R0, 0H |

0763 | ^{k}(400907D0): SUB R0, R0, 7D0H |

0764 | ^{k}(E9000008): BNE 8 [076DH] |

0765 | ^{l}(80E00004): LDR R0, SP, 4H |

0766 | ^{l}(81E00008): LDR R1, SP, 8H |

0767 | ^{m}(82E0000C): LDR R2, SP, CH |

0768 | ^{m}(82200000): LDR R2, R2, 0H |

0769 | ^{n}(F7FFFF17): BL -233 [0681H] |

076A | ^{o}(40000000): MOV R0, R0, 0H |

076B | ^{o}(81E0000C): LDR R1, SP, CH |

076C | ^{o}(A0100000): STR R0, R1, 0H |

END_{p} ; | |

076D | ^{p}(E7FFFFD9): B -39 [0747H] |

IF a.p0 # 0 THEN_{q} | |

076E | ^{q}(80E00020): LDR R0, SP, 20H |

076F | ^{q}(E1000019): BEQ 25 [0789H] |

TraverseDir(A,_{r} k,_{s} a.p0)_{t};_{u} i := 0;_{v} | |

0770 | ^{r}(80E00004): LDR R0, SP, 4H |

0771 | ^{r}(81E00008): LDR R1, SP, 8H |

0772 | ^{s}(82E0000C): LDR R2, SP, CH |

0773 | ^{t}(83E00020): LDR R3, SP, 20H |

0774 | ^{u}(F7FFFFC0): BL -64 [0735H] |

0775 | ^{v}(40000000): MOV R0, R0, 0H |

0776 | ^{v}(A0E00014): STR R0, SP, 14H |

WHILE i < a.m DO_{w} | |

0777 | ^{w}(80E00014): LDR R0, SP, 14H |

0778 | ^{w}(81E0001C): LDR R1, SP, 1CH |

0779 | ^{w}(00090001): SUB R0, R0, R1 |

077A | ^{w}(ED00000E): BGE 14 [0789H] |

TraverseDir(A,_{x} k,_{y} a.e[i]_{z}.p)_{a};_{b} INC(i) | |

077B | ^{x}(80E00004): LDR R0, SP, 4H |

077C | ^{x}(81E00008): LDR R1, SP, 8H |

077D | ^{y}(82E0000C): LDR R2, SP, CH |

077E | ^{z}(83E00014): LDR R3, SP, 14H |

077F | ^{z}(44390018): SUB R4, R3, 18H |

0780 | ^{z}(DA30D41C): BLCC MT [trap=1, pos=12500] |

0781 | ^{z}(433A0028): MUL R3, R3, 28H |

0782 | ^{z}(03E80003): ADD R3, SP, R3 |

0783 | ^{a}(8330007C): LDR R3, R3, 7CH |

0784 | ^{b}(F7FFFFB0): BL -80 [0735H] |

END_{c} | |

0785 | ^{c}(80E00014): LDR R0, SP, 14H |

0786 | ^{c}(40080001): ADD R0, R0, 1H |

0787 | ^{c}(A0E00014): STR R0, SP, 14H |

0788 | ^{c}(E7FFFFEE): B -18 [0777H] |

END | |

END_{d} TraverseDir; | |

0789 | ^{d}(8FE00000): LDR LNK, SP, 0H |

078A | ^{d}(4EE80418): ADD SP, SP, 418H |

078B | ^{d}(C700000F): B LNK |

BEGIN_{e} k := 0;_{f} TraverseDir(A,_{g} k,_{h} DirRootAdr)_{i};_{j} MarkSectors(A,_{k} k)_{l} | |

078C | ^{e} .PROC 8 |

078C | ^{e} .COMMAND Init |

078C | ^{e}(4EE91F48): SUB SP, SP, 1F48H |

078D | ^{e}(AFE00000): STR LNK, SP, 0H |

078E | ^{f}(40000000): MOV R0, R0, 0H |

078F | ^{f}(A0E00004): STR R0, SP, 4H |

0790 | ^{g}(40E80008): ADD R0, SP, 8H |

0791 | ^{g}(410007D0): MOV R1, R0, 7D0H |

0792 | ^{h}(42E80004): ADD R2, SP, 4H |

0793 | ^{i}(4300001D): MOV R3, R0, 1DH |

0794 | ^{j}(F7FFFFA0): BL -96 [0735H] |

0795 | ^{k}(40E80008): ADD R0, SP, 8H |

0796 | ^{k}(410007D0): MOV R1, R0, 7D0H |

0797 | ^{l}(82E00004): LDR R2, SP, 4H |

END_{m} Init; | |

0798 | ^{m}(F7FFFEE8): BL -280 [0681H] |

0799 | ^{m}(8FE00000): LDR LNK, SP, 0H |

079A | ^{m}(4EE81F48): ADD SP, SP, 1F48H |

079B | ^{m}(C700000F): B LNK |

END_{n} FileDir._{o} | |

079C | ^{n} .PROC 0 |

079C | ^{n} .ENTRYPOINT |

079C | ^{n}(4EE90004): SUB SP, SP, 4H |

079D | ^{n}(AFE00000): STR LNK, SP, 0H |

079E | ^{o}(8FE00000): LDR LNK, SP, 0H |

079F | ^{o}(4EE80004): ADD SP, SP, 4H |

07A0 | ^{o}(C700000F): B LNK |