Sierpinski

Used Exports

BUILTINS: DEC INC INTEGER NEW
Display: Dot Frame FrameDesc.H FrameDesc.W FrameDesc.X FrameDesc.Y FrameDesc.handle FrameMsg ReplConst black paint replace white
MenuViewers: ModifyMsg ModifyMsg.H ModifyMsg.Y New
Oberon: AllocateUserViewer ControlMsg ControlMsg.id CopyMsg CopyMsg.F DrawMouseArrow InputMsg InputMsg.X InputMsg.Y InputMsg.id Par Par.vwr RemoveMarks neutralize track
TextFrames: NewMenu menuH
Viewers: Viewer

MODULE Sierpinski; (*NW 15.1.2013*)
.MODULE Sierpinski (KEY 5346819D, VERSION 1, SIZE 00000AA4)
.IMPORT Display (KEY 4C08D3EA)
.IMPORT Viewers (KEY 25ABF199)
.IMPORT Oberon (KEY A89CCEE2)
.IMPORT Fonts (KEY F4C9F557)
.IMPORT Texts (KEY 0B9E9984)
.IMPORT MenuViewers (KEY 245ACC30)
.IMPORT TextFrames (KEY 650813D5)
.DATA 1CH
.STRING 1CH "System.Close System.Copy System.Grow"
.STRING 44H "Sierpinski"
.FIXUP T 0H
IMPORT Display, Viewers, Oberon, MenuViewers, TextFrames;
CONST Menu = "System.Close System.Copy System.Grow";
VAR x, y, d: INTEGER;
A, B, C, D: PROCEDURE (i: INTEGER);
PROCEDURE E;
BEGINa Display.ReplConst(Display.white,b x,c y,d d,e 1,f Display.paint)g;h INC(x, d)
0000a(4EE90004): SUB SP, SP, 4H
0001a(AFE00000): STR LNK, SP, 0H
0002b(40000001): MOV R0, R0, 1H
0003c .FIXUP D
0003c(8D000003): LDR SB, MT, MOD0 [Sierpinski]
0004c(81D00000): LDR R1, SB, 0H [data]
0005d(82D00004): LDR R2, SB, 4H
0006e(83D00008): LDR R3, SB, 8H
0007f(44000001): MOV R4, R0, 1H
0008g(45000001): MOV R5, R0, 1H
0009h .FIXUP P
0009h(F710F009): BL MOD1 [Display] PROC15
ENDi E;
000Ai .FIXUP D
000Ai(8D000007): LDR SB, MT, MOD0 [Sierpinski]
000Bi(40D80000): ADD R0, SB, 0H [data]
000Ci(81000000): LDR R1, R0, 0H
000Di(82D00008): LDR R2, SB, 8H
000Ei(01180002): ADD R1, R1, R2
000Fi(A1000000): STR R1, R0, 0H
0010i(8FE00000): LDR LNK, SP, 0H
0011i(4EE80004): ADD SP, SP, 4H
0012i(C700000F): B LNK
PROCEDURE N;
BEGINj Display.ReplConst(Display.white,k x,l y,m 1,n d,o Display.paint)p;q INC(y, d)
0013j(4EE90004): SUB SP, SP, 4H
0014j(AFE00000): STR LNK, SP, 0H
0015k(40000001): MOV R0, R0, 1H
0016l .FIXUP D
0016l(8D00000C): LDR SB, MT, MOD0 [Sierpinski]
0017l(81D00000): LDR R1, SB, 0H [data]
0018m(82D00004): LDR R2, SB, 4H
0019n(43000001): MOV R3, R0, 1H
001Ao(84D00008): LDR R4, SB, 8H
001Bp(45000001): MOV R5, R0, 1H
001Cq .FIXUP P
001Cq(F710F013): BL MOD1 [Display] PROC15
ENDr N;
001Dr .FIXUP D
001Dr(8D000007): LDR SB, MT, MOD0 [Sierpinski]
001Er(40D80004): ADD R0, SB, 4H [data]
001Fr(81000000): LDR R1, R0, 0H
0020r(82D00008): LDR R2, SB, 8H
0021r(01180002): ADD R1, R1, R2
0022r(A1000000): STR R1, R0, 0H
0023r(8FE00000): LDR LNK, SP, 0H
0024r(4EE80004): ADD SP, SP, 4H
0025r(C700000F): B LNK
PROCEDURE W;
BEGINs DEC(x, d);t Display.ReplConst(Display.white,u x,v y,w d,x 1,y Display.paint)z
0026s(4EE90004): SUB SP, SP, 4H
0027s(AFE00000): STR LNK, SP, 0H
0028t .FIXUP D
0028t(8D00000B): LDR SB, MT, MOD0 [Sierpinski]
0029t(40D80000): ADD R0, SB, 0H [data]
002At(81000000): LDR R1, R0, 0H
002Bt(82D00008): LDR R2, SB, 8H
002Ct(01190002): SUB R1, R1, R2
002Dt(A1000000): STR R1, R0, 0H
002Eu(40000001): MOV R0, R0, 1H
002Fv(81D00000): LDR R1, SB, 0H
0030w(82D00004): LDR R2, SB, 4H
0031x(83D00008): LDR R3, SB, 8H
0032y(44000001): MOV R4, R0, 1H
0033z(45000001): MOV R5, R0, 1H
ENDa W;
0034a .FIXUP P
0034a(F710F018): BL MOD1 [Display] PROC15
0035a(8FE00000): LDR LNK, SP, 0H
0036a(4EE80004): ADD SP, SP, 4H
0037a(C700000F): B LNK
PROCEDURE S;
BEGINb DEC(y, d);c Display.ReplConst(Display.white,d x,e y,f 1,g d,h Display.paint)i
0038b(4EE90004): SUB SP, SP, 4H
0039b(AFE00000): STR LNK, SP, 0H
003Ac .FIXUP D
003Ac(8D000012): LDR SB, MT, MOD0 [Sierpinski]
003Bc(40D80004): ADD R0, SB, 4H [data]
003Cc(81000000): LDR R1, R0, 0H
003Dc(82D00008): LDR R2, SB, 8H
003Ec(01190002): SUB R1, R1, R2
003Fc(A1000000): STR R1, R0, 0H
0040d(40000001): MOV R0, R0, 1H
0041e(81D00000): LDR R1, SB, 0H
0042f(82D00004): LDR R2, SB, 4H
0043g(43000001): MOV R3, R0, 1H
0044h(84D00008): LDR R4, SB, 8H
0045i(45000001): MOV R5, R0, 1H
ENDj S;
0046j .FIXUP P
0046j(F710F012): BL MOD1 [Display] PROC15
0047j(8FE00000): LDR LNK, SP, 0H
0048j(4EE80004): ADD SP, SP, 4H
0049j(C700000F): B LNK
PROCEDURE NE;
VAR i: INTEGER;
BEGINk i := d;l
004Ak(4EE90008): SUB SP, SP, 8H
004Bk(AFE00000): STR LNK, SP, 0H
004Cl .FIXUP D
004Cl(8D000012): LDR SB, MT, MOD0 [Sierpinski]
004Dl(80D00008): LDR R0, SB, 8H [data]
004El(A0E00004): STR R0, SP, 4H
REPEAT Display.Dot(Display.white,m x,n y,o Display.paint)p;q INC(x);r INC(y);s DEC(i) UNTILt i = 0
004Fm(40000001): MOV R0, R0, 1H
0050n .FIXUP D
0050n(8D000004): LDR SB, MT, MOD0 [Sierpinski]
0051n(81D00000): LDR R1, SB, 0H [data]
0052o(82D00004): LDR R2, SB, 4H
0053p(43000001): MOV R3, R0, 1H
0054q .FIXUP P
0054q(F710E00E): BL MOD1 [Display] PROC14
0055r .FIXUP D
0055r(8D000005): LDR SB, MT, MOD0 [Sierpinski]
0056r(40D80000): ADD R0, SB, 0H [data]
0057r(81000000): LDR R1, R0, 0H
0058r(41180001): ADD R1, R1, 1H
0059r(A1000000): STR R1, R0, 0H
005As(40D80004): ADD R0, SB, 4H
005Bs(81000000): LDR R1, R0, 0H
005Cs(41180001): ADD R1, R1, 1H
005Ds(A1000000): STR R1, R0, 0H
005Et(80E00004): LDR R0, SP, 4H
005Ft(40090001): SUB R0, R0, 1H
0060t(A0E00004): STR R0, SP, 4H
ENDu NE;
0061u(80E00004): LDR R0, SP, 4H
0062u(E9FFFFEC): BNE -20 [004FH]
0063u(8FE00000): LDR LNK, SP, 0H
0064u(4EE80008): ADD SP, SP, 8H
0065u(C700000F): B LNK
PROCEDURE NW;
VAR i: INTEGER;
BEGINv i := d;w
0066v(4EE90008): SUB SP, SP, 8H
0067v(AFE00000): STR LNK, SP, 0H
0068w .FIXUP D
0068w(8D000013): LDR SB, MT, MOD0 [Sierpinski]
0069w(80D00008): LDR R0, SB, 8H [data]
006Aw(A0E00004): STR R0, SP, 4H
REPEAT Display.Dot(Display.white,x x,y y,z Display.paint)a;b DEC(x);c INC(y);d DEC(i) UNTILe i = 0
006Bx(40000001): MOV R0, R0, 1H
006Cy .FIXUP D
006Cy(8D000004): LDR SB, MT, MOD0 [Sierpinski]
006Dy(81D00000): LDR R1, SB, 0H [data]
006Ez(82D00004): LDR R2, SB, 4H
006Fa(43000001): MOV R3, R0, 1H
0070b .FIXUP P
0070b(F710E01C): BL MOD1 [Display] PROC14
0071c .FIXUP D
0071c(8D000005): LDR SB, MT, MOD0 [Sierpinski]
0072c(40D80000): ADD R0, SB, 0H [data]
0073c(81000000): LDR R1, R0, 0H
0074c(41190001): SUB R1, R1, 1H
0075c(A1000000): STR R1, R0, 0H
0076d(40D80004): ADD R0, SB, 4H
0077d(81000000): LDR R1, R0, 0H
0078d(41180001): ADD R1, R1, 1H
0079d(A1000000): STR R1, R0, 0H
007Ae(80E00004): LDR R0, SP, 4H
007Be(40090001): SUB R0, R0, 1H
007Ce(A0E00004): STR R0, SP, 4H
ENDf NW;
007Df(80E00004): LDR R0, SP, 4H
007Ef(E9FFFFEC): BNE -20 [006BH]
007Ff(8FE00000): LDR LNK, SP, 0H
0080f(4EE80008): ADD SP, SP, 8H
0081f(C700000F): B LNK
PROCEDURE SW;
VAR i: INTEGER;
BEGINg i := d;h
0082g(4EE90008): SUB SP, SP, 8H
0083g(AFE00000): STR LNK, SP, 0H
0084h .FIXUP D
0084h(8D000013): LDR SB, MT, MOD0 [Sierpinski]
0085h(80D00008): LDR R0, SB, 8H [data]
0086h(A0E00004): STR R0, SP, 4H
REPEAT Display.Dot(Display.white,i x,j y,k Display.paint)l;m DEC(x);n DEC(y);o DEC(i) UNTILp i = 0
0087i(40000001): MOV R0, R0, 1H
0088j .FIXUP D
0088j(8D000004): LDR SB, MT, MOD0 [Sierpinski]
0089j(81D00000): LDR R1, SB, 0H [data]
008Ak(82D00004): LDR R2, SB, 4H
008Bl(43000001): MOV R3, R0, 1H
008Cm .FIXUP P
008Cm(F710E01C): BL MOD1 [Display] PROC14
008Dn .FIXUP D
008Dn(8D000005): LDR SB, MT, MOD0 [Sierpinski]
008En(40D80000): ADD R0, SB, 0H [data]
008Fn(81000000): LDR R1, R0, 0H
0090n(41190001): SUB R1, R1, 1H
0091n(A1000000): STR R1, R0, 0H
0092o(40D80004): ADD R0, SB, 4H
0093o(81000000): LDR R1, R0, 0H
0094o(41190001): SUB R1, R1, 1H
0095o(A1000000): STR R1, R0, 0H
0096p(80E00004): LDR R0, SP, 4H
0097p(40090001): SUB R0, R0, 1H
0098p(A0E00004): STR R0, SP, 4H
ENDq SW;
0099q(80E00004): LDR R0, SP, 4H
009Aq(E9FFFFEC): BNE -20 [0087H]
009Bq(8FE00000): LDR LNK, SP, 0H
009Cq(4EE80008): ADD SP, SP, 8H
009Dq(C700000F): B LNK
PROCEDURE SE;
VAR i: INTEGER;
BEGINr i := d;s
009Er(4EE90008): SUB SP, SP, 8H
009Fr(AFE00000): STR LNK, SP, 0H
00A0s .FIXUP D
00A0s(8D000013): LDR SB, MT, MOD0 [Sierpinski]
00A1s(80D00008): LDR R0, SB, 8H [data]
00A2s(A0E00004): STR R0, SP, 4H
REPEAT Display.Dot(Display.white,t x,u y,v Display.paint)w;x INC(x);y DEC(y);z DEC(i) UNTILa i = 0
00A3t(40000001): MOV R0, R0, 1H
00A4u .FIXUP D
00A4u(8D000004): LDR SB, MT, MOD0 [Sierpinski]
00A5u(81D00000): LDR R1, SB, 0H [data]
00A6v(82D00004): LDR R2, SB, 4H
00A7w(43000001): MOV R3, R0, 1H
00A8x .FIXUP P
00A8x(F710E01C): BL MOD1 [Display] PROC14
00A9y .FIXUP D
00A9y(8D000005): LDR SB, MT, MOD0 [Sierpinski]
00AAy(40D80000): ADD R0, SB, 0H [data]
00ABy(81000000): LDR R1, R0, 0H
00ACy(41180001): ADD R1, R1, 1H
00ADy(A1000000): STR R1, R0, 0H
00AEz(40D80004): ADD R0, SB, 4H
00AFz(81000000): LDR R1, R0, 0H
00B0z(41190001): SUB R1, R1, 1H
00B1z(A1000000): STR R1, R0, 0H
00B2a(80E00004): LDR R0, SP, 4H
00B3a(40090001): SUB R0, R0, 1H
00B4a(A0E00004): STR R0, SP, 4H
ENDb SE;
00B5b(80E00004): LDR R0, SP, 4H
00B6b(E9FFFFEC): BNE -20 [00A3H]
00B7b(8FE00000): LDR LNK, SP, 0H
00B8b(4EE80008): ADD SP, SP, 8H
00B9b(C700000F): B LNK
PROCEDURE SA(i: INTEGER);
BEGINc
00BAc(4EE90008): SUB SP, SP, 8H
00BBc(AFE00000): STR LNK, SP, 0H
00BCc(A0E00004): STR R0, SP, 4H
IF i > 0 THENd A(i-1)e;f SE;g B(i-1)h;i E;j E;k D(i-1)l;m NE;n A(i-1)o ENDp
00BDd(80E00004): LDR R0, SP, 4H
00BEd(40090000): SUB R0, R0, 0H
00BFd(E600001C): BLE 28 [00DCH]
00C0e(80E00004): LDR R0, SP, 4H
00C1e(40090001): SUB R0, R0, 1H
00C2f .FIXUP D
00C2f(8D000019): LDR SB, MT, MOD0 [Sierpinski]
00C3f(81D0000C): LDR R1, SB, CH [data]
00C4f(D105325C): BLEQ MT [trap=5, pos=1330]
00C5f(D7000001): BL R1
00C6g(F7FFFFD7): BL -41 [009EH]
00C7h(80E00004): LDR R0, SP, 4H
00C8h(40090001): SUB R0, R0, 1H
00C9i .FIXUP D
00C9i(8D000007): LDR SB, MT, MOD0 [Sierpinski]
00CAi(81D00010): LDR R1, SB, 10H [data]
00CBi(D1053E5C): BLEQ MT [trap=5, pos=1342]
00CCi(D7000001): BL R1
00CDj(F7FFFF32): BL -206 [0000H]
00CEk(F7FFFF31): BL -207 [0000H]
00CFl(80E00004): LDR R0, SP, 4H
00D0l(40090001): SUB R0, R0, 1H
00D1m .FIXUP D
00D1m(8D000008): LDR SB, MT, MOD0 [Sierpinski]
00D2m(81D00018): LDR R1, SB, 18H [data]
00D3m(D1054C5C): BLEQ MT [trap=5, pos=1356]
00D4m(D7000001): BL R1
00D5n(F7FFFF74): BL -140 [004AH]
00D6o(80E00004): LDR R0, SP, 4H
00D7o(40090001): SUB R0, R0, 1H
00D8p .FIXUP D
00D8p(8D000007): LDR SB, MT, MOD0 [Sierpinski]
00D9p(81D0000C): LDR R1, SB, CH [data]
00DAp(D1055B5C): BLEQ MT [trap=5, pos=1371]
00DBp(D7000001): BL R1
ENDq SA;
00DCq(8FE00000): LDR LNK, SP, 0H
00DDq(4EE80008): ADD SP, SP, 8H
00DEq(C700000F): B LNK
PROCEDURE SB(i: INTEGER);
BEGINr
00DFr(4EE90008): SUB SP, SP, 8H
00E0r(AFE00000): STR LNK, SP, 0H
00E1r(A0E00004): STR R0, SP, 4H
IF i > 0 THENs B(i-1)t;u SW;v C(i-1)w;x S;y S;z A(i-1)a;b SE;c B(i-1)d ENDe
00E2s(80E00004): LDR R0, SP, 4H
00E3s(40090000): SUB R0, R0, 0H
00E4s(E600001C): BLE 28 [0101H]
00E5t(80E00004): LDR R0, SP, 4H
00E6t(40090001): SUB R0, R0, 1H
00E7u .FIXUP D
00E7u(8D00000F): LDR SB, MT, MOD0 [Sierpinski]
00E8u(81D00010): LDR R1, SB, 10H [data]
00E9u(D105A45C): BLEQ MT [trap=5, pos=1444]
00EAu(D7000001): BL R1
00EBv(F7FFFF96): BL -106 [0082H]
00ECw(80E00004): LDR R0, SP, 4H
00EDw(40090001): SUB R0, R0, 1H
00EEx .FIXUP D
00EEx(8D000007): LDR SB, MT, MOD0 [Sierpinski]
00EFx(81D00014): LDR R1, SB, 14H [data]
00F0x(D105B05C): BLEQ MT [trap=5, pos=1456]
00F1x(D7000001): BL R1
00F2y(F7FFFF45): BL -187 [0038H]
00F3z(F7FFFF44): BL -188 [0038H]
00F4a(80E00004): LDR R0, SP, 4H
00F5a(40090001): SUB R0, R0, 1H
00F6b .FIXUP D
00F6b(8D000008): LDR SB, MT, MOD0 [Sierpinski]
00F7b(81D0000C): LDR R1, SB, CH [data]
00F8b(D105BE5C): BLEQ MT [trap=5, pos=1470]
00F9b(D7000001): BL R1
00FAc(F7FFFFA3): BL -93 [009EH]
00FBd(80E00004): LDR R0, SP, 4H
00FCd(40090001): SUB R0, R0, 1H
00FDe .FIXUP D
00FDe(8D000007): LDR SB, MT, MOD0 [Sierpinski]
00FEe(81D00010): LDR R1, SB, 10H [data]
00FFe(D105CD5C): BLEQ MT [trap=5, pos=1485]
0100e(D7000001): BL R1
ENDf SB;
0101f(8FE00000): LDR LNK, SP, 0H
0102f(4EE80008): ADD SP, SP, 8H
0103f(C700000F): B LNK
PROCEDURE SC(i: INTEGER);
BEGINg
0104g(4EE90008): SUB SP, SP, 8H
0105g(AFE00000): STR LNK, SP, 0H
0106g(A0E00004): STR R0, SP, 4H
IF i > 0 THENh C(i-1)i;j NW;k D(i-1)l;m W;n W;o B(i-1)p;q SW;r C(i-1)s ENDt
0107h(80E00004): LDR R0, SP, 4H
0108h(40090000): SUB R0, R0, 0H
0109h(E600001C): BLE 28 [0126H]
010Ai(80E00004): LDR R0, SP, 4H
010Bi(40090001): SUB R0, R0, 1H
010Cj .FIXUP D
010Cj(8D00000F): LDR SB, MT, MOD0 [Sierpinski]
010Dj(81D00014): LDR R1, SB, 14H [data]
010Ej(D106165C): BLEQ MT [trap=5, pos=1558]
010Fj(D7000001): BL R1
0110k(F7FFFF55): BL -171 [0066H]
0111l(80E00004): LDR R0, SP, 4H
0112l(40090001): SUB R0, R0, 1H
0113m .FIXUP D
0113m(8D000007): LDR SB, MT, MOD0 [Sierpinski]
0114m(81D00018): LDR R1, SB, 18H [data]
0115m(D106225C): BLEQ MT [trap=5, pos=1570]
0116m(D7000001): BL R1
0117n(F7FFFF0E): BL -242 [0026H]
0118o(F7FFFF0D): BL -243 [0026H]
0119p(80E00004): LDR R0, SP, 4H
011Ap(40090001): SUB R0, R0, 1H
011Bq .FIXUP D
011Bq(8D000008): LDR SB, MT, MOD0 [Sierpinski]
011Cq(81D00010): LDR R1, SB, 10H [data]
011Dq(D106305C): BLEQ MT [trap=5, pos=1584]
011Eq(D7000001): BL R1
011Fr(F7FFFF62): BL -158 [0082H]
0120s(80E00004): LDR R0, SP, 4H
0121s(40090001): SUB R0, R0, 1H
0122t .FIXUP D
0122t(8D000007): LDR SB, MT, MOD0 [Sierpinski]
0123t(81D00014): LDR R1, SB, 14H [data]
0124t(D1063F5C): BLEQ MT [trap=5, pos=1599]
0125t(D7000001): BL R1
ENDu SC;
0126u(8FE00000): LDR LNK, SP, 0H
0127u(4EE80008): ADD SP, SP, 8H
0128u(C700000F): B LNK
PROCEDURE SD(i: INTEGER);
BEGINv
0129v(4EE90008): SUB SP, SP, 8H
012Av(AFE00000): STR LNK, SP, 0H
012Bv(A0E00004): STR R0, SP, 4H
IF i > 0 THENw D(i-1)x;y NE;z A(i-1)a;b N;c N;d C(i-1)e;f NW;g D(i-1)h ENDi
012Cw(80E00004): LDR R0, SP, 4H
012Dw(40090000): SUB R0, R0, 0H
012Ew(E600001C): BLE 28 [014BH]
012Fx(80E00004): LDR R0, SP, 4H
0130x(40090001): SUB R0, R0, 1H
0131y .FIXUP D
0131y(8D00000F): LDR SB, MT, MOD0 [Sierpinski]
0132y(81D00018): LDR R1, SB, 18H [data]
0133y(D106885C): BLEQ MT [trap=5, pos=1672]
0134y(D7000001): BL R1
0135z(F7FFFF14): BL -236 [004AH]
0136a(80E00004): LDR R0, SP, 4H
0137a(40090001): SUB R0, R0, 1H
0138b .FIXUP D
0138b(8D000007): LDR SB, MT, MOD0 [Sierpinski]
0139b(81D0000C): LDR R1, SB, CH [data]
013Ab(D106945C): BLEQ MT [trap=5, pos=1684]
013Bb(D7000001): BL R1
013Cc(F7FFFED6): BL -298 [0013H]
013Dd(F7FFFED5): BL -299 [0013H]
013Ee(80E00004): LDR R0, SP, 4H
013Fe(40090001): SUB R0, R0, 1H
0140f .FIXUP D
0140f(8D000008): LDR SB, MT, MOD0 [Sierpinski]
0141f(81D00014): LDR R1, SB, 14H [data]
0142f(D106A25C): BLEQ MT [trap=5, pos=1698]
0143f(D7000001): BL R1
0144g(F7FFFF21): BL -223 [0066H]
0145h(80E00004): LDR R0, SP, 4H
0146h(40090001): SUB R0, R0, 1H
0147i .FIXUP D
0147i(8D000007): LDR SB, MT, MOD0 [Sierpinski]
0148i(81D00018): LDR R1, SB, 18H [data]
0149i(D106B15C): BLEQ MT [trap=5, pos=1713]
014Ai(D7000001): BL R1
ENDj SD;
014Bj(8FE00000): LDR LNK, SP, 0H
014Cj(4EE80008): ADD SP, SP, 8H
014Dj(C700000F): B LNK
PROCEDURE DrawSierpinski(F: Display.Frame);
VAR k, n, w, x0, y0: INTEGER;
BEGINk; k := 0;l d := 4;m
014Ek(4EE9001C): SUB SP, SP, 1CH
014Fk(AFE00000): STR LNK, SP, 0H
0150k(A0E00004): STR R0, SP, 4H
0151l(40000000): MOV R0, R0, 0H
0152l(A0E00008): STR R0, SP, 8H
0153m(40000004): MOV R0, R0, 4H
0154m .FIXUP D
0154m(8D00000D): LDR SB, MT, MOD0 [Sierpinski]
0155m(A0D00008): STR R0, SB, 8H [data]
IF F.Wn < F.Ho THENp w := F.Wq ELSEr ws := F.Ht ENDu ;
0156n(80E00004): LDR R0, SP, 4H
0157n(D107304C): BLEQ MT [trap=4, pos=1840]
0158o(81E00004): LDR R1, SP, 4H
0159o(D107364C): BLEQ MT [trap=4, pos=1846]
015Ap(80000010): LDR R0, R0, 10H
015Bp(81100014): LDR R1, R1, 14H
015Cp(00090001): SUB R0, R0, R1
015Dp(ED000005): BGE 5 [0163H]
015Eq(80E00004): LDR R0, SP, 4H
015Fq(D107444C): BLEQ MT [trap=4, pos=1860]
0160r(80000010): LDR R0, R0, 10H
0161r(A0E00010): STR R0, SP, 10H
0162s(E7000004): B 4 [0167H]
0163t(80E00004): LDR R0, SP, 4H
0164t(D107524C): BLEQ MT [trap=4, pos=1874]
0165u(80000014): LDR R0, R0, 14H
0166u(A0E00010): STR R0, SP, 10H
WHILE d*8 <v w DOw d := d*2;x INC(k) ENDy ;
0167v .FIXUP D
0167v(8D000013): LDR SB, MT, MOD0 [Sierpinski]
0168v(80D00008): LDR R0, SB, 8H [data]
0169v(40010003): LSL R0, R0, 3H
016Aw(81E00010): LDR R1, SP, 10H
016Bw(00090001): SUB R0, R0, R1
016Cw(ED000008): BGE 8 [0175H]
016Dx .FIXUP D
016Dx(8D000006): LDR SB, MT, MOD0 [Sierpinski]
016Ex(80D00008): LDR R0, SB, 8H [data]
016Fx(40010001): LSL R0, R0, 1H
0170x(A0D00008): STR R0, SB, 8H
0171y(80E00008): LDR R0, SP, 8H
0172y(40080001): ADD R0, R0, 1H
0173y(A0E00008): STR R0, SP, 8H
0174y(E7FFFFF2): B -14 [0167H]
Display.ReplConst(Display.black,z F.Xa,b F.Yc,d F.We,f F.Hg,h Display.replace)i;j
0175z(40000000): MOV R0, R0, 0H
0176a(81E00004): LDR R1, SP, 4H
0177a(D107AD4C): BLEQ MT [trap=4, pos=1965]
0178b(81100008): LDR R1, R1, 8H
0179c(82E00004): LDR R2, SP, 4H
017Ac(D107B24C): BLEQ MT [trap=4, pos=1970]
017Bd(8220000C): LDR R2, R2, CH
017Ce(83E00004): LDR R3, SP, 4H
017De(D107B74C): BLEQ MT [trap=4, pos=1975]
017Ef(83300010): LDR R3, R3, 10H
017Fg(84E00004): LDR R4, SP, 4H
0180g(D107BC4C): BLEQ MT [trap=4, pos=1980]
0181h(84400014): LDR R4, R4, 14H
0182i(45000000): MOV R5, R0, 0H
0183j .FIXUP P
0183j(F710F0DB): BL MOD1 [Display] PROC15
x0 := F.Wk DIV 2;l y0 := F.Hm DIV 2 +n d;o n := 0;p
0184k(80E00004): LDR R0, SP, 4H
0185k(D107DD4C): BLEQ MT [trap=4, pos=2013]
0186l(80000010): LDR R0, R0, 10H
0187l(40020001): ASR R0, R0, 1H
0188l(A0E00014): STR R0, SP, 14H
0189m(80E00004): LDR R0, SP, 4H
018Am(D107EE4C): BLEQ MT [trap=4, pos=2030]
018Bn(80000014): LDR R0, R0, 14H
018Cn(40020001): ASR R0, R0, 1H
018Do .FIXUP D
018Do(8D000020): LDR SB, MT, MOD0 [Sierpinski]
018Eo(81D00008): LDR R1, SB, 8H [data]
018Fo(00080001): ADD R0, R0, R1
0190o(A0E00018): STR R0, SP, 18H
0191p(40000000): MOV R0, R0, 0H
0192p(A0E0000C): STR R0, SP, CH
WHILE n < k DOq
0193q(80E0000C): LDR R0, SP, CH
0194q(81E00008): LDR R1, SP, 8H
0195q(00090001): SUB R0, R0, R1
0196q(ED000028): BGE 40 [01BFH]
INC(n);r DEC(x0, d);s d := d DIV 2;t INC(y0, d);u
0197r(80E0000C): LDR R0, SP, CH
0198r(40080001): ADD R0, R0, 1H
0199r(A0E0000C): STR R0, SP, CH
019As(80E00014): LDR R0, SP, 14H
019Bs .FIXUP D
019Bs(8D00000E): LDR SB, MT, MOD0 [Sierpinski]
019Cs(81D00008): LDR R1, SB, 8H [data]
019Ds(00090001): SUB R0, R0, R1
019Es(A0E00014): STR R0, SP, 14H
019Ft(80D00008): LDR R0, SB, 8H
01A0t(40020001): ASR R0, R0, 1H
01A1t(A0D00008): STR R0, SB, 8H
01A2u(80E00018): LDR R0, SP, 18H
01A3u(81D00008): LDR R1, SB, 8H
01A4u(00080001): ADD R0, R0, R1
01A5u(A0E00018): STR R0, SP, 18H
x := F.Xv + x0;w y := F.Yx + y0;y
01A6v(80E00004): LDR R0, SP, 4H
01A7v(D108574C): BLEQ MT [trap=4, pos=2135]
01A8w(80000008): LDR R0, R0, 8H
01A9w(81E00014): LDR R1, SP, 14H
01AAw(00080001): ADD R0, R0, R1
01ABw(A0D00000): STR R0, SB, 0H
01ACx(80E00004): LDR R0, SP, 4H
01ADx(D108664C): BLEQ MT [trap=4, pos=2150]
01AEy(8000000C): LDR R0, R0, CH
01AFy(81E00018): LDR R1, SP, 18H
01B0y(00080001): ADD R0, R0, R1
01B1y(A0D00004): STR R0, SB, 4H
SA(n)z;a SE;b SB(n)c;d SW;e SC(n)f;g NW;h SD(n)i;j NE
01B2z(80E0000C): LDR R0, SP, CH
01B3a(F7FFFF06): BL -250 [00BAH]
01B4b(F7FFFEE9): BL -279 [009EH]
01B5c(80E0000C): LDR R0, SP, CH
01B6d(F7FFFF28): BL -216 [00DFH]
01B7e(F7FFFECA): BL -310 [0082H]
01B8f(80E0000C): LDR R0, SP, CH
01B9g(F7FFFF4A): BL -182 [0104H]
01BAh(F7FFFEAB): BL -341 [0066H]
01BBi(80E0000C): LDR R0, SP, CH
01BCj(F7FFFF6C): BL -148 [0129H]
ENDk
01BDk(F7FFFE8C): BL -372 [004AH]
01BEk(E7FFFFD4): B -44 [0193H]
ENDl DrawSierpinski;
01BFl(8FE00000): LDR LNK, SP, 0H
01C0l(4EE8001C): ADD SP, SP, 1CH
01C1l(C700000F): B LNK
PROCEDURE Handler(F: Display.Frame; VAR M: Display.FrameMsg);
VAR F1: Display.Frame;
BEGINm
01C2m(4EE90014): SUB SP, SP, 14H
01C3m(AFE00000): STR LNK, SP, 0H
01C4m(A0E00004): STR R0, SP, 4H
01C5m(A1E00008): STR R1, SP, 8H
01C6m(A2E0000C): STR R2, SP, CH
IF M IS Oberon.InputMsg THENn
01C7n(80E0000C): LDR R0, SP, CH
01C8n(80000004): LDR R0, R0, 4H
01C9n .FIXUP D
01C9n(8D30002E): LDR SB, MT, MOD3 [Oberon]
01CAn(41D80003): ADD R1, SB, VAR3
01CBn(01190000): SUB R1, R1, R0
01CCn(E900001C): BNE 28 [01E9H]
IF M(Oberon.InputMsg)o.id = Oberon.track THENp
01CDo(80E0000C): LDR R0, SP, CH
01CEo(80000004): LDR R0, R0, 4H
01CFo .FIXUP D
01CFo(8D300006): LDR SB, MT, MOD3 [Oberon]
01D0o(41D80003): ADD R1, SB, VAR3
01D1o(01190000): SUB R1, R1, R0
01D2o(D9095C2C): BLNE MT [trap=2, pos=2396]
01D3p(80E00008): LDR R0, SP, 8H
01D4p(80000000): LDR R0, R0, 0H
01D5p(40090001): SUB R0, R0, 1H
01D6p(E9000011): BNE 17 [01E8H]
Oberon.DrawMouseArrow(M(Oberon.InputMsg)q.X,r M(Oberon.InputMsg)s.Y)t
01D7q(80E0000C): LDR R0, SP, CH
01D8q(80000004): LDR R0, R0, 4H
01D9q .FIXUP D
01D9q(8D30000A): LDR SB, MT, MOD3 [Oberon]
01DAq(41D80003): ADD R1, SB, VAR3
01DBq(01190000): SUB R1, R1, R0
01DCq(D909A42C): BLNE MT [trap=2, pos=2468]
01DDr(80E00008): LDR R0, SP, 8H
01DEr(80000008): LDR R0, R0, 8H
01DFs(81E0000C): LDR R1, SP, CH
01E0s(81100004): LDR R1, R1, 4H
01E1s .FIXUP D
01E1s(8D300008): LDR SB, MT, MOD3 [Oberon]
01E2s(42D80003): ADD R2, SB, VAR3
01E3s(02290001): SUB R2, R2, R1
01E4s(D909BA2C): BLNE MT [trap=2, pos=2490]
01E5t(81E00008): LDR R1, SP, 8H
01E6t(8110000C): LDR R1, R1, CH
ENDu
01E7u .FIXUP P
01E7u(F7318064): BL MOD3 [Oberon] PROC24
ELSIF Mv IS MenuViewers.ModifyMsg THENw
01E8v(E700005B): B 91 [0244H]
01E9w(80E0000C): LDR R0, SP, CH
01EAw(80000004): LDR R0, R0, 4H
01EBw .FIXUP D
01EBw(8D60000A): LDR SB, MT, MOD6 [MenuViewers]
01ECw(41D80002): ADD R1, SB, VAR2
01EDw(01190000): SUB R1, R1, R0
01EEw(E9000019): BNE 25 [0208H]
F.Yx := M(MenuViewers.ModifyMsg)y.Y;z F.Ha := M(MenuViewers.ModifyMsg)b.H;c DrawSierpinski(F)d
01EFx(80E00004): LDR R0, SP, 4H
01F0x(D109FB4C): BLEQ MT [trap=4, pos=2555]
01F1y(81E0000C): LDR R1, SP, CH
01F2y(81100004): LDR R1, R1, 4H
01F3y .FIXUP D
01F3y(8D600008): LDR SB, MT, MOD6 [MenuViewers]
01F4y(42D80002): ADD R2, SB, VAR2
01F5y(02290001): SUB R2, R2, R1
01F6y(D90A172C): BLNE MT [trap=2, pos=2583]
01F7z(81E00008): LDR R1, SP, 8H
01F8z(81100008): LDR R1, R1, 8H
01F9z(A100000C): STR R1, R0, CH
01FAa(80E00004): LDR R0, SP, 4H
01FBa(D10A1E4C): BLEQ MT [trap=4, pos=2590]
01FCb(81E0000C): LDR R1, SP, CH
01FDb(81100004): LDR R1, R1, 4H
01FEb .FIXUP D
01FEb(8D60000B): LDR SB, MT, MOD6 [MenuViewers]
01FFb(42D80002): ADD R2, SB, VAR2
0200b(02290001): SUB R2, R2, R1
0201b(D90A3A2C): BLNE MT [trap=2, pos=2618]
0202c(81E00008): LDR R1, SP, 8H
0203c(8110000C): LDR R1, R1, CH
0204c(A1000014): STR R1, R0, 14H
0205d(80E00004): LDR R0, SP, 4H
ELSIFe Mf IS Oberon.ControlMsg THENg
0206e(F7FFFF47): BL -185 [014EH]
0207f(E700003C): B 60 [0244H]
0208g(80E0000C): LDR R0, SP, CH
0209g(80000004): LDR R0, R0, 4H
020Ag .FIXUP D
020Ag(8D30000C): LDR SB, MT, MOD3 [Oberon]
020Bg(41D80005): ADD R1, SB, VAR5
020Cg(01190000): SUB R1, R1, R0
020Dg(E9000018): BNE 24 [0226H]
IF M(Oberon.ControlMsg)h.id = Oberon.neutralize THENi Oberon.RemoveMarks(F.Xj,k F.Yl,m F.Wn,o F.Hp)q ENDr
020Eh(80E0000C): LDR R0, SP, CH
020Fh(80000004): LDR R0, R0, 4H
0210h .FIXUP D
0210h(8D300006): LDR SB, MT, MOD3 [Oberon]
0211h(41D80005): ADD R1, SB, VAR5
0212h(01190000): SUB R1, R1, R0
0213h(D90A932C): BLNE MT [trap=2, pos=2707]
0214i(80E00008): LDR R0, SP, 8H
0215i(80000000): LDR R0, R0, 0H
0216i(40090001): SUB R0, R0, 1H
0217i(E900000D): BNE 13 [0225H]
0218j(80E00004): LDR R0, SP, 4H
0219j(D10AC64C): BLEQ MT [trap=4, pos=2758]
021Ak(80000008): LDR R0, R0, 8H
021Bl(81E00004): LDR R1, SP, 4H
021Cl(D10ACB4C): BLEQ MT [trap=4, pos=2763]
021Dm(8110000C): LDR R1, R1, CH
021En(82E00004): LDR R2, SP, 4H
021Fn(D10AD04C): BLEQ MT [trap=4, pos=2768]
0220o(82200010): LDR R2, R2, 10H
0221p(83E00004): LDR R3, SP, 4H
0222p(D10AD54C): BLEQ MT [trap=4, pos=2773]
0223q(83300014): LDR R3, R3, 14H
0224r .FIXUP P
0224r(F731B03D): BL MOD3 [Oberon] PROC27
ELSIF Ms IS Oberon.CopyMsg THENt
0225s(E700001E): B 30 [0244H]
0226t(80E0000C): LDR R0, SP, CH
0227t(80000004): LDR R0, R0, 4H
0228t .FIXUP D
0228t(8D300018): LDR SB, MT, MOD3 [Oberon]
0229t(41D80006): ADD R1, SB, VAR6
022At(01190000): SUB R1, R1, R0
022Bt(E9000018): BNE 24 [0244H]
NEW(F1);u F1^ :=v F^;w M(Oberon.CopyMsg)x.F := F1
022Cu(40E80010): ADD R0, SP, 10H
022Du .FIXUP D
022Du(8D100005): LDR SB, MT, MOD1 [Display]
022Eu(41D80002): ADD R1, SB, VAR2
022Fu(D70B0D0C): BL MT [trap=0, pos=2829]
0230v(80E00010): LDR R0, SP, 10H
0231v(D10B144C): BLEQ MT [trap=4, pos=2836]
0232w(81E00004): LDR R1, SP, 4H
0233w(D10B184C): BLEQ MT [trap=4, pos=2840]
0234w(42000007): MOV R2, R0, 7H
0235w(83100000): LDR R3, R1, 0H
0236w(41180004): ADD R1, R1, 4H
0237w(A3000000): STR R3, R0, 0H
0238w(40080004): ADD R0, R0, 4H
0239w(42290001): SUB R2, R2, 1H
023Aw(E9FFFFFA): BNE -6 [0235H]
023Bx(80E0000C): LDR R0, SP, CH
023Cx(80000004): LDR R0, R0, 4H
023Dx .FIXUP D
023Dx(8D300010): LDR SB, MT, MOD3 [Oberon]
023Ex(41D80006): ADD R1, SB, VAR6
023Fx(01190000): SUB R1, R1, R0
0240x(D90B2A2C): BLNE MT [trap=2, pos=2858]
ENDy
0241y(80E00010): LDR R0, SP, 10H
0242y(81E00008): LDR R1, SP, 8H
0243y(A0100000): STR R0, R1, 0H
ENDz Handler;
0244z(8FE00000): LDR LNK, SP, 0H
0245z(4EE80014): ADD SP, SP, 14H
0246z(C700000F): B LNK
PROCEDURE New(): Display.Frame;
VAR F: Display.Frame;
BEGINa NEW(F);b F.handlec := Handler;d RETURN F
0247a(4EE90008): SUB SP, SP, 8H
0248a(AFE00000): STR LNK, SP, 0H
0249b(40E80004): ADD R0, SP, 4H
024Ab .FIXUP D
024Ab(8D10000D): LDR SB, MT, MOD1 [Display]
024Bb(41D80002): ADD R1, SB, VAR2
024Cb(D70B960C): BL MT [trap=0, pos=2966]
024Dc(80E00004): LDR R0, SP, 4H
024Ec(D10B9F4C): BLEQ MT [trap=4, pos=2975]
024Fd(F7000000): BL 0 [0250H]
0250d(41F90238): SUB R1, LNK, 238H
0251d(A1000018): STR R1, R0, 18H
ENDe New;
0252e(80E00004): LDR R0, SP, 4H
0253e(8FE00000): LDR LNK, SP, 0H
0254e(4EE80008): ADD SP, SP, 8H
0255e(C700000F): B LNK
PROCEDURE Draw*;
VAR V: Viewers.Viewer; X, Y: INTEGER;
BEGINf Oberon.AllocateUserViewer(Oberon.Par.vwr.gXh,i X,j Y)k;l
0256f .PROC 1
0256f .COMMAND Draw
0256f(4EE90010): SUB SP, SP, 10H
0257f(AFE00000): STR LNK, SP, 0H
0258g .FIXUP D
0258g(8D30000E): LDR SB, MT, MOD3 [Oberon]
0259g(40D8000E): ADD R0, SB, VAR14
025Ah(80000000): LDR R0, R0, 0H
025Bh(D10C304C): BLEQ MT [trap=4, pos=3120]
025Ci(80000008): LDR R0, R0, 8H
025Dj(41E80008): ADD R1, SP, 8H
025Ek(42E8000C): ADD R2, SP, CH
025Fl .FIXUP P
025Fl(F732203B): BL MOD3 [Oberon] PROC34
V := MenuViewers.New(TextFrames.NewMenu("Sierpinski",m Menu)n,o New()p,q TextFrames.menuH,r X,s Y)t
0260m .FIXUP D
0260m(8D000008): LDR SB, MT, MOD0 [Sierpinski]
0261m(40D80044): ADD R0, SB, 44H ["Sierpinski"]
0262m(4100000B): MOV R1, R0, BH
0263n(42D8001C): ADD R2, SB, 1CH
0264n(43000027): MOV R3, R0, 27H
0265o .FIXUP P
0265o(F772C006): BL MOD7 [TextFrames] PROC44
0266p(4EE90004): SUB SP, SP, 4H
0267p(A0E00000): STR R0, SP, 0H
0268q(F7FFFFDE): BL -34 [0247H]
0269q(01000000): MOV R1, R0, R0
026Aq(80E00000): LDR R0, SP, 0H
026Bq(4EE80004): ADD SP, SP, 4H
026Cr .FIXUP D
026Cr(8D70000C): LDR SB, MT, MOD7 [TextFrames]
026Dr(82D00005): LDR R2, SB, VAR5
026Es(83E00008): LDR R3, SP, 8H
026Ft(84E0000C): LDR R4, SP, CH
ENDu Draw;
0270u .FIXUP P
0270u(F760400B): BL MOD6 [MenuViewers] PROC4
0271u(A0E00004): STR R0, SP, 4H
0272u(8FE00000): LDR LNK, SP, 0H
0273u(4EE80010): ADD SP, SP, 10H
0274u(C700000F): B LNK
BEGINv A := SA;w B := SB;x C := SC;y D := SD
0275v .PROC 0
0275v .ENTRYPOINT
0275v(4EE90004): SUB SP, SP, 4H
0276v(AFE00000): STR LNK, SP, 0H
0277w(F7000000): BL 0 [0278H]
0278w(40F906F8): SUB R0, LNK, 6F8H
0279w .FIXUP D
0279w(8D00000D): LDR SB, MT, MOD0 [Sierpinski]
027Aw(A0D0000C): STR R0, SB, CH [data]
027Bx(F7000000): BL 0 [027CH]
027Cx(40F90674): SUB R0, LNK, 674H
027Dx(A0D00010): STR R0, SB, 10H
027Ey(F7000000): BL 0 [027FH]
027Fy(40F905EC): SUB R0, LNK, 5ECH
0280y(A0D00014): STR R0, SB, 14H
ENDz Sierpinski.a
0281z(F7000000): BL 0 [0282H]
0282z(40F90564): SUB R0, LNK, 564H
0283z(A0D00018): STR R0, SB, 18H
0284a(8FE00000): LDR LNK, SP, 0H
0285a(4EE80004): ADD SP, SP, 4H
0286a(C700000F): B LNK