Tools

Used Exports

BUILTINS: CHAR DEC INC INTEGER LONGINT NEW
Display: FrameDesc.H FrameDesc.X FrameDesc.Y FrameDesc.handle
Files: File New Old ReadInt Register Rider Rider.eof Set Write
Kernel: GetSector
MenuViewers: New Viewer
Oberon: AllocateUserViewer GetSelection Log Par Par.pos Par.text
SYSTEM: GET H
TextFrames: NewMenu NewText Text menuH
Texts: Append Buffer Delete Int Name OpenBuf OpenReader OpenScanner OpenWriter Read Reader Reader.eot Scan Scanner Scanner.class Scanner.i Scanner.s Text TextDesc.len Write WriteHex WriteInt WriteLn WriteString Writer Writer.buf
Viewers: Open ViewerDesc.state ViewerMsg ViewerMsg.id restore

MODULE Tools; (*NW 22.2.2014*)
.MODULE Tools (KEY 63A7C0B2, VERSION 1, SIZE 00000A84)
.IMPORT Kernel (KEY 97E012DD)
.IMPORT Files (KEY 73F5D686)
.IMPORT Modules (KEY 41C6A19A)
.IMPORT Input (KEY 5DE391A8)
.IMPORT Texts (KEY 0B9E9984)
.IMPORT Fonts (KEY F4C9F557)
.IMPORT Viewers (KEY 25ABF199)
.IMPORT Display (KEY 4C08D3EA)
.IMPORT MenuViewers (KEY 245ACC30)
.IMPORT TextFrames (KEY 650813D5)
.IMPORT Oberon (KEY A89CCEE2)
.DATA 30H
.STRING 30H "System.Close System.Copy System.Grow Edit.Search Edit.Store"
.STRING 70H "Sector "
.STRING 78H " not found"
.STRING 84H "converting to "
.STRING 94H " done"
.STRING 9CH " not found"
.STRING A8H ""
.STRING ACH "Tools.Text"
.POINTER_REFERENCES 0H 4H 8H CH 2CH 20H
.FIXUP T 0H
IMPORT SYSTEM, Kernel, Files, Modules, Input, Texts, Viewers, MenuViewers, TextFrames, Oberon;
VAR T: Texts.Text; V: MenuViewers.Viewer; W: Texts.Writer;
PROCEDURE OpenViewer(T: Texts.Text; title: ARRAY OF CHAR);
VAR X, Y: INTEGER;
BEGINa
0000a(4EE90018): SUB SP, SP, 18H
0001a(AFE00000): STR LNK, SP, 0H
0002a(A0E00004): STR R0, SP, 4H
0003a(A1E00008): STR R1, SP, 8H
0004a(A2E0000C): STR R2, SP, CH
Oberon.AllocateUserViewer(0,b X,c Y)d;e
0005b(40000000): MOV R0, R0, 0H
0006c(41E80010): ADD R1, SP, 10H
0007d(42E80014): ADD R2, SP, 14H
0008e .FIXUP P
0008e(F7B22008): BL MOD11 [Oberon] PROC34
V := MenuViewers.New(
TextFrames.NewMenu(title,f "System.Close System.Copy System.Grow Edit.Search Edit.Store")g,h
0009f(80E00008): LDR R0, SP, 8H
000Af(81E0000C): LDR R1, SP, CH
000Bg .FIXUP D
000Bg(8D00000B): LDR SB, MT, MOD0 [Tools]
000Cg(42D80030): ADD R2, SB, 30H ["System.Close System.Copy System.Grow Edit.Search Edit.Store"]
000Dg(43000040): MOV R3, R0, 40H
000Eh .FIXUP P
000Eh(F7A2C006): BL MOD10 [TextFrames] PROC44
TextFrames.NewText(Ti,j 0)k,l TextFrames.menuH,m X,n Y)o
000Fi(4EE90004): SUB SP, SP, 4H
0010i(A0E00000): STR R0, SP, 0H
0011j(80E00008): LDR R0, SP, 8H
0012k(41000000): MOV R1, R0, 0H
0013l .FIXUP P
0013l(F7A2D005): BL MOD10 [TextFrames] PROC45
0014l(01000000): MOV R1, R0, R0
0015l(80E00000): LDR R0, SP, 0H
0016l(4EE80004): ADD SP, SP, 4H
0017m .FIXUP D
0017m(8DA0000C): LDR SB, MT, MOD10 [TextFrames]
0018m(82D00005): LDR R2, SB, VAR5
0019n(83E00010): LDR R3, SP, 10H
001Ao(84E00014): LDR R4, SP, 14H
ENDp OpenViewer;
001Bp .FIXUP P
001Bp(F7904008): BL MOD9 [MenuViewers] PROC4
001Cp .FIXUP D
001Cp(8D000005): LDR SB, MT, MOD0 [Tools]
001Dp(A0D00004): STR R0, SB, 4H [data]
001Ep(8FE00000): LDR LNK, SP, 0H
001Fp(4EE80018): ADD SP, SP, 18H
0020p(C700000F): B LNK
PROCEDURE Clear*; (*used to clear output*)
VAR buf: Texts.Buffer;
BEGINq NEW(buf);r Texts.OpenBuf(buf)s;t Texts.Delete(T,u 0,v T.lenw,x buf)y
0021q .PROC 1
0021q .COMMAND Clear
0021q(4EE90008): SUB SP, SP, 8H
0022q(AFE00000): STR LNK, SP, 0H
0023r(40E80004): ADD R0, SP, 4H
0024r .FIXUP D
0024r(8D500008): LDR SB, MT, MOD5 [Texts]
0025r(41D80004): ADD R1, SB, VAR4
0026r(D7026C0C): BL MT [trap=0, pos=620]
0027s(80E00004): LDR R0, SP, 4H
0028t .FIXUP P
0028t(F750A00D): BL MOD5 [Texts] PROC10
0029u .FIXUP D
0029u(8D000005): LDR SB, MT, MOD0 [Tools]
002Au(80D00000): LDR R0, SB, 0H [data]
002Bv(41000000): MOV R1, R0, 0H
002Cw(82D00000): LDR R2, SB, 0H
002Dw(D102994C): BLEQ MT [trap=4, pos=665]
002Ex(82200000): LDR R2, R2, 0H
002Fy(83E00004): LDR R3, SP, 4H
ENDz Clear;
0030z .FIXUP P
0030z(F750F008): BL MOD5 [Texts] PROC15
0031z(8FE00000): LDR LNK, SP, 0H
0032z(4EE80008): ADD SP, SP, 8H
0033z(C700000F): B LNK
PROCEDURE Recall*;
VAR M: Viewers.ViewerMsg;
BEGINa
0034a .PROC 2
0034a .COMMAND Recall
0034a(4EE9001C): SUB SP, SP, 1CH
0035a(AFE00000): STR LNK, SP, 0H
IF (V # NIL)b & (cV.stated = 0)e THENf
0036b .FIXUP D
0036b(8D00000D): LDR SB, MT, MOD0 [Tools]
0037b(80D00004): LDR R0, SB, 4H [data]
0038c(E1000022): BEQ 34 [005BH]
0039d .FIXUP D
0039d(8D000003): LDR SB, MT, MOD0 [Tools]
003Ad(80D00004): LDR R0, SB, 4H [data]
003Bd(D103044C): BLEQ MT [trap=4, pos=772]
003Ce(8000001C): LDR R0, R0, 1CH
003Df(E900001D): BNE 29 [005BH]
Viewers.Open(V,g V.Xh,i V.Yj + V.Hk)l;m M.id := Viewers.restore;n V.handleo(Vp,q M)r
003Eg .FIXUP D
003Eg(8D000005): LDR SB, MT, MOD0 [Tools]
003Fg(80D00004): LDR R0, SB, 4H [data]
0040h(81D00004): LDR R1, SB, 4H
0041h(D103284C): BLEQ MT [trap=4, pos=808]
0042i(81100008): LDR R1, R1, 8H
0043j(82D00004): LDR R2, SB, 4H
0044j(D1032D4C): BLEQ MT [trap=4, pos=813]
0045k(83D00004): LDR R3, SB, 4H
0046k(D103334C): BLEQ MT [trap=4, pos=819]
0047l(8220000C): LDR R2, R2, CH
0048l(83300014): LDR R3, R3, 14H
0049l(02280003): ADD R2, R2, R3
004Am .FIXUP P
004Am(F770501A): BL MOD7 [Viewers] PROC5
004Bn(40000000): MOV R0, R0, 0H
004Cn(A0E00004): STR R0, SP, 4H
004Do .FIXUP D
004Do(8D00000F): LDR SB, MT, MOD0 [Tools]
004Eo(80D00004): LDR R0, SB, 4H [data]
004Fo(D103574C): BLEQ MT [trap=4, pos=855]
0050p(80000018): LDR R0, R0, 18H
0051p(4EE90004): SUB SP, SP, 4H
0052p(A0E00000): STR R0, SP, 0H
0053q(80D00004): LDR R0, SB, 4H
0054r(41E80008): ADD R1, SP, 8H
0055r .FIXUP D
0055r(8D700008): LDR SB, MT, MOD7 [Viewers]
0056r(42D80002): ADD R2, SB, VAR2
ENDs
0057s(83E00000): LDR R3, SP, 0H
0058s(4EE80004): ADD SP, SP, 4H
0059s(D103655C): BLEQ MT [trap=5, pos=869]
005As(D7000003): BL R3
ENDt Recall;
005Bt(8FE00000): LDR LNK, SP, 0H
005Ct(4EE8001C): ADD SP, SP, 1CH
005Dt(C700000F): B LNK
PROCEDURE Inspect*;
VAR m, n, adr, data: INTEGER;
S: Texts.Scanner;
BEGINu Texts.OpenScanner(S,v Oberon.Par.text,w Oberon.Par.pos)x;y Texts.Scan(S)z;a
005Eu .PROC 3
005Eu .COMMAND Inspect
005Eu(4EE90088): SUB SP, SP, 88H
005Fu(AFE00000): STR LNK, SP, 0H
0060v(40E80014): ADD R0, SP, 14H
0061v .FIXUP D
0061v(8D50000C): LDR SB, MT, MOD5 [Texts]
0062v(41D80003): ADD R1, SB, VAR3
0063w .FIXUP D
0063w(8DB00002): LDR SB, MT, MOD11 [Oberon]
0064w(42D8000E): ADD R2, SB, VAR14
0065w(82200008): LDR R2, R2, 8H
0066x .FIXUP D
0066x(8DB00003): LDR SB, MT, MOD11 [Oberon]
0067x(43D8000E): ADD R3, SB, VAR14
0068x(8330000C): LDR R3, R3, CH
0069y .FIXUP P
0069y(F751501F): BL MOD5 [Texts] PROC21
006Az(40E80014): ADD R0, SP, 14H
006Bz .FIXUP D
006Bz(8D500005): LDR SB, MT, MOD5 [Texts]
006Cz(41D80003): ADD R1, SB, VAR3
006Da .FIXUP P
006Da(F7516004): BL MOD5 [Texts] PROC22
IF S.class = Texts.Int THENb
006Eb(80E00050): LDR R0, SP, 50H
006Fb(40090003): SUB R0, R0, 3H
0070b(E9000042): BNE 66 [00B3H]
adr := S.i DIV 20H *c 20H;d Texts.Scan(S)e;f
0071c(80E00054): LDR R0, SP, 54H
0072c(40020005): ASR R0, R0, 5H
0073d(40010005): LSL R0, R0, 5H
0074d(A0E0000C): STR R0, SP, CH
0075e(40E80014): ADD R0, SP, 14H
0076e .FIXUP D
0076e(8D50000B): LDR SB, MT, MOD5 [Texts]
0077e(41D80003): ADD R1, SB, VAR3
0078f .FIXUP P
0078f(F751600B): BL MOD5 [Texts] PROC22
IF S.class = Texts.Int THENg n := S.i ELSEh ni := 8 ENDj ;
0079g(80E00050): LDR R0, SP, 50H
007Ag(40090003): SUB R0, R0, 3H
007Bg(E9000003): BNE 3 [007FH]
007Ch(80E00054): LDR R0, SP, 54H
007Dh(A0E00008): STR R0, SP, 8H
007Ei(E7000002): B 2 [0081H]
007Fj(40000008): MOV R0, R0, 8H
0080j(A0E00008): STR R0, SP, 8H
REPEAT DEC(n);k Texts.WriteLn(W)l;m Texts.WriteHex(W,n adr)o;p Texts.Write(W,q 9X)r;s m := 8;t
0081k(80E00008): LDR R0, SP, 8H
0082k(40090001): SUB R0, R0, 1H
0083k(A0E00008): STR R0, SP, 8H
0084l .FIXUP D
0084l(8D00000E): LDR SB, MT, MOD0 [Tools]
0085l(40D80008): ADD R0, SB, 8H [data]
0086l .FIXUP D
0086l(8D500002): LDR SB, MT, MOD5 [Texts]
0087l(41D80005): ADD R1, SB, VAR5
0088m .FIXUP P
0088m(F751C010): BL MOD5 [Texts] PROC28
0089n .FIXUP D
0089n(8D000003): LDR SB, MT, MOD0 [Tools]
008An(40D80008): ADD R0, SB, 8H [data]
008Bn .FIXUP D
008Bn(8D500002): LDR SB, MT, MOD5 [Texts]
008Cn(41D80005): ADD R1, SB, VAR5
008Do(82E0000C): LDR R2, SP, CH
008Ep .FIXUP P
008Ep(F751F006): BL MOD5 [Texts] PROC31
008Fq .FIXUP D
008Fq(8D000004): LDR SB, MT, MOD0 [Tools]
0090q(40D80008): ADD R0, SB, 8H [data]
0091q .FIXUP D
0091q(8D500002): LDR SB, MT, MOD5 [Texts]
0092q(41D80005): ADD R1, SB, VAR5
0093r(42000009): MOV R2, R0, 9H
0094s .FIXUP P
0094s(F751B006): BL MOD5 [Texts] PROC27
0095t(40000008): MOV R0, R0, 8H
0096t(A0E00004): STR R0, SP, 4H
REPEAT SYSTEM.GET(adr, data);u INC(adr, 4);v Texts.WriteHex(W,w data)x;y DEC(m)
0097u(80E0000C): LDR R0, SP, CH
0098u(80000000): LDR R0, R0, 0H
0099u(A0E00010): STR R0, SP, 10H
009Av(80E0000C): LDR R0, SP, CH
009Bv(40080004): ADD R0, R0, 4H
009Cv(A0E0000C): STR R0, SP, CH
009Dw .FIXUP D
009Dw(8D00000C): LDR SB, MT, MOD0 [Tools]
009Ew(40D80008): ADD R0, SB, 8H [data]
009Fw .FIXUP D
009Fw(8D500002): LDR SB, MT, MOD5 [Texts]
00A0w(41D80005): ADD R1, SB, VAR5
00A1x(82E00010): LDR R2, SP, 10H
00A2y .FIXUP P
00A2y(F751F00E): BL MOD5 [Texts] PROC31
UNTILz m = 0
00A3z(80E00004): LDR R0, SP, 4H
00A4z(40090001): SUB R0, R0, 1H
00A5z(A0E00004): STR R0, SP, 4H
UNTILa n = 0;b
00A6a(80E00004): LDR R0, SP, 4H
00A7a(E9FFFFEF): BNE -17 [0097H]
00A8b(80E00008): LDR R0, SP, 8H
00A9b(E9FFFFD7): BNE -41 [0081H]
Texts.WriteLn(W)c;d Texts.Append(T,e W.buf)f
00AAc .FIXUP D
00AAc(8D00000B): LDR SB, MT, MOD0 [Tools]
00ABc(40D80008): ADD R0, SB, 8H [data]
00ACc .FIXUP D
00ACc(8D500002): LDR SB, MT, MOD5 [Texts]
00ADc(41D80005): ADD R1, SB, VAR5
00AEd .FIXUP P
00AEd(F751C00C): BL MOD5 [Texts] PROC28
00AFe .FIXUP D
00AFe(8D000003): LDR SB, MT, MOD0 [Tools]
00B0e(80D00000): LDR R0, SB, 0H [data]
00B1f(81D00008): LDR R1, SB, 8H
ENDg
00B2g .FIXUP P
00B2g(F750E004): BL MOD5 [Texts] PROC14
ENDh Inspect;
00B3h(8FE00000): LDR LNK, SP, 0H
00B4h(4EE80088): ADD SP, SP, 88H
00B5h(C700000F): B LNK
PROCEDURE Sector*;
VAR k, m, n, secno: INTEGER;
S: Texts.Scanner;
buf: ARRAY 256 OF INTEGER;
BEGINi Texts.OpenScanner(S,j Oberon.Par.text,k Oberon.Par.pos)l;m Texts.Scan(S)n;o
00B6i .PROC 4
00B6i .COMMAND Sector
00B6i(4EE90488): SUB SP, SP, 488H
00B7i(AFE00000): STR LNK, SP, 0H
00B8j(40E80014): ADD R0, SP, 14H
00B9j .FIXUP D
00B9j(8D50000A): LDR SB, MT, MOD5 [Texts]
00BAj(41D80003): ADD R1, SB, VAR3
00BBk .FIXUP D
00BBk(8DB00002): LDR SB, MT, MOD11 [Oberon]
00BCk(42D8000E): ADD R2, SB, VAR14
00BDk(82200008): LDR R2, R2, 8H
00BEl .FIXUP D
00BEl(8DB00003): LDR SB, MT, MOD11 [Oberon]
00BFl(43D8000E): ADD R3, SB, VAR14
00C0l(8330000C): LDR R3, R3, CH
00C1m .FIXUP P
00C1m(F751500F): BL MOD5 [Texts] PROC21
00C2n(40E80014): ADD R0, SP, 14H
00C3n .FIXUP D
00C3n(8D500005): LDR SB, MT, MOD5 [Texts]
00C4n(41D80003): ADD R1, SB, VAR3
00C5o .FIXUP P
00C5o(F7516004): BL MOD5 [Texts] PROC22
IF S.class = Texts.Int THENp
00C6p(80E00050): LDR R0, SP, 50H
00C7p(40090003): SUB R0, R0, 3H
00C8p(E9000058): BNE 88 [0121H]
secno := S.i;q Texts.Scan(S)r;s
00C9q(80E00054): LDR R0, SP, 54H
00CAq(A0E00010): STR R0, SP, 10H
00CBr(40E80014): ADD R0, SP, 14H
00CCr .FIXUP D
00CCr(8D500009): LDR SB, MT, MOD5 [Texts]
00CDr(41D80003): ADD R1, SB, VAR3
00CEs .FIXUP P
00CEs(F7516009): BL MOD5 [Texts] PROC22
IF S.class = Texts.Int THENt n := S.i ELSEu nv := 8 ENDw ;
00CFt(80E00050): LDR R0, SP, 50H
00D0t(40090003): SUB R0, R0, 3H
00D1t(E9000003): BNE 3 [00D5H]
00D2u(80E00054): LDR R0, SP, 54H
00D3u(A0E0000C): STR R0, SP, CH
00D4v(E7000002): B 2 [00D7H]
00D5w(40000008): MOV R0, R0, 8H
00D6w(A0E0000C): STR R0, SP, CH
Kernel.GetSector(secno*29,x buf)y;z Texts.WriteString(W,a "Sector ")b;c Texts.WriteInt(W,d S.i,e 4)f;g
00D7x(80E00010): LDR R0, SP, 10H
00D8x(400A001D): MUL R0, R0, 1DH
00D9y(41E80088): ADD R1, SP, 88H
00DAz .FIXUP P
00DAz(F710F00C): BL MOD1 [Kernel] PROC15
00DBa .FIXUP D
00DBa(8D00000F): LDR SB, MT, MOD0 [Tools]
00DCa(40D80008): ADD R0, SB, 8H [data]
00DDa .FIXUP D
00DDa(8D500002): LDR SB, MT, MOD5 [Texts]
00DEa(41D80005): ADD R1, SB, VAR5
00DFb .FIXUP D
00DFb(8D000002): LDR SB, MT, MOD0 [Tools]
00E0b(42D80070): ADD R2, SB, 70H ["Sector "]
00E1b(43000008): MOV R3, R0, 8H
00E2c .FIXUP P
00E2c(F751D008): BL MOD5 [Texts] PROC29
00E3d .FIXUP D
00E3d(8D000004): LDR SB, MT, MOD0 [Tools]
00E4d(40D80008): ADD R0, SB, 8H [data]
00E5d .FIXUP D
00E5d(8D500002): LDR SB, MT, MOD5 [Texts]
00E6d(41D80005): ADD R1, SB, VAR5
00E7e(82E00054): LDR R2, SP, 54H
00E8f(43000004): MOV R3, R0, 4H
00E9g .FIXUP P
00E9g(F751E007): BL MOD5 [Texts] PROC30
k := 0;h
00EAh(40000000): MOV R0, R0, 0H
00EBh(A0E00004): STR R0, SP, 4H
REPEAT DEC(n);i m := 8;j Texts.WriteLn(W)k;l Texts.WriteHex(W,m k*4)n;o Texts.Write(W,p 9X)q;r
00ECi(80E0000C): LDR R0, SP, CH
00EDi(40090001): SUB R0, R0, 1H
00EEi(A0E0000C): STR R0, SP, CH
00EFj(40000008): MOV R0, R0, 8H
00F0j(A0E00008): STR R0, SP, 8H
00F1k .FIXUP D
00F1k(8D00000C): LDR SB, MT, MOD0 [Tools]
00F2k(40D80008): ADD R0, SB, 8H [data]
00F3k .FIXUP D
00F3k(8D500002): LDR SB, MT, MOD5 [Texts]
00F4k(41D80005): ADD R1, SB, VAR5
00F5l .FIXUP P
00F5l(F751C00C): BL MOD5 [Texts] PROC28
00F6m .FIXUP D
00F6m(8D000003): LDR SB, MT, MOD0 [Tools]
00F7m(40D80008): ADD R0, SB, 8H [data]
00F8m .FIXUP D
00F8m(8D500002): LDR SB, MT, MOD5 [Texts]
00F9m(41D80005): ADD R1, SB, VAR5
00FAn(82E00004): LDR R2, SP, 4H
00FBn(42210002): LSL R2, R2, 2H
00FCo .FIXUP P
00FCo(F751F007): BL MOD5 [Texts] PROC31
00FDp .FIXUP D
00FDp(8D000005): LDR SB, MT, MOD0 [Tools]
00FEp(40D80008): ADD R0, SB, 8H [data]
00FFp .FIXUP D
00FFp(8D500002): LDR SB, MT, MOD5 [Texts]
0100p(41D80005): ADD R1, SB, VAR5
0101q(42000009): MOV R2, R0, 9H
0102r .FIXUP P
0102r(F751B006): BL MOD5 [Texts] PROC27
REPEAT Texts.WriteHex(W,s buf[k]t)u;v INC(k);w DEC(m) UNTILx m = 0;y
0103s .FIXUP D
0103s(8D000004): LDR SB, MT, MOD0 [Tools]
0104s(40D80008): ADD R0, SB, 8H [data]
0105s .FIXUP D
0105s(8D500002): LDR SB, MT, MOD5 [Texts]
0106s(41D80005): ADD R1, SB, VAR5
0107t(82E00004): LDR R2, SP, 4H
0108t(43290100): SUB R3, R2, 100H
0109t(DA07EB1C): BLCC MT [trap=1, pos=2027]
010At(42210002): LSL R2, R2, 2H
010Bt(02E80002): ADD R2, SP, R2
010Cu(82200088): LDR R2, R2, 88H
010Dv .FIXUP P
010Dv(F751F00B): BL MOD5 [Texts] PROC31
010Ew(80E00004): LDR R0, SP, 4H
010Fw(40080001): ADD R0, R0, 1H
0110w(A0E00004): STR R0, SP, 4H
0111x(80E00008): LDR R0, SP, 8H
0112x(40090001): SUB R0, R0, 1H
0113x(A0E00008): STR R0, SP, 8H
0114y(80E00008): LDR R0, SP, 8H
0115y(E9FFFFED): BNE -19 [0103H]
UNTIL n = 0;z
0116z(80E0000C): LDR R0, SP, CH
0117z(E9FFFFD4): BNE -44 [00ECH]
Texts.WriteLn(W)a;b Texts.Append(T,c W.buf)d
0118a .FIXUP D
0118a(8D000013): LDR SB, MT, MOD0 [Tools]
0119a(40D80008): ADD R0, SB, 8H [data]
011Aa .FIXUP D
011Aa(8D500002): LDR SB, MT, MOD5 [Texts]
011Ba(41D80005): ADD R1, SB, VAR5
011Cb .FIXUP P
011Cb(F751C00F): BL MOD5 [Texts] PROC28
011Dc .FIXUP D
011Dc(8D000003): LDR SB, MT, MOD0 [Tools]
011Ec(80D00000): LDR R0, SB, 0H [data]
011Fd(81D00008): LDR R1, SB, 8H
ENDe
0120e .FIXUP P
0120e(F750E004): BL MOD5 [Texts] PROC14
ENDf Sector;
0121f(8FE00000): LDR LNK, SP, 0H
0122f(4EE80488): ADD SP, SP, 488H
0123f(C700000F): B LNK
PROCEDURE ShowFile*;
VAR x, n: INTEGER;
F: Files.File; R: Files.Rider;
S: Texts.Scanner;
BEGINg Texts.OpenScanner(S,h Oberon.Par.text,i Oberon.Par.pos)j;k Texts.Scan(S)l;m
0124g .PROC 5
0124g .COMMAND ShowFile
0124g(4EE9009C): SUB SP, SP, 9CH
0125g(AFE00000): STR LNK, SP, 0H
0126h(40E80028): ADD R0, SP, 28H
0127h .FIXUP D
0127h(8D50000A): LDR SB, MT, MOD5 [Texts]
0128h(41D80003): ADD R1, SB, VAR3
0129i .FIXUP D
0129i(8DB00002): LDR SB, MT, MOD11 [Oberon]
012Ai(42D8000E): ADD R2, SB, VAR14
012Bi(82200008): LDR R2, R2, 8H
012Cj .FIXUP D
012Cj(8DB00003): LDR SB, MT, MOD11 [Oberon]
012Dj(43D8000E): ADD R3, SB, VAR14
012Ej(8330000C): LDR R3, R3, CH
012Fk .FIXUP P
012Fk(F751500F): BL MOD5 [Texts] PROC21
0130l(40E80028): ADD R0, SP, 28H
0131l .FIXUP D
0131l(8D500005): LDR SB, MT, MOD5 [Texts]
0132l(41D80003): ADD R1, SB, VAR3
0133m .FIXUP P
0133m(F7516004): BL MOD5 [Texts] PROC22
IF S.class = Texts.Name THENn
0134n(80E00064): LDR R0, SP, 64H
0135n(40090001): SUB R0, R0, 1H
0136n(E9000058): BNE 88 [018FH]
Texts.WriteString(W,o S.s)p;q F := Files.Old(S.s)r;s
0137o .FIXUP D
0137o(8D000006): LDR SB, MT, MOD0 [Tools]
0138o(40D80008): ADD R0, SB, 8H [data]
0139o .FIXUP D
0139o(8D500002): LDR SB, MT, MOD5 [Texts]
013Ao(41D80005): ADD R1, SB, VAR5
013Bp(42E8007C): ADD R2, SP, 7CH
013Cp(43000020): MOV R3, R0, 20H
013Dq .FIXUP P
013Dq(F751D00A): BL MOD5 [Texts] PROC29
013Er(40E8007C): ADD R0, SP, 7CH
013Fr(41000020): MOV R1, R0, 20H
0140s .FIXUP P
0140s(F7202003): BL MOD2 [Files] PROC2
0141s(A0E0000C): STR R0, SP, CH
IF F # NIL THENt
0142t(80E0000C): LDR R0, SP, CH
0143t(E100003A): BEQ 58 [017EH]
n := 0;u Files.Set(R,v F,w 0)x;y Files.ReadInt(R,z x)a;b
0144u(40000000): MOV R0, R0, 0H
0145u(A0E00008): STR R0, SP, 8H
0146v(40E80010): ADD R0, SP, 10H
0147v .FIXUP D
0147v(8D20000E): LDR SB, MT, MOD2 [Files]
0148v(41D80001): ADD R1, SB, VAR1
0149w(82E0000C): LDR R2, SP, CH
014Ax(43000000): MOV R3, R0, 0H
014By .FIXUP P
014By(F720B00B): BL MOD2 [Files] PROC11
014Cz(40E80010): ADD R0, SP, 10H
014Dz .FIXUP D
014Dz(8D200006): LDR SB, MT, MOD2 [Files]
014Ez(41D80001): ADD R1, SB, VAR1
014Fa(42E80004): ADD R2, SP, 4H
0150b .FIXUP P
0150b(F7211005): BL MOD2 [Files] PROC17
WHILE ~R.eof DOc
0151c(90E00010): LDR R0, SP, 10H
0152c(E9000024): BNE 36 [0177H]
IF n MOD 20H =d 0 THENe Texts.WriteLn(W)f;g Texts.WriteHex(W,h n)i;j Texts.Write(W,k 9X)l ENDm ;
0153d(80E00008): LDR R0, SP, 8H
0154d(4004001F): AND R0, R0, 1FH
0155e(40090000): SUB R0, R0, 0H
0156e(E9000011): BNE 17 [0168H]
0157f .FIXUP D
0157f(8D00000A): LDR SB, MT, MOD0 [Tools]
0158f(40D80008): ADD R0, SB, 8H [data]
0159f .FIXUP D
0159f(8D500002): LDR SB, MT, MOD5 [Texts]
015Af(41D80005): ADD R1, SB, VAR5
015Bg .FIXUP P
015Bg(F751C00B): BL MOD5 [Texts] PROC28
015Ch .FIXUP D
015Ch(8D000003): LDR SB, MT, MOD0 [Tools]
015Dh(40D80008): ADD R0, SB, 8H [data]
015Eh .FIXUP D
015Eh(8D500002): LDR SB, MT, MOD5 [Texts]
015Fh(41D80005): ADD R1, SB, VAR5
0160i(82E00008): LDR R2, SP, 8H
0161j .FIXUP P
0161j(F751F006): BL MOD5 [Texts] PROC31
0162k .FIXUP D
0162k(8D000004): LDR SB, MT, MOD0 [Tools]
0163k(40D80008): ADD R0, SB, 8H [data]
0164k .FIXUP D
0164k(8D500002): LDR SB, MT, MOD5 [Texts]
0165k(41D80005): ADD R1, SB, VAR5
0166l(42000009): MOV R2, R0, 9H
0167m .FIXUP P
0167m(F751B006): BL MOD5 [Texts] PROC27
Texts.WriteHex(W,n x)o;p INC(n, 4);q Files.ReadInt(R,r x)s
0168n .FIXUP D
0168n(8D000004): LDR SB, MT, MOD0 [Tools]
0169n(40D80008): ADD R0, SB, 8H [data]
016An .FIXUP D
016An(8D500002): LDR SB, MT, MOD5 [Texts]
016Bn(41D80005): ADD R1, SB, VAR5
016Co(82E00004): LDR R2, SP, 4H
016Dp .FIXUP P
016Dp(F751F006): BL MOD5 [Texts] PROC31
016Eq(80E00008): LDR R0, SP, 8H
016Fq(40080004): ADD R0, R0, 4H
0170q(A0E00008): STR R0, SP, 8H
0171r(40E80010): ADD R0, SP, 10H
0172r .FIXUP D
0172r(8D200008): LDR SB, MT, MOD2 [Files]
0173r(41D80001): ADD R1, SB, VAR1
0174s(42E80004): ADD R2, SP, 4H
ENDt ;
0175t .FIXUP P
0175t(F7211008): BL MOD2 [Files] PROC17
0176t(E7FFFFDA): B -38 [0151H]
Texts.WriteHex(W,u x)v
0177u .FIXUP D
0177u(8D000005): LDR SB, MT, MOD0 [Tools]
0178u(40D80008): ADD R0, SB, 8H [data]
0179u .FIXUP D
0179u(8D500002): LDR SB, MT, MOD5 [Texts]
017Au(41D80005): ADD R1, SB, VAR5
017Bv(82E00004): LDR R2, SP, 4H
ELSEw Textsx.WriteString(W,y " not found")z
017Cw .FIXUP P
017Cw(F751F007): BL MOD5 [Texts] PROC31
017Dx(E7000008): B 8 [0186H]
017Ey .FIXUP D
017Ey(8D000005): LDR SB, MT, MOD0 [Tools]
017Fy(40D80008): ADD R0, SB, 8H [data]
0180y .FIXUP D
0180y(8D500002): LDR SB, MT, MOD5 [Texts]
0181y(41D80005): ADD R1, SB, VAR5
0182z .FIXUP D
0182z(8D000002): LDR SB, MT, MOD0 [Tools]
0183z(42D80078): ADD R2, SB, 78H [" not found"]
0184z(4300000B): MOV R3, R0, BH
ENDa ;
0185a .FIXUP P
0185a(F751D009): BL MOD5 [Texts] PROC29
Texts.WriteLn(W)b;c Texts.Append(T,d W.buf)e
0186b .FIXUP D
0186b(8D000004): LDR SB, MT, MOD0 [Tools]
0187b(40D80008): ADD R0, SB, 8H [data]
0188b .FIXUP D
0188b(8D500002): LDR SB, MT, MOD5 [Texts]
0189b(41D80005): ADD R1, SB, VAR5
018Ac .FIXUP P
018Ac(F751C005): BL MOD5 [Texts] PROC28
018Bd .FIXUP D
018Bd(8D000003): LDR SB, MT, MOD0 [Tools]
018Cd(80D00000): LDR R0, SB, 0H [data]
018De(81D00008): LDR R1, SB, 8H
ENDf
018Ef .FIXUP P
018Ef(F750E004): BL MOD5 [Texts] PROC14
ENDg ShowFile;
018Fg(8FE00000): LDR LNK, SP, 0H
0190g(4EE8009C): ADD SP, SP, 9CH
0191g(C700000F): B LNK
PROCEDURE Convert*; (*convert selected text to txt-format*)
VAR beg, end, time: LONGINT
; ch: CHAR;
T: Texts.Text; R: Texts.Reader; (*input*)
F: Files.File; Q: Files.Rider; (*output*)
S: Texts.Scanner;
BEGINh Oberon.GetSelection(T,i beg,j end,k time)l;m
0192h .PROC 6
0192h .COMMAND Convert
0192h(4EE900DC): SUB SP, SP, DCH
0193h(AFE00000): STR LNK, SP, 0H
0194i(40E80014): ADD R0, SP, 14H
0195j(41E80004): ADD R1, SP, 4H
0196k(42E80008): ADD R2, SP, 8H
0197l(43E8000C): ADD R3, SP, CH
0198m .FIXUP P
0198m(F7B2900A): BL MOD11 [Oberon] PROC41
IF time >= 0 THENn
0199n(80E0000C): LDR R0, SP, CH
019An(40090000): SUB R0, R0, 0H
019Bn(E5000066): BLT 102 [0202H]
Texts.OpenScanner(S,o Oberon.Par.text,p Oberon.Par.pos)q;r Texts.Scan(S)s;t
019Co(40E80068): ADD R0, SP, 68H
019Do .FIXUP D
019Do(8D500012): LDR SB, MT, MOD5 [Texts]
019Eo(41D80003): ADD R1, SB, VAR3
019Fp .FIXUP D
019Fp(8DB00002): LDR SB, MT, MOD11 [Oberon]
01A0p(42D8000E): ADD R2, SB, VAR14
01A1p(82200008): LDR R2, R2, 8H
01A2q .FIXUP D
01A2q(8DB00003): LDR SB, MT, MOD11 [Oberon]
01A3q(43D8000E): ADD R3, SB, VAR14
01A4q(8330000C): LDR R3, R3, CH
01A5r .FIXUP P
01A5r(F751500D): BL MOD5 [Texts] PROC21
01A6s(40E80068): ADD R0, SP, 68H
01A7s .FIXUP D
01A7s(8D500005): LDR SB, MT, MOD5 [Texts]
01A8s(41D80003): ADD R1, SB, VAR3
01A9t .FIXUP P
01A9t(F7516004): BL MOD5 [Texts] PROC22
Texts.WriteString(W,u "converting to ")v;w Texts.WriteString(W,x S.s)y;z
01AAu .FIXUP D
01AAu(8D000003): LDR SB, MT, MOD0 [Tools]
01ABu(40D80008): ADD R0, SB, 8H [data]
01ACu .FIXUP D
01ACu(8D500002): LDR SB, MT, MOD5 [Texts]
01ADu(41D80005): ADD R1, SB, VAR5
01AEv .FIXUP D
01AEv(8D000002): LDR SB, MT, MOD0 [Tools]
01AFv(42D80084): ADD R2, SB, 84H ["converting to "]
01B0v(4300000F): MOV R3, R0, FH
01B1w .FIXUP P
01B1w(F751D008): BL MOD5 [Texts] PROC29
01B2x .FIXUP D
01B2x(8D000004): LDR SB, MT, MOD0 [Tools]
01B3x(40D80008): ADD R0, SB, 8H [data]
01B4x .FIXUP D
01B4x(8D500002): LDR SB, MT, MOD5 [Texts]
01B5x(41D80005): ADD R1, SB, VAR5
01B6y(42E800BC): ADD R2, SP, BCH
01B7y(43000020): MOV R3, R0, 20H
01B8z .FIXUP P
01B8z(F751D007): BL MOD5 [Texts] PROC29
F := Files.New(S.s)a;b Files.Set(Q,c F,d 0)e;f Texts.OpenReader(R,g T,h beg)i;j Texts.Read(R,k ch)l;m
01B9a(40E800BC): ADD R0, SP, BCH
01BAa(41000020): MOV R1, R0, 20H
01BBb .FIXUP P
01BBb(F7203003): BL MOD2 [Files] PROC3
01BCb(A0E0004C): STR R0, SP, 4CH
01BDc(40E80050): ADD R0, SP, 50H
01BEc .FIXUP D
01BEc(8D20000A): LDR SB, MT, MOD2 [Files]
01BFc(41D80001): ADD R1, SB, VAR1
01C0d(82E0004C): LDR R2, SP, 4CH
01C1e(43000000): MOV R3, R0, 0H
01C2f .FIXUP P
01C2f(F720B007): BL MOD2 [Files] PROC11
01C3g(40E80018): ADD R0, SP, 18H
01C4g .FIXUP D
01C4g(8D500006): LDR SB, MT, MOD5 [Texts]
01C5g(41D80002): ADD R1, SB, VAR2
01C6h(82E00014): LDR R2, SP, 14H
01C7i(83E00004): LDR R3, SP, 4H
01C8j .FIXUP P
01C8j(F7512006): BL MOD5 [Texts] PROC18
01C9k(40E80018): ADD R0, SP, 18H
01CAk .FIXUP D
01CAk(8D500006): LDR SB, MT, MOD5 [Texts]
01CBk(41D80002): ADD R1, SB, VAR2
01CCl(42E80010): ADD R2, SP, 10H
01CDm .FIXUP P
01CDm(F7513005): BL MOD5 [Texts] PROC19
WHILE ~R.eot DOn
01CEn(90E00018): LDR R0, SP, 18H
01CFn(E9000027): BNE 39 [01F7H]
IF ch = 0DX THENo Files.Write(Q,p 0DX)q;r Files.Write(Q,s 0AX)t
01D0o(90E00010): LDR R0, SP, 10H
01D1o(4009000D): SUB R0, R0, DH
01D2o(E900000B): BNE 11 [01DEH]
01D3p(40E80050): ADD R0, SP, 50H
01D4p .FIXUP D
01D4p(8D20000A): LDR SB, MT, MOD2 [Files]
01D5p(41D80001): ADD R1, SB, VAR1
01D6q(4200000D): MOV R2, R0, DH
01D7r .FIXUP P
01D7r(F721800A): BL MOD2 [Files] PROC24
01D8s(40E80050): ADD R0, SP, 50H
01D9s .FIXUP D
01D9s(8D200005): LDR SB, MT, MOD2 [Files]
01DAs(41D80001): ADD R1, SB, VAR1
01DBt(4200000A): MOV R2, R0, AH
ELSIFu chv = 9X THENw (*TAB*) Files.Write(Q,x " ")y;z Files.Write(Q,a " ")b
01DCu .FIXUP P
01DCu(F7218005): BL MOD2 [Files] PROC24
01DDv(E7000013): B 19 [01F1H]
01DEw(90E00010): LDR R0, SP, 10H
01DFw(40090009): SUB R0, R0, 9H
01E0w(E900000B): BNE 11 [01ECH]
01E1x(40E80050): ADD R0, SP, 50H
01E2x .FIXUP D
01E2x(8D200009): LDR SB, MT, MOD2 [Files]
01E3x(41D80001): ADD R1, SB, VAR1
01E4y(42000020): MOV R2, R0, 20H
01E5z .FIXUP P
01E5z(F7218009): BL MOD2 [Files] PROC24
01E6a(40E80050): ADD R0, SP, 50H
01E7a .FIXUP D
01E7a(8D200005): LDR SB, MT, MOD2 [Files]
01E8a(41D80001): ADD R1, SB, VAR1
01E9b(42000020): MOV R2, R0, 20H
ELSEc Filesd.Write(Q,e ch)f
01EAc .FIXUP P
01EAc(F7218005): BL MOD2 [Files] PROC24
01EBd(E7000005): B 5 [01F1H]
01ECe(40E80050): ADD R0, SP, 50H
01EDe .FIXUP D
01EDe(8D200006): LDR SB, MT, MOD2 [Files]
01EEe(41D80001): ADD R1, SB, VAR1
01EFf(92E00010): LDR R2, SP, 10H
ENDg ;
01F0g .FIXUP P
01F0g(F7218006): BL MOD2 [Files] PROC24
Texts.Read(R,h ch)i
01F1h(40E80018): ADD R0, SP, 18H
01F2h .FIXUP D
01F2h(8D500005): LDR SB, MT, MOD5 [Texts]
01F3h(41D80002): ADD R1, SB, VAR2
01F4i(42E80010): ADD R2, SP, 10H
ENDj ;
01F5j .FIXUP P
01F5j(F7513005): BL MOD5 [Texts] PROC19
01F6j(E7FFFFD7): B -41 [01CEH]
Files.Register(F)k;l Texts.WriteString(W,m " done")n
01F7k(80E0004C): LDR R0, SP, 4CH
01F8l .FIXUP P
01F8l(F7204003): BL MOD2 [Files] PROC4
01F9m .FIXUP D
01F9m(8D000007): LDR SB, MT, MOD0 [Tools]
01FAm(40D80008): ADD R0, SB, 8H [data]
01FBm .FIXUP D
01FBm(8D500002): LDR SB, MT, MOD5 [Texts]
01FCm(41D80005): ADD R1, SB, VAR5
01FDn .FIXUP D
01FDn(8D000002): LDR SB, MT, MOD0 [Tools]
01FEn(42D80094): ADD R2, SB, 94H [" done"]
01FFn(43000006): MOV R3, R0, 6H
ELSEo Textsp.WriteString(W,q " not found")r
0200o .FIXUP P
0200o(F751D008): BL MOD5 [Texts] PROC29
0201p(E7000008): B 8 [020AH]
0202q .FIXUP D
0202q(8D000005): LDR SB, MT, MOD0 [Tools]
0203q(40D80008): ADD R0, SB, 8H [data]
0204q .FIXUP D
0204q(8D500002): LDR SB, MT, MOD5 [Texts]
0205q(41D80005): ADD R1, SB, VAR5
0206r .FIXUP D
0206r(8D000002): LDR SB, MT, MOD0 [Tools]
0207r(42D8009C): ADD R2, SB, 9CH [" not found"]
0208r(4300000B): MOV R3, R0, BH
ENDs ;
0209s .FIXUP P
0209s(F751D009): BL MOD5 [Texts] PROC29
Texts.WriteLn(W)t;u Texts.Append(Oberon.Log,v W.buf)w;x Texts.Scan(S)y
020At .FIXUP D
020At(8D000004): LDR SB, MT, MOD0 [Tools]
020Bt(40D80008): ADD R0, SB, 8H [data]
020Ct .FIXUP D
020Ct(8D500002): LDR SB, MT, MOD5 [Texts]
020Dt(41D80005): ADD R1, SB, VAR5
020Eu .FIXUP P
020Eu(F751C005): BL MOD5 [Texts] PROC28
020Fv .FIXUP D
020Fv(8DB00003): LDR SB, MT, MOD11 [Oberon]
0210v(80D0000D): LDR R0, SB, VAR13
0211w .FIXUP D
0211w(8D000002): LDR SB, MT, MOD0 [Tools]
0212w(81D00008): LDR R1, SB, 8H [data]
0213x .FIXUP P
0213x(F750E005): BL MOD5 [Texts] PROC14
0214y(40E80068): ADD R0, SP, 68H
0215y .FIXUP D
0215y(8D500004): LDR SB, MT, MOD5 [Texts]
0216y(41D80003): ADD R1, SB, VAR3
ENDz Convert;
0217z .FIXUP P
0217z(F7516004): BL MOD5 [Texts] PROC22
0218z(8FE00000): LDR LNK, SP, 0H
0219z(4EE800DC): ADD SP, SP, DCH
021Az(C700000F): B LNK
PROCEDURE Id*;
BEGINa Texts.WriteHex(W,b SYSTEM.H(1))c;d Texts.WriteLn(W)e;f Texts.Append(T,g W.buf)h
021Ba .PROC 7
021Ba .COMMAND Id
021Ba(4EE90004): SUB SP, SP, 4H
021Ca(AFE00000): STR LNK, SP, 0H
021Db .FIXUP D
021Db(8D000008): LDR SB, MT, MOD0 [Tools]
021Eb(40D80008): ADD R0, SB, 8H [data]
021Fb .FIXUP D
021Fb(8D500002): LDR SB, MT, MOD5 [Texts]
0220b(41D80005): ADD R1, SB, VAR5
0221c(32000000): MOV' R2, R0, R0
0222d .FIXUP P
0222d(F751F00B): BL MOD5 [Texts] PROC31
0223e .FIXUP D
0223e(8D000004): LDR SB, MT, MOD0 [Tools]
0224e(40D80008): ADD R0, SB, 8H [data]
0225e .FIXUP D
0225e(8D500002): LDR SB, MT, MOD5 [Texts]
0226e(41D80005): ADD R1, SB, VAR5
0227f .FIXUP P
0227f(F751C005): BL MOD5 [Texts] PROC28
0228g .FIXUP D
0228g(8D000003): LDR SB, MT, MOD0 [Tools]
0229g(80D00000): LDR R0, SB, 0H [data]
022Ah(81D00008): LDR R1, SB, 8H
ENDi Id;
022Bi .FIXUP P
022Bi(F750E004): BL MOD5 [Texts] PROC14
022Ci(8FE00000): LDR LNK, SP, 0H
022Di(4EE80004): ADD SP, SP, 4H
022Ei(C700000F): B LNK
BEGINj Texts.OpenWriter(W)k;l T := TextFrames.Text("")m;n OpenViewer(T,o "Tools.Text")p
022Fj .PROC 0
022Fj .ENTRYPOINT
022Fj(4EE90004): SUB SP, SP, 4H
0230j(AFE00000): STR LNK, SP, 0H
0231k .FIXUP D
0231k(8D000009): LDR SB, MT, MOD0 [Tools]
0232k(40D80008): ADD R0, SB, 8H [data]
0233k .FIXUP D
0233k(8D500002): LDR SB, MT, MOD5 [Texts]
0234k(41D80005): ADD R1, SB, VAR5
0235l .FIXUP P
0235l(F751700A): BL MOD5 [Texts] PROC23
0236m .FIXUP D
0236m(8D000003): LDR SB, MT, MOD0 [Tools]
0237m(40D800A8): ADD R0, SB, A8H [""]
0238m(41000001): MOV R1, R0, 1H
0239n .FIXUP P
0239n(F7A2B004): BL MOD10 [TextFrames] PROC43
023An .FIXUP D
023An(8D000004): LDR SB, MT, MOD0 [Tools]
023Bn(A0D00000): STR R0, SB, 0H [data]
023Co(80D00000): LDR R0, SB, 0H
023Dp(41D800AC): ADD R1, SB, ACH
023Ep(4200000B): MOV R2, R0, BH
ENDq Tools.r
023Fq(F7FFFDC0): BL -576 [0000H]
0240r(8FE00000): LDR LNK, SP, 0H
0241r(4EE80004): ADD SP, SP, 4H
0242r(C700000F): B LNK