:.MEGR2.0
:"Pic1"→Str1
:"Pic2"
:[00]
:"Pic3"
:[00]
:"Pic4"
:[00]
:"Pic5"
:[00]
:"Pic6"
:[00]
:"Pic7"
:[00]
:"Pic8"
:[00]
:"Pic9"
:[00]
:":PIC →Str14
:"MEGR2.0 DRAW :→Str15
:"1:NEW→Str16
:"2:LOOK→Str17
:"3:CHANGE→Str18
:"4:LOOK GRAYSCALE→Str19
:"CLR:QUIT→Str20
:0→Q→F→E→H→W→R→G
:1→I→T
:31→X+16→Y
:ClrHome
:ClrDraw
:ClrDraw<sup>r</sup>
:Repeat getKey(15)
:Text(0,0,Str15
:Text(0,14,Str16
:Text(0,21,Str17
:Text(0,28,Str18
:Text(0,35,Str19
:Text(0,42,Str20
:If getKey(34) or getKey(26) or getKey(18) or getKey(35)
:If getKey(34)
:sub(GO)
:sub(A
:End
:If getKey(26)
:sub(GO)
:2→G
:sub(B
:End
:If getKey(18)
:sub(GO)
:1→G→Q
:sub(B
:End
:If getKey(35)
:sub(B
:End
:ClrDraw<sup>r</sup>
:ClrDraw
:ClrHome
:End
:End
:Return
:
:Lbl B
:ClrHome
:Repeat E=9
:E+1→E
:F+6→F
:Text(0,F,E►Dec,Str14,E►Dec
:End
:0→E→F
:Repeat I≠1
:sub(I)
:End
:UnArchive Str1+I
:If GetCalc(Str1+I)
:GetCalc(Str1+I,768)→R
:R→DispGraph
:
:StoreGDB
:!If G
:StorePic
:Archive Str1+I
:1→I→G
:Repeat getKey(9)
:End
:Goto B
:End
:Else
:Output(0,0,"ERROR
:Repeat getKey(9)
:End
:1→I
:Return
:End
:Archive Str1+I
:1→I
:!If Q=1
:Repeat getKey(9)
:If G=2
:DispGraph
:Else
:DispGraph<sup>r</sup>
:End
:End
:0→G→Q
:Return
:Else
:ClrHome
:0→G→Q
:End
:
:Lbl A
:Repeat getKey(48)
:Pxl-On(X,Y)
:DispGraph
:sub(I
:If I≠1
:Pxl-Off(X,Y)
:DispGraph
:StoreGDB
:GetCalc(Str1+I,768)→A
:conj(L<sub>6</sub>,A,768)
:Archive Str1+I
:1→I
:End
:If getKey(53) or getKey(52)
:If getKey(53)
:1→R
:End
:If getKey(52)
:0→R
:End
:While getKey(53)
:sub(R
:End
:While getKey(52)
:sub(R
:End
:If R
:ref(X,Y,W,H)
:End
:!If R
:rref(X,Y,W,H)
:End
:0→W→H
:End
:!If getKey(54)
:Pxl-Off(X,Y)
:End
:If getKey(15)
:ClrHome
:ClrDraw
:ClrDraw<sup>r</sup>
:End
:sub(T
:If getKey(1) and (Y≠63
:Y+1→Y
:End
:If getKey(2) and (X≠0
:X-1→X
:End
:If getKey(3) and (X≠95
:X+1→X
:End
:If getKey(4) and (Y≠0
:Y-1→Y
:End
:End
:Goto GO
:
:Lbl R
:ClrDraw<sup>r</sup>
:StorePic
:If R
:ref(X,Y,W,H)<sup>r</sup>
:End
:!If R
:rref(X,Y,W,H)<sup>r</sup>
:End
:DispGraph<sup>r</sup>
:sub(T
:If getKey(1) and ((H+Y)≠63
:H+1→H
:End
:If getKey(2) and (W≠0
:W-1→W
:End
:If getKey(3) and ((X+W)≠95
:W+1→W
:End
:If getKey(4) and (H≠0
:H-1→H
:End
:Return
:
:Lbl T
:If getKey(47)
:1→T
:End
:If getKey(39)
:50→T
:End
:If getKey(31)
:100→T
:End
:If getKey(23)
:200→T
:End
:Pause T
:Return
:
:Lbl I
:If getKey(34)
:0→I
:End
:If getKey(26)
:4→I
:End
:If getKey(18)
:8→I
:End
:If getKey(35)
:12→I
:End
:If getKey(27)
:16→I
:End
:If getKey(19)
:20→I
:End
:If getKey(36)
:24→I
:End
:If getKey(28)
:28→I
:End
:If getKey(20)
:32→I
:End
:
:Lbl GO
:Repeat getKey(0)
:End