Rectangles

Used Exports

BUILTINS: ABS BOOLEAN BYTE INTEGER NEW SET
Display: FrameDesc.X FrameDesc.Y black replace white
Files: ReadByte Rider WriteByte
GraphicFrames: Defocus Deselect DrawMsg DrawMsg.col DrawMsg.f DrawMsg.mode DrawMsg.x DrawMsg.y DrawObj Focus Frame FrameDesc.X1 FrameDesc.Y1 FrameDesc.graph FrameDesc.mark FrameDesc.x FrameDesc.y LocDesc.next LocDesc.x LocDesc.y ReplConst
Graphics: Add ColorMsg ColorMsg.col Context Method MethodDesc.allocator MethodDesc.change MethodDesc.copy MethodDesc.draw MethodDesc.module MethodDesc.new MethodDesc.read MethodDesc.selectable MethodDesc.write Msg New Object ObjectDesc ObjectDesc.col ObjectDesc.do ObjectDesc.h ObjectDesc.selected ObjectDesc.w ObjectDesc.x ObjectDesc.y WidMsg WidMsg.w WriteObj width
Oberon: CurCol
SYSTEM: ADR

MODULE Rectangles; (*NW 25.2.90 / 18.4.2013*)
.MODULE Rectangles (KEY 7C80275E, VERSION 1, SIZE 00000AE0)
.IMPORT Display (KEY 4C08D3EA)
.IMPORT Files (KEY 73F5D686)
.IMPORT Input (KEY 5DE391A8)
.IMPORT Texts (KEY 0B9E9984)
.IMPORT Fonts (KEY F4C9F557)
.IMPORT Oberon (KEY A89CCEE2)
.IMPORT Viewers (KEY 25ABF199)
.IMPORT Graphics (KEY F7357DD9)
.IMPORT Modules (KEY 41C6A19A)
.IMPORT GraphicFrames (KEY 84ABBF86)
.TYPEDESC 00000040 00000001 FFFFFFFF FFFFFFFF 00000014 00000018 FFFFFFFF
.DATA CH
.STRING TABLE SKIPPED
.POINTER_REFERENCES 1CH
.FIXUP T 1H
IMPORT SYSTEM, Display, Files, Input, Texts, Oberon, Graphics, GraphicFrames;
TYPE
Rectangle* = POINTER TO RectDesc;
RectDesc* = RECORD (Graphics.ObjectDesc)
lw*, vers*: INTEGER
END ;
VAR method*: Graphics.Method;
tack*, grey*: INTEGER;
PROCEDURE New*;
VAR r: Rectangle;
BEGINa NEW(r);b r.doc := method;d Graphics.New(r)e
0000a .PROC 1
0000a .PROC 5
0000a .COMMAND New
0000a(4EE90008): SUB SP, SP, 8H
0001a(AFE00000): STR LNK, SP, 0H
0002b(40E80004): ADD R0, SP, 4H
0003b .FIXUP D
0003b(8D000003): LDR SB, MT, MOD0 [Rectangles]
0004b(41D80000): ADD R1, SB, 0H [data]
0005b(D701760C): BL MT [trap=0, pos=374]
0006c(80E00004): LDR R0, SP, 4H
0007c .PROC 2
0007c(D1017B4C): BLEQ MT [trap=4, pos=379]
0008d .PROC 3
0008d .FIXUP D
0008d(8D000005): LDR SB, MT, MOD0 [Rectangles]
0009d .PROC 4
0009d(81D0001C): LDR R1, SB, 1CH [data]
000Ad(A1000014): STR R1, R0, 14H
000Be(80E00004): LDR R0, SP, 4H
ENDf New;
000Cf .FIXUP P
000Cf(F781500C): BL MOD8 [Graphics] PROC21
000Df(8FE00000): LDR LNK, SP, 0H
000Ef(4EE80008): ADD SP, SP, 8H
000Ff(C700000F): B LNK
PROCEDURE Copy(src, dst: Graphics.Object);
BEGINg dst.xh := src.xi;j dst.yk := src.yl;m dst.wn := src.wo;p dst.hq := src.hr;s dst.colt := src.colu;v
0010g(4EE9000C): SUB SP, SP, CH
0011g(AFE00000): STR LNK, SP, 0H
0012g(A0E00004): STR R0, SP, 4H
0013g(A1E00008): STR R1, SP, 8H
0014h(80E00008): LDR R0, SP, 8H
0015h(D101DD4C): BLEQ MT [trap=4, pos=477]
0016i(81E00004): LDR R1, SP, 4H
0017i(D101E64C): BLEQ MT [trap=4, pos=486]
0018j(81100000): LDR R1, R1, 0H
0019j(A1000000): STR R1, R0, 0H
001Ak(80E00008): LDR R0, SP, 8H
001Bk(D101ED4C): BLEQ MT [trap=4, pos=493]
001Cl(81E00004): LDR R1, SP, 4H
001Dl(D101F64C): BLEQ MT [trap=4, pos=502]
001Em(81100004): LDR R1, R1, 4H
001Fm(A1000004): STR R1, R0, 4H
0020n(80E00008): LDR R0, SP, 8H
0021n(D101FD4C): BLEQ MT [trap=4, pos=509]
0022o(81E00004): LDR R1, SP, 4H
0023o(D102064C): BLEQ MT [trap=4, pos=518]
0024p(81100008): LDR R1, R1, 8H
0025p(A1000008): STR R1, R0, 8H
0026q(80E00008): LDR R0, SP, 8H
0027q(D1020D4C): BLEQ MT [trap=4, pos=525]
0028r(81E00004): LDR R1, SP, 4H
0029r(D102164C): BLEQ MT [trap=4, pos=534]
002As(8110000C): LDR R1, R1, CH
002Bs(A100000C): STR R1, R0, CH
002Ct(80E00008): LDR R0, SP, 8H
002Dt(D1021F4C): BLEQ MT [trap=4, pos=543]
002Eu(81E00004): LDR R1, SP, 4H
002Fu(D1022A4C): BLEQ MT [trap=4, pos=554]
0030v(91100010): LDR R1, R1, 10H
0031v(B1000010): STR R1, R0, 10H
dst(Rectangle)w.lw := src(Rectangle)x.lw;y dst(Rectangle)z.vers := src(Rectangle)a.vers
0032w(80E00008): LDR R0, SP, 8H
0033w(E1000005): BEQ 5 [0039H]
0034w(810FFFF8): LDR R1, R0, FFFFFFF8H
0035w(81100004): LDR R1, R1, 4H
0036w .FIXUP D
0036w(8D00002E): LDR SB, MT, MOD0 [Rectangles]
0037w(42D80000): ADD R2, SB, 0H [data]
0038w(02290001): SUB R2, R2, R1
0039w(D9023E2C): BLNE MT [trap=2, pos=574]
003Ax(81E00004): LDR R1, SP, 4H
003Bx(E1000004): BEQ 4 [0040H]
003Cx(821FFFF8): LDR R2, R1, FFFFFFF8H
003Dx(82200004): LDR R2, R2, 4H
003Ex(43D80000): ADD R3, SB, 0H
003Fx(03390002): SUB R3, R3, R2
0040x(D902532C): BLNE MT [trap=2, pos=595]
0041y(8110001C): LDR R1, R1, 1CH
0042y(A100001C): STR R1, R0, 1CH
0043z(80E00008): LDR R0, SP, 8H
0044z(E1000004): BEQ 4 [0049H]
0045z(810FFFF8): LDR R1, R0, FFFFFFF8H
0046z(81100004): LDR R1, R1, 4H
0047z(42D80000): ADD R2, SB, 0H
0048z(02290001): SUB R2, R2, R1
0049z(D902662C): BLNE MT [trap=2, pos=614]
004Aa(81E00004): LDR R1, SP, 4H
004Ba(E1000004): BEQ 4 [0050H]
004Ca(821FFFF8): LDR R2, R1, FFFFFFF8H
004Da(82200004): LDR R2, R2, 4H
004Ea(43D80000): ADD R3, SB, 0H
004Fa(03390002): SUB R3, R3, R2
0050a(D9027D2C): BLNE MT [trap=2, pos=637]
ENDb Copy;
0051b(81100020): LDR R1, R1, 20H
0052b(A1000020): STR R1, R0, 20H
0053b(8FE00000): LDR LNK, SP, 0H
0054b(4EE8000C): ADD SP, SP, CH
0055b(C700000F): B LNK
PROCEDURE mark(f: GraphicFrames.Frame; col, x, y: INTEGER);
BEGINc GraphicFrames.ReplConst(f,d col,e x+1,f y+1,g 4,h 4,i 0)j
0056c(4EE90014): SUB SP, SP, 14H
0057c(AFE00000): STR LNK, SP, 0H
0058c(A0E00004): STR R0, SP, 4H
0059c(A1E00008): STR R1, SP, 8H
005Ac(A2E0000C): STR R2, SP, CH
005Bc(A3E00010): STR R3, SP, 10H
005Cd(80E00004): LDR R0, SP, 4H
005De(81E00008): LDR R1, SP, 8H
005Ef(82E0000C): LDR R2, SP, CH
005Ff(42280001): ADD R2, R2, 1H
0060g(83E00010): LDR R3, SP, 10H
0061g(43380001): ADD R3, R3, 1H
0062h(44000004): MOV R4, R0, 4H
0063i(45000004): MOV R5, R0, 4H
0064j(46000000): MOV R6, R0, 0H
ENDk mark;
0065k .FIXUP P
0065k(F7A16059): BL MOD10 [GraphicFrames] PROC22
0066k(8FE00000): LDR LNK, SP, 0H
0067k(4EE80014): ADD SP, SP, 14H
0068k(C700000F): B LNK
PROCEDURE Draw(obj: Graphics.Object; VAR M: Graphics.Msg);
VAR x, y, w, h, lw, col: INTEGER; f: GraphicFrames.Frame;
PROCEDUREl draw(f: GraphicFrames.Frame; col, x, y, w, h, lw: INTEGER);
0069l(E7000034): B 52 [009EH]
BEGINm
006Am(4EE90020): SUB SP, SP, 20H
006Bm(AFE00000): STR LNK, SP, 0H
006Cm(A0E00004): STR R0, SP, 4H
006Dm(A1E00008): STR R1, SP, 8H
006Em(A2E0000C): STR R2, SP, CH
006Fm(A3E00010): STR R3, SP, 10H
0070m(A4E00014): STR R4, SP, 14H
0071m(A5E00018): STR R5, SP, 18H
0072m(A6E0001C): STR R6, SP, 1CH
GraphicFrames.ReplConst(f,n col,o x,p y,q w,r lw,s Display.replace)t;u
0073n(80E00004): LDR R0, SP, 4H
0074o(81E00008): LDR R1, SP, 8H
0075p(82E0000C): LDR R2, SP, CH
0076q(83E00010): LDR R3, SP, 10H
0077r(84E00014): LDR R4, SP, 14H
0078s(85E0001C): LDR R5, SP, 1CH
0079t(46000000): MOV R6, R0, 0H
007Au .FIXUP P
007Au(F7A16015): BL MOD10 [GraphicFrames] PROC22
GraphicFrames.ReplConst(f,v col,w x+w-xlw,y y,z lw,a h,b Display.replace)c;d
007Bv(80E00004): LDR R0, SP, 4H
007Cw(81E00008): LDR R1, SP, 8H
007Dx(82E0000C): LDR R2, SP, CH
007Ex(83E00014): LDR R3, SP, 14H
007Fx(02280003): ADD R2, R2, R3
0080y(83E0001C): LDR R3, SP, 1CH
0081y(02290003): SUB R2, R2, R3
0082z(83E00010): LDR R3, SP, 10H
0083a(84E0001C): LDR R4, SP, 1CH
0084b(85E00018): LDR R5, SP, 18H
0085c(46000000): MOV R6, R0, 0H
0086d .FIXUP P
0086d(F7A1600C): BL MOD10 [GraphicFrames] PROC22
GraphicFrames.ReplConst(f,e col,f x,g y+h-hlw,i w,j lw,k Display.replace)l;m
0087e(80E00004): LDR R0, SP, 4H
0088f(81E00008): LDR R1, SP, 8H
0089g(82E0000C): LDR R2, SP, CH
008Ah(83E00010): LDR R3, SP, 10H
008Bh(84E00018): LDR R4, SP, 18H
008Ch(03380004): ADD R3, R3, R4
008Di(84E0001C): LDR R4, SP, 1CH
008Ei(03390004): SUB R3, R3, R4
008Fj(84E00014): LDR R4, SP, 14H
0090k(85E0001C): LDR R5, SP, 1CH
0091l(46000000): MOV R6, R0, 0H
0092m .FIXUP P
0092m(F7A1600C): BL MOD10 [GraphicFrames] PROC22
GraphicFrames.ReplConst(f,n col,o x,p y,q lw,r h,s Display.replace)t
0093n(80E00004): LDR R0, SP, 4H
0094o(81E00008): LDR R1, SP, 8H
0095p(82E0000C): LDR R2, SP, CH
0096q(83E00010): LDR R3, SP, 10H
0097r(84E0001C): LDR R4, SP, 1CH
0098s(85E00018): LDR R5, SP, 18H
0099t(46000000): MOV R6, R0, 0H
ENDu draw;
009Au .FIXUP P
009Au(F7A16008): BL MOD10 [GraphicFrames] PROC22
009Bu(8FE00000): LDR LNK, SP, 0H
009Cu(4EE80020): ADD SP, SP, 20H
009Du(C700000F): B LNK
BEGINv
009Ev(4EE9002C): SUB SP, SP, 2CH
009Fv(AFE00000): STR LNK, SP, 0H
00A0v(A0E00004): STR R0, SP, 4H
00A1v(A1E00008): STR R1, SP, 8H
00A2v(A2E0000C): STR R2, SP, CH
CASE M OF GraphicFrames.DrawMsg:w
00A3w(80E0000C): LDR R0, SP, CH
00A4w(80000004): LDR R0, R0, 4H
00A5w .FIXUP D
00A5w(8DA0006F): LDR SB, MT, MOD10 [GraphicFrames]
00A6w(41D80003): ADD R1, SB, VAR3
00A7w(01190000): SUB R1, R1, R0
00A8w(E9000084): BNE 132 [012DH]
x := obj.xx + M.x;y y := obj.yz + M.y;a w := obj.wb;c h := obj.hd;e f := M.f;f
00A9x(80E00004): LDR R0, SP, 4H
00AAx(D1054F4C): BLEQ MT [trap=4, pos=1359]
00ABy(80000000): LDR R0, R0, 0H
00ACy(81E00008): LDR R1, SP, 8H
00ADy(81100004): LDR R1, R1, 4H
00AEy(00080001): ADD R0, R0, R1
00AFy(A0E00010): STR R0, SP, 10H
00B0z(80E00004): LDR R0, SP, 4H
00B1z(D105614C): BLEQ MT [trap=4, pos=1377]
00B2a(80000004): LDR R0, R0, 4H
00B3a(81E00008): LDR R1, SP, 8H
00B4a(81100008): LDR R1, R1, 8H
00B5a(00080001): ADD R0, R0, R1
00B6a(A0E00014): STR R0, SP, 14H
00B7b(80E00004): LDR R0, SP, 4H
00B8b(D105734C): BLEQ MT [trap=4, pos=1395]
00B9c(80000008): LDR R0, R0, 8H
00BAc(A0E00018): STR R0, SP, 18H
00BBd(80E00004): LDR R0, SP, 4H
00BCd(D1057F4C): BLEQ MT [trap=4, pos=1407]
00BDe(8000000C): LDR R0, R0, CH
00BEe(A0E0001C): STR R0, SP, 1CH
00BFf(80E00008): LDR R0, SP, 8H
00C0f(80000000): LDR R0, R0, 0H
00C1f(A0E00028): STR R0, SP, 28H
lw := obj(Rectangle)g.lw;h
00C2g(80E00004): LDR R0, SP, 4H
00C3g(E1000005): BEQ 5 [00C9H]
00C4g(810FFFF8): LDR R1, R0, FFFFFFF8H
00C5g(81100004): LDR R1, R1, 4H
00C6g .FIXUP D
00C6g(8D000021): LDR SB, MT, MOD0 [Rectangles]
00C7g(42D80000): ADD R2, SB, 0H [data]
00C8g(02290001): SUB R2, R2, R1
00C9g(D905A52C): BLNE MT [trap=2, pos=1445]
00CAh(8000001C): LDR R0, R0, 1CH
00CBh(A0E00020): STR R0, SP, 20H
IF (x < f.X1i)j & (kx+w >l f.Xm)n & (oy < f.Y1p)q & (ry+h >s f.Yt)u THENv
00CCi(80E00028): LDR R0, SP, 28H
00CDi(D105BC4C): BLEQ MT [trap=4, pos=1468]
00CEj(81E00010): LDR R1, SP, 10H
00CFj(80000028): LDR R0, R0, 28H
00D0j(01190000): SUB R1, R1, R0
00D1k(ED00005B): BGE 91 [012DH]
00D2l(80E00010): LDR R0, SP, 10H
00D3l(81E00018): LDR R1, SP, 18H
00D4l(00080001): ADD R0, R0, R1
00D5m(81E00028): LDR R1, SP, 28H
00D6m(D105CA4C): BLEQ MT [trap=4, pos=1482]
00D7n(81100008): LDR R1, R1, 8H
00D8n(00090001): SUB R0, R0, R1
00D9o(E6000053): BLE 83 [012DH]
00DAp(80E00028): LDR R0, SP, 28H
00DBp(D105D74C): BLEQ MT [trap=4, pos=1495]
00DCq(81E00014): LDR R1, SP, 14H
00DDq(8000002C): LDR R0, R0, 2CH
00DEq(01190000): SUB R1, R1, R0
00DFr(ED00004D): BGE 77 [012DH]
00E0s(80E00014): LDR R0, SP, 14H
00E1s(81E0001C): LDR R1, SP, 1CH
00E2s(00080001): ADD R0, R0, R1
00E3t(81E00028): LDR R1, SP, 28H
00E4t(D105E54C): BLEQ MT [trap=4, pos=1509]
00E5u(8110000C): LDR R1, R1, CH
00E6u(00090001): SUB R0, R0, R1
00E7v(E6000045): BLE 69 [012DH]
IF M.col = Display.black THENw col := obj.colx ELSEy colz := M.col ENDa ;
00E8w(80E00008): LDR R0, SP, 8H
00E9w(8000000C): LDR R0, R0, CH
00EAw(E9000005): BNE 5 [00F0H]
00EBx(80E00004): LDR R0, SP, 4H
00ECx(D106204C): BLEQ MT [trap=4, pos=1568]
00EDy(90000010): LDR R0, R0, 10H
00EEy(A0E00024): STR R0, SP, 24H
00EFz(E7000003): B 3 [00F3H]
00F0a(80E00008): LDR R0, SP, 8H
00F1a(8000000C): LDR R0, R0, CH
00F2a(A0E00024): STR R0, SP, 24H
IF M.mode = 0 THENb
00F3b(80E00008): LDR R0, SP, 8H
00F4b(80000010): LDR R0, R0, 10H
00F5b(E9000012): BNE 18 [0108H]
draw(f,c col,d x,e y,f w,g h,h lw)i;j
00F6c(80E00028): LDR R0, SP, 28H
00F7d(81E00024): LDR R1, SP, 24H
00F8e(82E00010): LDR R2, SP, 10H
00F9f(83E00014): LDR R3, SP, 14H
00FAg(84E00018): LDR R4, SP, 18H
00FBh(85E0001C): LDR R5, SP, 1CH
00FCi(86E00020): LDR R6, SP, 20H
00FDj(F7FFFF6C): BL -148 [006AH]
IF obj.selectedk THENl mark(f,m Display.white,n x,o y)p ENDq
00FEk(80E00004): LDR R0, SP, 4H
00FFk(D106954C): BLEQ MT [trap=4, pos=1685]
0100l(90000011): LDR R0, R0, 11H
0101l(E1000005): BEQ 5 [0107H]
0102m(80E00028): LDR R0, SP, 28H
0103n(41000001): MOV R1, R0, 1H
0104o(82E00010): LDR R2, SP, 10H
0105p(83E00014): LDR R3, SP, 14H
0106q(F7FFFF4F): BL -177 [0056H]
ELSIF Mr.mode = 1 THENs mark(f,t Display.white,u x,v y)w (*normal -> selected*)
0107r(E7000025): B 37 [012DH]
0108s(80E00008): LDR R0, SP, 8H
0109s(80000010): LDR R0, R0, 10H
010As(40090001): SUB R0, R0, 1H
010Bs(E9000006): BNE 6 [0112H]
010Ct(80E00028): LDR R0, SP, 28H
010Du(41000001): MOV R1, R0, 1H
010Ev(82E00010): LDR R2, SP, 10H
010Fw(83E00014): LDR R3, SP, 14H
ELSIFx My.mode = 2 THENz mark(f,a Display.black,b x,c y)d (*selected -> normal*)
0110x(F7FFFF45): BL -187 [0056H]
0111y(E700001B): B 27 [012DH]
0112z(80E00008): LDR R0, SP, 8H
0113z(80000010): LDR R0, R0, 10H
0114z(40090002): SUB R0, R0, 2H
0115z(E9000006): BNE 6 [011CH]
0116a(80E00028): LDR R0, SP, 28H
0117b(41000000): MOV R1, R0, 0H
0118c(82E00010): LDR R2, SP, 10H
0119d(83E00014): LDR R3, SP, 14H
ELSIFe Mf.mode = 3 THENg draw(f,h Display.black,i x,j y,k w,l h,m lw)n;o mark(f,p Display.black,q x,r y)s (*erase*)
011Ae(F7FFFF3B): BL -197 [0056H]
011Bf(E7000011): B 17 [012DH]
011Cg(80E00008): LDR R0, SP, 8H
011Dg(80000010): LDR R0, R0, 10H
011Eg(40090003): SUB R0, R0, 3H
011Fg(E900000D): BNE 13 [012DH]
0120h(80E00028): LDR R0, SP, 28H
0121i(41000000): MOV R1, R0, 0H
0122j(82E00010): LDR R2, SP, 10H
0123k(83E00014): LDR R3, SP, 14H
0124l(84E00018): LDR R4, SP, 18H
0125m(85E0001C): LDR R5, SP, 1CH
0126n(86E00020): LDR R6, SP, 20H
0127o(F7FFFF42): BL -190 [006AH]
0128p(80E00028): LDR R0, SP, 28H
0129q(41000000): MOV R1, R0, 0H
012Ar(82E00010): LDR R2, SP, 10H
012Bs(83E00014): LDR R3, SP, 14H
ENDt
012Ct(F7FFFF29): BL -215 [0056H]
END
END
ENDu Draw;
012Du(8FE00000): LDR LNK, SP, 0H
012Eu(4EE8002C): ADD SP, SP, 2CH
012Fu(C700000F): B LNK
PROCEDURE Selectable(obj: Graphics.Object; x, y: INTEGER): BOOLEAN;
BEGINv
0130v(4EE90010): SUB SP, SP, 10H
0131v(AFE00000): STR LNK, SP, 0H
0132v(A0E00004): STR R0, SP, 4H
0133v(A1E00008): STR R1, SP, 8H
0134v(A2E0000C): STR R2, SP, CH
RETURN (obj.xw <= x)x & (yx <= obj.xz + 4)a & (bobj.yc <= y)d & (ey <= obj.yf + 4)g
0135w(80E00004): LDR R0, SP, 4H
0136w(D1085B4C): BLEQ MT [trap=4, pos=2139]
0137x(80000000): LDR R0, R0, 0H
0138x(81E00008): LDR R1, SP, 8H
0139x(00090001): SUB R0, R0, R1
013Ay(EE000016): BGT 22 [0151H]
013Bz(80E00004): LDR R0, SP, 4H
013Cz(D1086F4C): BLEQ MT [trap=4, pos=2159]
013Da(80000000): LDR R0, R0, 0H
013Ea(40080004): ADD R0, R0, 4H
013Fa(81E00008): LDR R1, SP, 8H
0140a(01190000): SUB R1, R1, R0
0141b(EE00000F): BGT 15 [0151H]
0142c(80E00004): LDR R0, SP, 4H
0143c(D1087D4C): BLEQ MT [trap=4, pos=2173]
0144d(80000004): LDR R0, R0, 4H
0145d(81E0000C): LDR R1, SP, CH
0146d(00090001): SUB R0, R0, R1
0147e(EE000009): BGT 9 [0151H]
0148f(80E00004): LDR R0, SP, 4H
0149f(D108914C): BLEQ MT [trap=4, pos=2193]
014Ag(80000004): LDR R0, R0, 4H
014Bg(40080004): ADD R0, R0, 4H
014Cg(81E0000C): LDR R1, SP, CH
014Dg(01190000): SUB R1, R1, R0
ENDh Selectable;
014Eh(EE000002): BGT 2 [0151H]
014Fh(40000001): MOV R0, R0, 1H
0150h(E7000001): B 1 [0152H]
0151h(40000000): MOV R0, R0, 0H
0152h(8FE00000): LDR LNK, SP, 0H
0153h(4EE80010): ADD SP, SP, 10H
0154h(C700000F): B LNK
PROCEDURE Change(obj: Graphics.Object; VAR M: Graphics.Msg);
VAR x0, y0, x1, y1, dx, dy: INTEGER; k: SET;
BEGINi
0155i(4EE9002C): SUB SP, SP, 2CH
0156i(AFE00000): STR LNK, SP, 0H
0157i(A0E00004): STR R0, SP, 4H
0158i(A1E00008): STR R1, SP, 8H
0159i(A2E0000C): STR R2, SP, CH
CASE M OF
Graphics.WidMsg:j obj(Rectangle)k.lw := M.w |l
015Aj(80E0000C): LDR R0, SP, CH
015Bj(80000004): LDR R0, R0, 4H
015Cj .FIXUP D
015Cj(8D800096): LDR SB, MT, MOD8 [Graphics]
015Dj(41D80003): ADD R1, SB, VAR3
015Ej(01190000): SUB R1, R1, R0
015Fj(E900000C): BNE 12 [016CH]
0160k(80E00004): LDR R0, SP, 4H
0161k(E1000005): BEQ 5 [0167H]
0162k(810FFFF8): LDR R1, R0, FFFFFFF8H
0163k(81100004): LDR R1, R1, 4H
0164k .FIXUP D
0164k(8D000008): LDR SB, MT, MOD0 [Rectangles]
0165k(42D80000): ADD R2, SB, 0H [data]
0166k(02290001): SUB R2, R2, R1
0167k(D909532C): BLNE MT [trap=2, pos=2387]
0168l(81E00008): LDR R1, SP, 8H
0169l(81100000): LDR R1, R1, 0H
016Al(A100001C): STR R1, R0, 1CH
Graphicsm.ColorMsg:n obj.colo := M.col
016Bm(E700000B): B 11 [0177H]
016Cn(80E0000C): LDR R0, SP, CH
016Dn(80000004): LDR R0, R0, 4H
016En .FIXUP D
016En(8D80000A): LDR SB, MT, MOD8 [Graphics]
016Fn(41D80004): ADD R1, SB, VAR4
0170n(01190000): SUB R1, R1, R0
0171n(E9000005): BNE 5 [0177H]
0172o(80E00004): LDR R0, SP, 4H
0173o(D1097E4C): BLEQ MT [trap=4, pos=2430]
ENDp
0174p(81E00008): LDR R1, SP, 8H
0175p(81100000): LDR R1, R1, 0H
0176p(B1000010): STR R1, R0, 10H
ENDq Change;
0177q(8FE00000): LDR LNK, SP, 0H
0178q(4EE8002C): ADD SP, SP, 2CH
0179q(C700000F): B LNK
PROCEDURE Read(obj: Graphics.Object; VAR R: Files.Rider; VAR C: Graphics.Context);
VAR b: BYTE; len: INTEGER;
BEGINr Files.ReadByte(R,s b)t;u (*len*);
017Ar(4EE90020): SUB SP, SP, 20H
017Br(AFE00000): STR LNK, SP, 0H
017Cr(A0E00004): STR R0, SP, 4H
017Dr(A1E00008): STR R1, SP, 8H
017Er(A2E0000C): STR R2, SP, CH
017Fr(A3E00010): STR R3, SP, 10H
0180r(A4E00014): STR R4, SP, 14H
0181s(80E00008): LDR R0, SP, 8H
0182s(81E0000C): LDR R1, SP, CH
0183t(42E80018): ADD R2, SP, 18H
0184u .FIXUP P
0184u(F720E0EA): BL MOD2 [Files] PROC14
Files.ReadByte(R,v b)w;x obj(Rectangle)y.lw := b;z
0185v(80E00008): LDR R0, SP, 8H
0186v(81E0000C): LDR R1, SP, CH
0187w(42E80018): ADD R2, SP, 18H
0188x .FIXUP P
0188x(F720E004): BL MOD2 [Files] PROC14
0189y(80E00004): LDR R0, SP, 4H
018Ay(E1000005): BEQ 5 [0190H]
018By(810FFFF8): LDR R1, R0, FFFFFFF8H
018Cy(81100004): LDR R1, R1, 4H
018Dy .FIXUP D
018Dy(8D00001F): LDR SB, MT, MOD0 [Rectangles]
018Ey(42D80000): ADD R2, SB, 0H [data]
018Fy(02290001): SUB R2, R2, R1
0190y(D90A622C): BLNE MT [trap=2, pos=2658]
0191z(91E00018): LDR R1, SP, 18H
0192z(A100001C): STR R1, R0, 1CH
Files.ReadByte(R,a b)b;c obj(Rectangle)d.vers := b;e
0193a(80E00008): LDR R0, SP, 8H
0194a(81E0000C): LDR R1, SP, CH
0195b(42E80018): ADD R2, SP, 18H
0196c .FIXUP P
0196c(F720E00E): BL MOD2 [Files] PROC14
0197d(80E00004): LDR R0, SP, 4H
0198d(E1000005): BEQ 5 [019EH]
0199d(810FFFF8): LDR R1, R0, FFFFFFF8H
019Ad(81100004): LDR R1, R1, 4H
019Bd .FIXUP D
019Bd(8D00000E): LDR SB, MT, MOD0 [Rectangles]
019Cd(42D80000): ADD R2, SB, 0H [data]
019Dd(02290001): SUB R2, R2, R1
019Ed(D90A942C): BLNE MT [trap=2, pos=2708]
019Fe(91E00018): LDR R1, SP, 18H
01A0e(A1000020): STR R1, R0, 20H
ENDf Read;
01A1f(8FE00000): LDR LNK, SP, 0H
01A2f(4EE80020): ADD SP, SP, 20H
01A3f(C700000F): B LNK
PROCEDURE Write(obj: Graphics.Object; cno: INTEGER; VAR W: Files.Rider; VAR C: Graphics.Context);
BEGINg Graphics.WriteObj(W,h cno,i obj)j;k Files.WriteByte(W,l 2)m;n
01A4g(4EE9001C): SUB SP, SP, 1CH
01A5g(AFE00000): STR LNK, SP, 0H
01A6g(A0E00004): STR R0, SP, 4H
01A7g(A1E00008): STR R1, SP, 8H
01A8g(A2E0000C): STR R2, SP, CH
01A9g(A3E00010): STR R3, SP, 10H
01AAg(A4E00014): STR R4, SP, 14H
01ABg(A5E00018): STR R5, SP, 18H
01ACh(80E0000C): LDR R0, SP, CH
01ADh(81E00010): LDR R1, SP, 10H
01AEi(82E00008): LDR R2, SP, 8H
01AFj(83E00004): LDR R3, SP, 4H
01B0k .FIXUP P
01B0k(F782401A): BL MOD8 [Graphics] PROC36
01B1l(80E0000C): LDR R0, SP, CH
01B2l(81E00010): LDR R1, SP, 10H
01B3m(42000002): MOV R2, R0, 2H
01B4n .FIXUP P
01B4n(F7216004): BL MOD2 [Files] PROC22
Files.WriteByte(W,o obj(Rectangle)p.lw)q;r Files.WriteByte(W,s obj(Rectangle)t.vers)u
01B5o(80E0000C): LDR R0, SP, CH
01B6o(81E00010): LDR R1, SP, 10H
01B7p(82E00004): LDR R2, SP, 4H
01B8p(E1000005): BEQ 5 [01BEH]
01B9p(832FFFF8): LDR R3, R2, FFFFFFF8H
01BAp(83300004): LDR R3, R3, 4H
01BBp .FIXUP D
01BBp(8D000020): LDR SB, MT, MOD0 [Rectangles]
01BCp(44D80000): ADD R4, SB, 0H [data]
01BDp(04490003): SUB R4, R4, R3
01BEp(D90B752C): BLNE MT [trap=2, pos=2933]
01BFq(8220001C): LDR R2, R2, 1CH
01C0r .FIXUP P
01C0r(F721600C): BL MOD2 [Files] PROC22
01C1s(80E0000C): LDR R0, SP, CH
01C2s(81E00010): LDR R1, SP, 10H
01C3t(82E00004): LDR R2, SP, 4H
01C4t(E1000005): BEQ 5 [01CAH]
01C5t(832FFFF8): LDR R3, R2, FFFFFFF8H
01C6t(83300004): LDR R3, R3, 4H
01C7t .FIXUP D
01C7t(8D00000C): LDR SB, MT, MOD0 [Rectangles]
01C8t(44D80000): ADD R4, SB, 0H [data]
01C9t(04490003): SUB R4, R4, R3
01CAt(D90B9C2C): BLNE MT [trap=2, pos=2972]
01CBu(82200020): LDR R2, R2, 20H
ENDv Write;
01CCv .FIXUP P
01CCv(F721600C): BL MOD2 [Files] PROC22
01CDv(8FE00000): LDR LNK, SP, 0H
01CEv(4EE8001C): ADD SP, SP, 1CH
01CFv(C700000F): B LNK
(* PROCEDURE Print(obj: Graphics.Object; x, y: INTEGER);
VAR w, h, lw, s: INTEGER;
BEGIN INC(x, obj.x * 4); INC(y, obj.y * 4); w := obj.w * 4; h := obj.h * 4;
lw := obj(Rectangle).lw * 2; s := obj(Rectangle).vers;
Printer.ReplConst(x, y, w, lw);
Printer.ReplConst(x+w-lw, y, lw, h);
Printer.ReplConst(x, y+h-lw, w, lw);
Printer.ReplConst(x, y, lw, h);
IF s > 0 THEN Printer.ReplPattern(x, y, w, h, s) END
END Print; *)
PROCEDURE Make*; (*command*)
VAR x0, x1, y0, y1: INTEGER;
R: Rectangle;
G: GraphicFrames.Frame;
BEGINw G := GraphicFrames.Focus();x
01D0w .PROC 6
01D0w .COMMAND Make
01D0w(4EE9001C): SUB SP, SP, 1CH
01D1w(AFE00000): STR LNK, SP, 0H
01D2x .FIXUP P
01D2x(F7A09006): BL MOD10 [GraphicFrames] PROC9
01D3x(A0E00018): STR R0, SP, 18H
IF (G # NIL)y & (zG.marka.next # NIL)b THENc
01D4y(80E00018): LDR R0, SP, 18H
01D5z(E100006B): BEQ 107 [0241H]
01D6a(80E00018): LDR R0, SP, 18H
01D7a(D10E264C): BLEQ MT [trap=4, pos=3622]
01D8b(80000048): LDR R0, R0, 48H
01D9c(E1000067): BEQ 103 [0241H]
GraphicFrames.Deselect(G)d;e
01DAd(80E00018): LDR R0, SP, 18H
01DBe .FIXUP P
01DBe(F7A12009): BL MOD10 [GraphicFrames] PROC18
x0 := G.markf.x;g y0 := G.markh.y;i x1 := G.markj.next.xk;l y1 := G.markm.next.yn;o
01DCf(80E00018): LDR R0, SP, 18H
01DDf(D10E6B4C): BLEQ MT [trap=4, pos=3691]
01DEg(80000040): LDR R0, R0, 40H
01DFg(A0E00004): STR R0, SP, 4H
01E0h(80E00018): LDR R0, SP, 18H
01E1h(D10E7B4C): BLEQ MT [trap=4, pos=3707]
01E2i(80000044): LDR R0, R0, 44H
01E3i(A0E0000C): STR R0, SP, CH
01E4j(80E00018): LDR R0, SP, 18H
01E5j(D10E8B4C): BLEQ MT [trap=4, pos=3723]
01E6k(80000048): LDR R0, R0, 48H
01E7k(D10E924C): BLEQ MT [trap=4, pos=3730]
01E8l(80000000): LDR R0, R0, 0H
01E9l(A0E00008): STR R0, SP, 8H
01EAm(80E00018): LDR R0, SP, 18H
01EBm(D10EA04C): BLEQ MT [trap=4, pos=3744]
01ECn(80000048): LDR R0, R0, 48H
01EDn(D10EA74C): BLEQ MT [trap=4, pos=3751]
01EEo(80000004): LDR R0, R0, 4H
01EFo(A0E00010): STR R0, SP, 10H
NEW(R);p R.colq := Oberon.CurCol;r
01F0p(40E80014): ADD R0, SP, 14H
01F1p .FIXUP D
01F1p(8D00002A): LDR SB, MT, MOD0 [Rectangles]
01F2p(41D80000): ADD R1, SB, 0H [data]
01F3p(D70EB60C): BL MT [trap=0, pos=3766]
01F4q(80E00014): LDR R0, SP, 14H
01F5q(D10EBC4C): BLEQ MT [trap=4, pos=3772]
01F6r .FIXUP D
01F6r(8D600005): LDR SB, MT, MOD6 [Oberon]
01F7r(81D00010): LDR R1, SB, VAR16
01F8r(B1000010): STR R1, R0, 10H
R.ws := ABS(x1-x0)t;u R.hv := ABS(y1-y0)w;x
01F9s(80E00014): LDR R0, SP, 14H
01FAs(D10ED84C): BLEQ MT [trap=4, pos=3800]
01FBt(81E00008): LDR R1, SP, 8H
01FCt(82E00004): LDR R2, SP, 4H
01FDt(01190002): SUB R1, R1, R2
01FEu(41190000): SUB R1, R1, 0H
01FFu(ED000002): BGE 2 [0202H]
0200u(42000000): MOV R2, R0, 0H
0201u(01290001): SUB R1, R2, R1
0202u(A1000008): STR R1, R0, 8H
0203v(80E00014): LDR R0, SP, 14H
0204v(D10EEB4C): BLEQ MT [trap=4, pos=3819]
0205w(81E00010): LDR R1, SP, 10H
0206w(82E0000C): LDR R2, SP, CH
0207w(01190002): SUB R1, R1, R2
0208x(41190000): SUB R1, R1, 0H
0209x(ED000002): BGE 2 [020CH]
020Ax(42000000): MOV R2, R0, 0H
020Bx(01290001): SUB R1, R2, R1
020Cx(A100000C): STR R1, R0, CH
IF x1 < x0 THENy x0 := x1 ENDz ;
020Dy(80E00008): LDR R0, SP, 8H
020Ey(81E00004): LDR R1, SP, 4H
020Fy(00090001): SUB R0, R0, R1
0210y(ED000002): BGE 2 [0213H]
0211z(80E00008): LDR R0, SP, 8H
0212z(A0E00004): STR R0, SP, 4H
IF y1 < y0 THENa y0 := y1 ENDb ;
0213a(80E00010): LDR R0, SP, 10H
0214a(81E0000C): LDR R1, SP, CH
0215a(00090001): SUB R0, R0, R1
0216a(ED000002): BGE 2 [0219H]
0217b(80E00010): LDR R0, SP, 10H
0218b(A0E0000C): STR R0, SP, CH
R.xc := x0 - G.xd;e R.yf := y0 - G.yg;h
0219c(80E00014): LDR R0, SP, 14H
021Ac(D10F4E4C): BLEQ MT [trap=4, pos=3918]
021Bd(81E00018): LDR R1, SP, 18H
021Cd(D10F5A4C): BLEQ MT [trap=4, pos=3930]
021De(82E00004): LDR R2, SP, 4H
021Ee(81100030): LDR R1, R1, 30H
021Fe(01290001): SUB R1, R2, R1
0220e(A1000000): STR R1, R0, 0H
0221f(80E00014): LDR R0, SP, 14H
0222f(D10F5F4C): BLEQ MT [trap=4, pos=3935]
0223g(81E00018): LDR R1, SP, 18H
0224g(D10F6B4C): BLEQ MT [trap=4, pos=3947]
0225h(82E0000C): LDR R2, SP, CH
0226h(81100034): LDR R1, R1, 34H
0227h(01290001): SUB R1, R2, R1
0228h(A1000004): STR R1, R0, 4H
R.lwi := Graphics.width;j R.versk := 0;l R.dom := method;n
0229i(80E00014): LDR R0, SP, 14H
022Ai(D10F774C): BLEQ MT [trap=4, pos=3959]
022Bj .FIXUP D
022Bj(8D800035): LDR SB, MT, MOD8 [Graphics]
022Cj(81D0000F): LDR R1, SB, VAR15
022Dj(A100001C): STR R1, R0, 1CH
022Ek(80E00014): LDR R0, SP, 14H
022Fk(D10F914C): BLEQ MT [trap=4, pos=3985]
0230l(41000000): MOV R1, R0, 0H
0231l(A1000020): STR R1, R0, 20H
0232m(80E00014): LDR R0, SP, 14H
0233m(D10F9C4C): BLEQ MT [trap=4, pos=3996]
0234n .FIXUP D
0234n(8D000009): LDR SB, MT, MOD0 [Rectangles]
0235n(81D0001C): LDR R1, SB, 1CH [data]
0236n(A1000014): STR R1, R0, 14H
Graphics.Add(G.grapho,p R)q;r
0237o(80E00018): LDR R0, SP, 18H
0238o(D10FC24C): BLEQ MT [trap=4, pos=4034]
0239p(8000001C): LDR R0, R0, 1CH
023Aq(81E00014): LDR R1, SP, 14H
023Br .FIXUP P
023Br(F7816060): BL MOD8 [Graphics] PROC22
GraphicFrames.Defocus(G)s;t GraphicFrames.DrawObj(G,u R)v
023Cs(80E00018): LDR R0, SP, 18H
023Dt .FIXUP P
023Dt(F7A11002): BL MOD10 [GraphicFrames] PROC17
023Eu(80E00018): LDR R0, SP, 18H
023Fv(81E00014): LDR R1, SP, 14H
ENDw
0240w .FIXUP P
0240w(F7A0E003): BL MOD10 [GraphicFrames] PROC14
ENDx Make;
0241x(8FE00000): LDR LNK, SP, 0H
0242x(4EE8001C): ADD SP, SP, 1CH
0243x(C700000F): B LNK
BEGINy NEW(method);z
0244y .PROC 0
0244y .ENTRYPOINT
0244y(4EE90004): SUB SP, SP, 4H
0245y(AFE00000): STR LNK, SP, 0H
0246z .FIXUP D
0246z(8D000012): LDR SB, MT, MOD0 [Rectangles]
0247z(40D8001C): ADD R0, SB, 1CH [data]
0248z .FIXUP D
0248z(8D800002): LDR SB, MT, MOD8 [Graphics]
0249z(41D8000B): ADD R1, SB, VAR11
024Az(D7102B0C): BL MT [trap=0, pos=4139]
method.modulea := "Rectangles";b method.allocatorc := "New";d
024Ba .FIXUP D
024Ba(8D000003): LDR SB, MT, MOD0 [Rectangles]
024Ca(80D0001C): LDR R0, SB, 1CH [data]
024Da(D1103B4C): BLEQ MT [trap=4, pos=4155]
024Eb(41D80028): ADD R1, SB, 28H
024Fb(82100000): LDR R2, R1, 0H
0250b(41180004): ADD R1, R1, 4H
0251b(A2000000): STR R2, R0, 0H
0252b(40080004): ADD R0, R0, 4H
0253b(42220018): ASR R2, R2, 18H
0254b(E9FFFFFA): BNE -6 [024FH]
0255c(80D0001C): LDR R0, SB, 1CH
0256c(D1105D4C): BLEQ MT [trap=4, pos=4189]
0257d(40080020): ADD R0, R0, 20H
0258d(41D80034): ADD R1, SB, 34H
0259d(82100000): LDR R2, R1, 0H
025Ad(41180004): ADD R1, R1, 4H
025Bd(A2000000): STR R2, R0, 0H
025Cd(40080004): ADD R0, R0, 4H
025Dd(42220018): ASR R2, R2, 18H
025Ed(E9FFFFFA): BNE -6 [0259H]
method.newe := New;f method.copyg := Copy;h method.drawi := Draw;j
025Fe(80D0001C): LDR R0, SB, 1CH
0260e(D110744C): BLEQ MT [trap=4, pos=4212]
0261f(F7000000): BL 0 [0262H]
0262f(41F90988): SUB R1, LNK, 988H
0263f(A1000040): STR R1, R0, 40H
0264g(80D0001C): LDR R0, SB, 1CH
0265g(D110884C): BLEQ MT [trap=4, pos=4232]
0266h(F7000000): BL 0 [0267H]
0267h(41F9095C): SUB R1, LNK, 95CH
0268h(A1000044): STR R1, R0, 44H
0269i(80D0001C): LDR R0, SB, 1CH
026Ai(D1109D4C): BLEQ MT [trap=4, pos=4253]
026Bj(F7000000): BL 0 [026CH]
026Cj(41F90738): SUB R1, LNK, 738H
026Dj(A1000048): STR R1, R0, 48H
method.selectablek := Selectable;l method.changem := Change;n
026Ek(80D0001C): LDR R0, SB, 1CH
026Fk(D110BA4C): BLEQ MT [trap=4, pos=4282]
0270l(F7000000): BL 0 [0271H]
0271l(41F90504): SUB R1, LNK, 504H
0272l(A1000050): STR R1, R0, 50H
0273m(80D0001C): LDR R0, SB, 1CH
0274m(D110D74C): BLEQ MT [trap=4, pos=4311]
0275n(F7000000): BL 0 [0276H]
0276n(41F90484): SUB R1, LNK, 484H
0277n(A100004C): STR R1, R0, 4CH
method.reado := Read;p method.writeq := Write;r (*method.print := Print*)
0278o(80D0001C): LDR R0, SB, 1CH
0279o(D110F04C): BLEQ MT [trap=4, pos=4336]
027Ap(F7000000): BL 0 [027BH]
027Bp(41F90404): SUB R1, LNK, 404H
027Cp(A1000054): STR R1, R0, 54H
027Dq(80D0001C): LDR R0, SB, 1CH
027Eq(D111064C): BLEQ MT [trap=4, pos=4358]
027Fr(F7000000): BL 0 [0280H]
0280r(41F90370): SUB R1, LNK, 370H
0281r(A1000058): STR R1, R0, 58H
tack := SYSTEM.ADR($0707 4122 1408 1422 4100$);s
0282s(40D80038): ADD R0, SB, 38H
0283s(A0D00020): STR R0, SB, 20H
grey := SYSTEM.ADR($2004 0000 1111 1111 0000 0000 4444 4444 0000 0000$)
ENDt Rectangles.u
0284t(40D80044): ADD R0, SB, 44H
0285t(A0D00024): STR R0, SB, 24H
0286u(8FE00000): LDR LNK, SP, 0H
0287u(4EE80004): ADD SP, SP, 4H
0288u(C700000F): B LNK