Home » Archimedes archive » Micro User » MU 1991-07.adf » PD-Stuff » Utilities/!Xchanger/!RunImage

Utilities/!Xchanger/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Micro User » MU 1991-07.adf » PD-Stuff
Filename: Utilities/!Xchanger/!RunImage
Read OK:
File size: 14D6 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20REM By Ewen Roberts (Nomen Nostri) 1990 completed Mon. 18/6/90
   30REM Program converts between currencies/number bases version A 0.03
   40REM This program would be a hell of a lot shorter if you could convert
   50REM directly to Binary in BASIC. Listen up Acorn!
   60REM Late thanks to B. McDermott for his Decimal to Binary converter.
   70:
   80DIM block% &200
   90DIM text1% &20,text2% &20,text3% &20,answer% &20,val% &20,val2% &20,text4% &20,text5% &20,text6% &20,text7% &20,text8% &20,text% &20
  100$text1%="To Sterling":$text3%="10":$text%="From Sterling":$text2%="0":conv$="�":$val%="A0-9.":$val2%="A0-9.":$text4%="To Hexadecimal":$text5%="From Hexadec.":$text6%="To Binary":$text7%="From Binary":$text8%="Calculate":$answer%="0"
  110ON ERROR PROCerror:END
  120:
  130quit%=FALSE
  140$block%="TASK"
  150REM >>>> initialise Window.
  160SYS "Wimp_Initialise",200,!block%,"Exchanger" TO version%,task%
  170REM >>>> actually create window and get window handle.
  180REM x,y,width,height,extx%,exty%
  190REM extx% & exty% are hidden bits
  200whandle%=FNcreate(200,200,500,530,0,0)
  210REM Icons: see RISC User 1990
  220i2handle%=FNicon(whandle%,4,-200,230,48,&821B53D,"",text1%,-1,&20)
  230i3handle%=FNicon(whandle%,4,-60,200,48,&800F53D,"",text2%,val2%,&20)
  240i4handle%=FNicon(whandle%,4,-120,100,48,&800F53D,"",text3%,val%,&20)
  250i5handle%=FNicon(whandle%,240,-200,250,48,&801B53D,"",text%,-1,&20)
  260i6handle%=FNicon(whandle%,4,-260,230,48,&801B53D,"",text4%,-1,&20)
  270i7handle%=FNicon(whandle%,240,-260,250,48,&801B53D,"",text5%,-1,&20)
  280i8handle%=FNicon(whandle%,4,-320,230,48,&801B53D,"",text6%,-1,&20)
  290i9handle%=FNicon(whandle%,240,-320,250,48,&801B53D,"",text7%,-1,&20)
  300i1handle%=FNicon(whandle%,4,-420,150,48,&800353D,"",text8%,-1,&20)
  310i10handle%=FNicon(whandle%,40,-480,400,48,&7B00053D,"",answer%,-1,&20)
  320block%!0=whandle%
  330SYS "Wimp_GetWindowState",,block%
  340SYS "Wimp_OpenWindow",,block%
  350REM  >>> WIMP POLL
  360ONERROR IF FNwimperror THEN END
  370REPEAT
  380PROCpoll
  390UNTIL quit%
  400$block%="TASK"
  410SYS"Wimp_CloseDown",task%,!block%
  420END:REM oh no! it's the end
  430:
  440DEFPROCpoll
  450SYS"Wimp_Poll",,block% TO reason%
  460CASE reason% OF
  470WHEN 1   :PROCredraw
  480WHEN 2   :!block%=whandle%:SYS"Wimp_OpenWindow",,block%
  490WHEN 3   :quit%=TRUE
  500WHEN 6   :PROCdealwithIcon
  510WHEN 17,18:IF block%!16=0 THEN quit%=TRUE
  520ENDCASE
  530ENDPROC
  540:
  550DEFFNcreate(vwx%,vwy%,vww%,vwh%,extx%,exty%)
  560$block%=STRING$(88,CHR$0):REM Clr (your guess is as good as mine)
  570REM the bit you see
  580block%!0=vwx%        :REM x1
  590block%!4=vwy%        :REM y1
  600block%!8=vwx%+vww%   :REM x2
  610block%!12=vwy%+vwh%  :REM y2
  620block%!24=-1:REMNo winds above?
  630block%!28=&FF00000F:REM WINDOW FLAG
  640REM WINDOW COLOURS
  650block%?32=7
  660block%?33=1
  670block%?34=1 :REM Work area colour
  680block%?35=2 :REM Work area bcg
  690block%?36=3  :REM Scroll bar bcg
  700block%?37=1  :REM Title bar fgnd
  710block%?38=12
  720REM Work area extent
  730block%!40=0  :REM WAE x1
  740block%!44=-vwh%-exty%
  750block%!48=vww%+extx%
  760block%!52=0
  770block%!56=&3D
  780block%!60=3<<12
  790$(block%+72)="Exchanger"
  800SYS"Wimp_CreateWindow",,block% TO handle%
  810=handle%
  820:
  830DEFPROCredraw
  840block%!0=whandle%
  850SYS "Wimp_RedrawWindow",,block% TO more%
  860PROCgetorigin(block%,x0%,y0%)
  870WHILE more%
  880PROCdraw(x0%,y0%)
  890SYS"Wimp_GetRectangle",,block% TO more%
  900ENDWHILE
  910ENDPROC
  920:
  930DEFPROCgetorigin(block%, RETURN x0%, RETURN y0%)
  940x0%=block%!4-block%!20
  950y0%=block%!16-block%!24
  960ENDPROC
  970:
  980DEFPROCdraw(x0%,y0%)
  990SYS"Wimp_SetColour",7
 1000MOVE x0%+200,y0%-90:PRINT;"< Exchange rate"
 1010MOVE x0%+240,y0%-25:PRINT;"< Money (Start)"
 1020MOVE x0%+40,y0%-330:PRINT;"Default base is Decimal"
 1030MOVE x0%+180,y0%-385:PRINT;"<Click to Calculate"
 1040MOVE x0%+180,y0%-485:PRINT;"^Answer^"
 1050ENDPROC
 1060:
 1070DEFPROCclose
 1080$block%="TASK"
 1090SYS"Wimp_CloseDown",task%,!block%
 1100ENDPROC
 1110:
 1120DEFPROCerror
 1130ONERROR OFF
 1140$block%="TASK"
 1150SYS"Wimp_CloseDown",task%,!block%
 1160PRINT REPORT$;" at line ";ERL
 1170ENDPROC
 1180:
 1190DEFFNWimperror
 1200!block%=ERR
 1210$(block%+4)=REPORT$+" at line "+STR$ERL+CHR$0
 1220SYS "Wimp_ReportError",block%,3,"Converter" TO ,response%
 1230IF response%=2 THEN PROCclose :=TRUE ELSE =FALSE
 1240:
 1250DEFFNicon(whandle%,ix%,iy%,iw%,ih%,flag%,text$,d1%,d2%,d3%)
 1260block%!0=whandle%
 1270block%!4=ix%:block%!8=iy%
 1280block%!12=ix%+iw%
 1290block%!16=iy%+ih%
 1300block%!20=flag%
 1310IF d1%=0 THEN
 1320 $(block%+24)=text$
 1330ELSE
 1340 block%!24=d1%:block%!28=d2%
 1350 block%!32=d3%
 1360ENDIF
 1370SYS"Wimp_CreateIcon",,block% TO ihandle%
 1380=ihandle%
 1390:
 1400REM >>>> Selects Mode:
 1410DEFPROCdealwithIcon
 1420IF block%!16=i1handle% THEN $answer%=FNconvert($text2%,$text3%,conv$):SYS"Wimp_ForceRedraw",whandle%,0,-600,400,0
 1430$val2%="A0-9."
 1440IF block%!16=i2handle% conv$="�"
 1450IF block%!16=i5handle% conv$="?"
 1460IF block%!16=i6handle% conv$="~"
 1470IF block%!16=i7handle% conv$="&":$val2%="A0-9A-F."
 1480IF block%!16=i8handle% conv$="("
 1490IF block%!16=i9handle% conv$="%"
 1500ENDPROC
 1510:
 1520DEFFNconvert(no$,fac$,fd$)
 1530LOCAL A,A$:A=200:A$=""
 1540figure=VAL(no$):fact=VAL(fac$)
 1550IF fd$="&" THEN A=EVAL("&"+no$)
 1560IF fd$="�" THEN A=figure/fact
 1570IF fd$="?" THEN A=figure*fact
 1580IF fd$="%" THEN A=EVAL("%"+no$)
 1590IF fd$="(" $answer%="":=FNDTB(no$)
 1600IF fd$="~" $answer%="":=FNDTH(no$)
 1610=STR$(A)
 1620:
 1630DEFFNDTB(con$)
 1640LOCAL con,Z,I,C$
 1650con=EVAL(con$)
 1660IF con<256 THEN
 1670FOR I=1 TO 8:Z=INT(con/2):C$=STR$(con-2*Z)+C$:con=Z:NEXT
 1680=C$
 1690ENDIF
 1700IF con>255
 1710FOR I=1 TO 20:Z=INT(con/2):C$=STR$(con-2*Z)+C$:con=Z:NEXT
 1720=C$
 1730:
 1740DEFFNDTH(cons$)
 1750LOCAL Z$,I,C$
 1760Z$=FNDTB(cons$)
 1770FOR I=1 TO LEN(Z$)/4
 1780A$=RIGHT$(Z$,4):Z$=LEFT$(Z$,LEN(Z$)-4)
 1790C$=FNHEX(A$)+C$
 1800NEXT
 1810="&"+C$
 1820:
 1830DEFFNHEX(Get$)
 1840LOCAL Get
 1850Get=EVAL("%"+Get$)
 1860IF Get<10 =STR$(Get)
 1870IF Get>9 =CHR$(55+Get)
 1880="Dud"
� >!RunImage
@� By Ewen Roberts (Nomen Nostri) 1990 completed Mon. 18/6/90
E� Program converts between currencies/number bases version A 0.03
(H� This program would be a hell of a lot shorter if you could convert
23� directly to Binary in BASIC. Listen up Acorn!
<F� Late thanks to B. McDermott for his Decimal to Binary converter.
F:
P� block% &200
Z�� text1% &20,text2% &20,text3% &20,answer% &20,val% &20,val2% &20,text4% &20,text5% &20,text6% &20,text7% &20,text8% &20,text% &20
d�$text1%="To Sterling":$text3%="10":$text%="From Sterling":$text2%="0":conv$="�":$val%="A0-9.":$val2%="A0-9.":$text4%="To Hexadecimal":$text5%="From Hexadec.":$text6%="To Binary":$text7%="From Binary":$text8%="Calculate":$answer%="0"
n� � �error:�
x:
�quit%=�
�$block%="TASK"
�� >>>> initialise Window.
�Aș "Wimp_Initialise",200,!block%,"Exchanger" � version%,task%
�8� >>>> actually create window and get window handle.
�"� x,y,width,height,extx%,exty%
�#� extx% & exty% are hidden bits
�)whandle%=�create(200,200,500,530,0,0)
�� Icons: see RISC User 1990
�Ei2handle%=�icon(whandle%,4,-200,230,48,&821B53D,"",text1%,-1,&20)
�Gi3handle%=�icon(whandle%,4,-60,200,48,&800F53D,"",text2%,val2%,&20)
�Gi4handle%=�icon(whandle%,4,-120,100,48,&800F53D,"",text3%,val%,&20)
�Fi5handle%=�icon(whandle%,240,-200,250,48,&801B53D,"",text%,-1,&20)
Ei6handle%=�icon(whandle%,4,-260,230,48,&801B53D,"",text4%,-1,&20)
Gi7handle%=�icon(whandle%,240,-260,250,48,&801B53D,"",text5%,-1,&20)
Ei8handle%=�icon(whandle%,4,-320,230,48,&801B53D,"",text6%,-1,&20)
"Gi9handle%=�icon(whandle%,240,-320,250,48,&801B53D,"",text7%,-1,&20)
,Ei1handle%=�icon(whandle%,4,-420,150,48,&800353D,"",text8%,-1,&20)
6Ii10handle%=�icon(whandle%,40,-480,400,48,&7B00053D,"",answer%,-1,&20)
@block%!0=whandle%
J$ș "Wimp_GetWindowState",,block%
T ș "Wimp_OpenWindow",,block%
^�  >>> WIMP POLL
h� � �wimperror � �
r�
|	�poll
�� quit%
�$block%="TASK"
�$ș"Wimp_CloseDown",task%,!block%
��:� oh no! it's the end
�:
�
��poll
�#ș"Wimp_Poll",,block% � reason%
�Ȏ reason% �
�� 1   :�redraw
�7� 2   :!block%=whandle%:ș"Wimp_OpenWindow",,block%
�� 3   :quit%=�
�� 6   :�dealwithIcon
�#� 17,18:� block%!16=0 � quit%=�
�
�
:
&-ݤcreate(vwx%,vwy%,vww%,vwh%,extx%,exty%)
09$block%=�88,�0):� Clr (your guess is as good as mine)
:� the bit you see
Dblock%!0=vwx%        :� x1
Nblock%!4=vwy%        :� y1
Xblock%!8=vwx%+vww%   :� x2
bblock%!12=vwy%+vwh%  :� y2
l!block%!24=-1:�No winds above?
v%block%!28=&FF00000F:� WINDOW FLAG
�� WINDOW COLOURS
�block%?32=7
�block%?33=1
�#block%?34=1 :� Work area colour
� block%?35=2 :� Work area bcg
�"block%?36=3  :� Scroll bar bcg
�"block%?37=1  :� Title bar fgnd
�block%?38=12
�� Work area extent
�block%!40=0  :� WAE x1
�block%!44=-vwh%-exty%
�block%!48=vww%+extx%
�block%!52=0
block%!56=&3D
block%!60=3<<12
$(block%+72)="Exchanger"
 +ș"Wimp_CreateWindow",,block% � handle%
*=handle%
4:
>��redraw
Hblock%!0=whandle%
R*ș "Wimp_RedrawWindow",,block% � more%
\�getorigin(block%,x0%,y0%)
fȕ more%
p�draw(x0%,y0%)
z)ș"Wimp_GetRectangle",,block% � more%
��
��
�:
�%��getorigin(block%, � x0%, � y0%)
�x0%=block%!4-block%!20
�y0%=block%!16-block%!24
��
�:
���draw(x0%,y0%)
�ș"Wimp_SetColour",7
�(� x0%+200,y0%-90:�;"< Exchange rate"
�(� x0%+240,y0%-25:�;"< Money (Start)"
�0� x0%+40,y0%-330:�;"Default base is Decimal"
-� x0%+180,y0%-385:�;"<Click to Calculate"
"� x0%+180,y0%-485:�;"^Answer^"
�
$:
.��close
8$block%="TASK"
B$ș"Wimp_CloseDown",task%,!block%
L�
V:
`��error
j� �
t$block%="TASK"
~$ș"Wimp_CloseDown",task%,!block%
�� �$;" at line ";�
��
�:
�ݤWimperror
�
!block%=�
�$$(block%+4)=�$+" at line "+Þ+�0
�;ș "Wimp_ReportError",block%,3,"Converter" � ,response%
�#� response%=2 � �close :=� � =�
�:
�<ݤicon(whandle%,ix%,iy%,iw%,ih%,flag%,text$,d1%,d2%,d3%)
�block%!0=whandle%
�block%!4=ix%:block%!8=iy%
block%!12=ix%+iw%

block%!16=iy%+ih%
block%!20=flag%

� d1%=0 �
( $(block%+24)=text$
2�
<  block%!24=d1%:block%!28=d2%
F block%!32=d3%
P�
Z*ș"Wimp_CreateIcon",,block% � ihandle%
d
=ihandle%
n:
x� >>>> Selects Mode:
���dealwithIcon
�o� block%!16=i1handle% � $answer%=�convert($text2%,$text3%,conv$):ș"Wimp_ForceRedraw",whandle%,0,-600,400,0
�$val2%="A0-9."
�#� block%!16=i2handle% conv$="�"
�#� block%!16=i5handle% conv$="?"
�#� block%!16=i6handle% conv$="~"
�5� block%!16=i7handle% conv$="&":$val2%="A0-9A-F."
�#� block%!16=i8handle% conv$="("
�#� block%!16=i9handle% conv$="%"
��
�:
�ݤconvert(no$,fac$,fd$)
�� A,A$:A=200:A$=""
figure=�(no$):fact=�(fac$)
� fd$="&" � A=�("&"+no$)
� fd$="�" � A=figure/fact
"� fd$="?" � A=figure*fact
,� fd$="%" � A=�("%"+no$)
6$� fd$="(" $answer%="":=�DTB(no$)
@$� fd$="~" $answer%="":=�DTH(no$)
J	=�(A)
T:
^ݤDTB(con$)
h� con,Z,I,C$
rcon=�(con$)
|� con<256 �
�1� I=1 � 8:Z=�(con/2):C$=�(con-2*Z)+C$:con=Z:�
�=C$
��
�
� con>255
�2� I=1 � 20:Z=�(con/2):C$=�(con-2*Z)+C$:con=Z:�
�=C$
�:
�ݤDTH(cons$)
�
� Z$,I,C$
�Z$=�DTB(cons$)
�� I=1 � �(Z$)/4
�A$=�Z$,4):Z$=�Z$,�(Z$)-4)
�C$=�HEX(A$)+C$
�
="&"+C$
:
&ݤHEX(Get$)
0	� Get
:Get=�("%"+Get$)
D� Get<10 =�(Get)
N� Get>9 =�(55+Get)
X
="Dud"
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 40 f4 20 42 79  20 45 77 65 6e 20 52 6f  |...@. By Ewen Ro|
00000020  62 65 72 74 73 20 28 4e  6f 6d 65 6e 20 4e 6f 73  |berts (Nomen Nos|
00000030  74 72 69 29 20 31 39 39  30 20 63 6f 6d 70 6c 65  |tri) 1990 comple|
00000040  74 65 64 20 4d 6f 6e 2e  20 31 38 2f 36 2f 39 30  |ted Mon. 18/6/90|
00000050  0d 00 1e 45 f4 20 50 72  6f 67 72 61 6d 20 63 6f  |...E. Program co|
00000060  6e 76 65 72 74 73 20 62  65 74 77 65 65 6e 20 63  |nverts between c|
00000070  75 72 72 65 6e 63 69 65  73 2f 6e 75 6d 62 65 72  |urrencies/number|
00000080  20 62 61 73 65 73 20 76  65 72 73 69 6f 6e 20 41  | bases version A|
00000090  20 30 2e 30 33 0d 00 28  48 f4 20 54 68 69 73 20  | 0.03..(H. This |
000000a0  70 72 6f 67 72 61 6d 20  77 6f 75 6c 64 20 62 65  |program would be|
000000b0  20 61 20 68 65 6c 6c 20  6f 66 20 61 20 6c 6f 74  | a hell of a lot|
000000c0  20 73 68 6f 72 74 65 72  20 69 66 20 79 6f 75 20  | shorter if you |
000000d0  63 6f 75 6c 64 20 63 6f  6e 76 65 72 74 0d 00 32  |could convert..2|
000000e0  33 f4 20 64 69 72 65 63  74 6c 79 20 74 6f 20 42  |3. directly to B|
000000f0  69 6e 61 72 79 20 69 6e  20 42 41 53 49 43 2e 20  |inary in BASIC. |
00000100  4c 69 73 74 65 6e 20 75  70 20 41 63 6f 72 6e 21  |Listen up Acorn!|
00000110  0d 00 3c 46 f4 20 4c 61  74 65 20 74 68 61 6e 6b  |..<F. Late thank|
00000120  73 20 74 6f 20 42 2e 20  4d 63 44 65 72 6d 6f 74  |s to B. McDermot|
00000130  74 20 66 6f 72 20 68 69  73 20 44 65 63 69 6d 61  |t for his Decima|
00000140  6c 20 74 6f 20 42 69 6e  61 72 79 20 63 6f 6e 76  |l to Binary conv|
00000150  65 72 74 65 72 2e 0d 00  46 05 3a 0d 00 50 11 de  |erter...F.:..P..|
00000160  20 62 6c 6f 63 6b 25 20  26 32 30 30 0d 00 5a 86  | block% &200..Z.|
00000170  de 20 74 65 78 74 31 25  20 26 32 30 2c 74 65 78  |. text1% &20,tex|
00000180  74 32 25 20 26 32 30 2c  74 65 78 74 33 25 20 26  |t2% &20,text3% &|
00000190  32 30 2c 61 6e 73 77 65  72 25 20 26 32 30 2c 76  |20,answer% &20,v|
000001a0  61 6c 25 20 26 32 30 2c  76 61 6c 32 25 20 26 32  |al% &20,val2% &2|
000001b0  30 2c 74 65 78 74 34 25  20 26 32 30 2c 74 65 78  |0,text4% &20,tex|
000001c0  74 35 25 20 26 32 30 2c  74 65 78 74 36 25 20 26  |t5% &20,text6% &|
000001d0  32 30 2c 74 65 78 74 37  25 20 26 32 30 2c 74 65  |20,text7% &20,te|
000001e0  78 74 38 25 20 26 32 30  2c 74 65 78 74 25 20 26  |xt8% &20,text% &|
000001f0  32 30 0d 00 64 ec 24 74  65 78 74 31 25 3d 22 54  |20..d.$text1%="T|
00000200  6f 20 53 74 65 72 6c 69  6e 67 22 3a 24 74 65 78  |o Sterling":$tex|
00000210  74 33 25 3d 22 31 30 22  3a 24 74 65 78 74 25 3d  |t3%="10":$text%=|
00000220  22 46 72 6f 6d 20 53 74  65 72 6c 69 6e 67 22 3a  |"From Sterling":|
00000230  24 74 65 78 74 32 25 3d  22 30 22 3a 63 6f 6e 76  |$text2%="0":conv|
00000240  24 3d 22 a3 22 3a 24 76  61 6c 25 3d 22 41 30 2d  |$=".":$val%="A0-|
00000250  39 2e 22 3a 24 76 61 6c  32 25 3d 22 41 30 2d 39  |9.":$val2%="A0-9|
00000260  2e 22 3a 24 74 65 78 74  34 25 3d 22 54 6f 20 48  |.":$text4%="To H|
00000270  65 78 61 64 65 63 69 6d  61 6c 22 3a 24 74 65 78  |exadecimal":$tex|
00000280  74 35 25 3d 22 46 72 6f  6d 20 48 65 78 61 64 65  |t5%="From Hexade|
00000290  63 2e 22 3a 24 74 65 78  74 36 25 3d 22 54 6f 20  |c.":$text6%="To |
000002a0  42 69 6e 61 72 79 22 3a  24 74 65 78 74 37 25 3d  |Binary":$text7%=|
000002b0  22 46 72 6f 6d 20 42 69  6e 61 72 79 22 3a 24 74  |"From Binary":$t|
000002c0  65 78 74 38 25 3d 22 43  61 6c 63 75 6c 61 74 65  |ext8%="Calculate|
000002d0  22 3a 24 61 6e 73 77 65  72 25 3d 22 30 22 0d 00  |":$answer%="0"..|
000002e0  6e 10 ee 20 85 20 f2 65  72 72 6f 72 3a e0 0d 00  |n.. . .error:...|
000002f0  78 05 3a 0d 00 82 0b 71  75 69 74 25 3d a3 0d 00  |x.:....quit%=...|
00000300  8c 12 24 62 6c 6f 63 6b  25 3d 22 54 41 53 4b 22  |..$block%="TASK"|
00000310  0d 00 96 1d f4 20 3e 3e  3e 3e 20 69 6e 69 74 69  |..... >>>> initi|
00000320  61 6c 69 73 65 20 57 69  6e 64 6f 77 2e 0d 00 a0  |alise Window....|
00000330  41 c8 99 20 22 57 69 6d  70 5f 49 6e 69 74 69 61  |A.. "Wimp_Initia|
00000340  6c 69 73 65 22 2c 32 30  30 2c 21 62 6c 6f 63 6b  |lise",200,!block|
00000350  25 2c 22 45 78 63 68 61  6e 67 65 72 22 20 b8 20  |%,"Exchanger" . |
00000360  76 65 72 73 69 6f 6e 25  2c 74 61 73 6b 25 0d 00  |version%,task%..|
00000370  aa 38 f4 20 3e 3e 3e 3e  20 61 63 74 75 61 6c 6c  |.8. >>>> actuall|
00000380  79 20 63 72 65 61 74 65  20 77 69 6e 64 6f 77 20  |y create window |
00000390  61 6e 64 20 67 65 74 20  77 69 6e 64 6f 77 20 68  |and get window h|
000003a0  61 6e 64 6c 65 2e 0d 00  b4 22 f4 20 78 2c 79 2c  |andle....". x,y,|
000003b0  77 69 64 74 68 2c 68 65  69 67 68 74 2c 65 78 74  |width,height,ext|
000003c0  78 25 2c 65 78 74 79 25  0d 00 be 23 f4 20 65 78  |x%,exty%...#. ex|
000003d0  74 78 25 20 26 20 65 78  74 79 25 20 61 72 65 20  |tx% & exty% are |
000003e0  68 69 64 64 65 6e 20 62  69 74 73 0d 00 c8 29 77  |hidden bits...)w|
000003f0  68 61 6e 64 6c 65 25 3d  a4 63 72 65 61 74 65 28  |handle%=.create(|
00000400  32 30 30 2c 32 30 30 2c  35 30 30 2c 35 33 30 2c  |200,200,500,530,|
00000410  30 2c 30 29 0d 00 d2 1f  f4 20 49 63 6f 6e 73 3a  |0,0)..... Icons:|
00000420  20 73 65 65 20 52 49 53  43 20 55 73 65 72 20 31  | see RISC User 1|
00000430  39 39 30 0d 00 dc 45 69  32 68 61 6e 64 6c 65 25  |990...Ei2handle%|
00000440  3d a4 69 63 6f 6e 28 77  68 61 6e 64 6c 65 25 2c  |=.icon(whandle%,|
00000450  34 2c 2d 32 30 30 2c 32  33 30 2c 34 38 2c 26 38  |4,-200,230,48,&8|
00000460  32 31 42 35 33 44 2c 22  22 2c 74 65 78 74 31 25  |21B53D,"",text1%|
00000470  2c 2d 31 2c 26 32 30 29  0d 00 e6 47 69 33 68 61  |,-1,&20)...Gi3ha|
00000480  6e 64 6c 65 25 3d a4 69  63 6f 6e 28 77 68 61 6e  |ndle%=.icon(whan|
00000490  64 6c 65 25 2c 34 2c 2d  36 30 2c 32 30 30 2c 34  |dle%,4,-60,200,4|
000004a0  38 2c 26 38 30 30 46 35  33 44 2c 22 22 2c 74 65  |8,&800F53D,"",te|
000004b0  78 74 32 25 2c 76 61 6c  32 25 2c 26 32 30 29 0d  |xt2%,val2%,&20).|
000004c0  00 f0 47 69 34 68 61 6e  64 6c 65 25 3d a4 69 63  |..Gi4handle%=.ic|
000004d0  6f 6e 28 77 68 61 6e 64  6c 65 25 2c 34 2c 2d 31  |on(whandle%,4,-1|
000004e0  32 30 2c 31 30 30 2c 34  38 2c 26 38 30 30 46 35  |20,100,48,&800F5|
000004f0  33 44 2c 22 22 2c 74 65  78 74 33 25 2c 76 61 6c  |3D,"",text3%,val|
00000500  25 2c 26 32 30 29 0d 00  fa 46 69 35 68 61 6e 64  |%,&20)...Fi5hand|
00000510  6c 65 25 3d a4 69 63 6f  6e 28 77 68 61 6e 64 6c  |le%=.icon(whandl|
00000520  65 25 2c 32 34 30 2c 2d  32 30 30 2c 32 35 30 2c  |e%,240,-200,250,|
00000530  34 38 2c 26 38 30 31 42  35 33 44 2c 22 22 2c 74  |48,&801B53D,"",t|
00000540  65 78 74 25 2c 2d 31 2c  26 32 30 29 0d 01 04 45  |ext%,-1,&20)...E|
00000550  69 36 68 61 6e 64 6c 65  25 3d a4 69 63 6f 6e 28  |i6handle%=.icon(|
00000560  77 68 61 6e 64 6c 65 25  2c 34 2c 2d 32 36 30 2c  |whandle%,4,-260,|
00000570  32 33 30 2c 34 38 2c 26  38 30 31 42 35 33 44 2c  |230,48,&801B53D,|
00000580  22 22 2c 74 65 78 74 34  25 2c 2d 31 2c 26 32 30  |"",text4%,-1,&20|
00000590  29 0d 01 0e 47 69 37 68  61 6e 64 6c 65 25 3d a4  |)...Gi7handle%=.|
000005a0  69 63 6f 6e 28 77 68 61  6e 64 6c 65 25 2c 32 34  |icon(whandle%,24|
000005b0  30 2c 2d 32 36 30 2c 32  35 30 2c 34 38 2c 26 38  |0,-260,250,48,&8|
000005c0  30 31 42 35 33 44 2c 22  22 2c 74 65 78 74 35 25  |01B53D,"",text5%|
000005d0  2c 2d 31 2c 26 32 30 29  0d 01 18 45 69 38 68 61  |,-1,&20)...Ei8ha|
000005e0  6e 64 6c 65 25 3d a4 69  63 6f 6e 28 77 68 61 6e  |ndle%=.icon(whan|
000005f0  64 6c 65 25 2c 34 2c 2d  33 32 30 2c 32 33 30 2c  |dle%,4,-320,230,|
00000600  34 38 2c 26 38 30 31 42  35 33 44 2c 22 22 2c 74  |48,&801B53D,"",t|
00000610  65 78 74 36 25 2c 2d 31  2c 26 32 30 29 0d 01 22  |ext6%,-1,&20).."|
00000620  47 69 39 68 61 6e 64 6c  65 25 3d a4 69 63 6f 6e  |Gi9handle%=.icon|
00000630  28 77 68 61 6e 64 6c 65  25 2c 32 34 30 2c 2d 33  |(whandle%,240,-3|
00000640  32 30 2c 32 35 30 2c 34  38 2c 26 38 30 31 42 35  |20,250,48,&801B5|
00000650  33 44 2c 22 22 2c 74 65  78 74 37 25 2c 2d 31 2c  |3D,"",text7%,-1,|
00000660  26 32 30 29 0d 01 2c 45  69 31 68 61 6e 64 6c 65  |&20)..,Ei1handle|
00000670  25 3d a4 69 63 6f 6e 28  77 68 61 6e 64 6c 65 25  |%=.icon(whandle%|
00000680  2c 34 2c 2d 34 32 30 2c  31 35 30 2c 34 38 2c 26  |,4,-420,150,48,&|
00000690  38 30 30 33 35 33 44 2c  22 22 2c 74 65 78 74 38  |800353D,"",text8|
000006a0  25 2c 2d 31 2c 26 32 30  29 0d 01 36 49 69 31 30  |%,-1,&20)..6Ii10|
000006b0  68 61 6e 64 6c 65 25 3d  a4 69 63 6f 6e 28 77 68  |handle%=.icon(wh|
000006c0  61 6e 64 6c 65 25 2c 34  30 2c 2d 34 38 30 2c 34  |andle%,40,-480,4|
000006d0  30 30 2c 34 38 2c 26 37  42 30 30 30 35 33 44 2c  |00,48,&7B00053D,|
000006e0  22 22 2c 61 6e 73 77 65  72 25 2c 2d 31 2c 26 32  |"",answer%,-1,&2|
000006f0  30 29 0d 01 40 15 62 6c  6f 63 6b 25 21 30 3d 77  |0)..@.block%!0=w|
00000700  68 61 6e 64 6c 65 25 0d  01 4a 24 c8 99 20 22 57  |handle%..J$.. "W|
00000710  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00000720  74 65 22 2c 2c 62 6c 6f  63 6b 25 0d 01 54 20 c8  |te",,block%..T .|
00000730  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
00000740  6f 77 22 2c 2c 62 6c 6f  63 6b 25 0d 01 5e 14 f4  |ow",,block%..^..|
00000750  20 20 3e 3e 3e 20 57 49  4d 50 20 50 4f 4c 4c 0d  |  >>> WIMP POLL.|
00000760  01 68 17 ee 85 20 e7 20  a4 77 69 6d 70 65 72 72  |.h... . .wimperr|
00000770  6f 72 20 8c 20 e0 0d 01  72 05 f5 0d 01 7c 09 f2  |or . ...r....|..|
00000780  70 6f 6c 6c 0d 01 86 0b  fd 20 71 75 69 74 25 0d  |poll..... quit%.|
00000790  01 90 12 24 62 6c 6f 63  6b 25 3d 22 54 41 53 4b  |...$block%="TASK|
000007a0  22 0d 01 9a 24 c8 99 22  57 69 6d 70 5f 43 6c 6f  |"...$.."Wimp_Clo|
000007b0  73 65 44 6f 77 6e 22 2c  74 61 73 6b 25 2c 21 62  |seDown",task%,!b|
000007c0  6c 6f 63 6b 25 0d 01 a4  1b e0 3a f4 20 6f 68 20  |lock%.....:. oh |
000007d0  6e 6f 21 20 69 74 27 73  20 74 68 65 20 65 6e 64  |no! it's the end|
000007e0  0d 01 ae 05 3a 0d 01 b8  0a dd f2 70 6f 6c 6c 0d  |....:......poll.|
000007f0  01 c2 23 c8 99 22 57 69  6d 70 5f 50 6f 6c 6c 22  |..#.."Wimp_Poll"|
00000800  2c 2c 62 6c 6f 63 6b 25  20 b8 20 72 65 61 73 6f  |,,block% . reaso|
00000810  6e 25 0d 01 cc 10 c8 8e  20 72 65 61 73 6f 6e 25  |n%...... reason%|
00000820  20 ca 0d 01 d6 12 c9 20  31 20 20 20 3a f2 72 65  | ...... 1   :.re|
00000830  64 72 61 77 0d 01 e0 37  c9 20 32 20 20 20 3a 21  |draw...7. 2   :!|
00000840  62 6c 6f 63 6b 25 3d 77  68 61 6e 64 6c 65 25 3a  |block%=whandle%:|
00000850  c8 99 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |.."Wimp_OpenWind|
00000860  6f 77 22 2c 2c 62 6c 6f  63 6b 25 0d 01 ea 12 c9  |ow",,block%.....|
00000870  20 33 20 20 20 3a 71 75  69 74 25 3d b9 0d 01 f4  | 3   :quit%=....|
00000880  18 c9 20 36 20 20 20 3a  f2 64 65 61 6c 77 69 74  |.. 6   :.dealwit|
00000890  68 49 63 6f 6e 0d 01 fe  23 c9 20 31 37 2c 31 38  |hIcon...#. 17,18|
000008a0  3a e7 20 62 6c 6f 63 6b  25 21 31 36 3d 30 20 8c  |:. block%!16=0 .|
000008b0  20 71 75 69 74 25 3d b9  0d 02 08 05 cb 0d 02 12  | quit%=.........|
000008c0  05 e1 0d 02 1c 05 3a 0d  02 26 2d dd a4 63 72 65  |......:..&-..cre|
000008d0  61 74 65 28 76 77 78 25  2c 76 77 79 25 2c 76 77  |ate(vwx%,vwy%,vw|
000008e0  77 25 2c 76 77 68 25 2c  65 78 74 78 25 2c 65 78  |w%,vwh%,extx%,ex|
000008f0  74 79 25 29 0d 02 30 39  24 62 6c 6f 63 6b 25 3d  |ty%)..09$block%=|
00000900  c4 38 38 2c bd 30 29 3a  f4 20 43 6c 72 20 28 79  |.88,.0):. Clr (y|
00000910  6f 75 72 20 67 75 65 73  73 20 69 73 20 61 73 20  |our guess is as |
00000920  67 6f 6f 64 20 61 73 20  6d 69 6e 65 29 0d 02 3a  |good as mine)..:|
00000930  15 f4 20 74 68 65 20 62  69 74 20 79 6f 75 20 73  |.. the bit you s|
00000940  65 65 0d 02 44 1e 62 6c  6f 63 6b 25 21 30 3d 76  |ee..D.block%!0=v|
00000950  77 78 25 20 20 20 20 20  20 20 20 3a f4 20 78 31  |wx%        :. x1|
00000960  0d 02 4e 1e 62 6c 6f 63  6b 25 21 34 3d 76 77 79  |..N.block%!4=vwy|
00000970  25 20 20 20 20 20 20 20  20 3a f4 20 79 31 0d 02  |%        :. y1..|
00000980  58 1e 62 6c 6f 63 6b 25  21 38 3d 76 77 78 25 2b  |X.block%!8=vwx%+|
00000990  76 77 77 25 20 20 20 3a  f4 20 78 32 0d 02 62 1e  |vww%   :. x2..b.|
000009a0  62 6c 6f 63 6b 25 21 31  32 3d 76 77 79 25 2b 76  |block%!12=vwy%+v|
000009b0  77 68 25 20 20 3a f4 20  79 32 0d 02 6c 21 62 6c  |wh%  :. y2..l!bl|
000009c0  6f 63 6b 25 21 32 34 3d  2d 31 3a f4 4e 6f 20 77  |ock%!24=-1:.No w|
000009d0  69 6e 64 73 20 61 62 6f  76 65 3f 0d 02 76 25 62  |inds above?..v%b|
000009e0  6c 6f 63 6b 25 21 32 38  3d 26 46 46 30 30 30 30  |lock%!28=&FF0000|
000009f0  30 46 3a f4 20 57 49 4e  44 4f 57 20 46 4c 41 47  |0F:. WINDOW FLAG|
00000a00  0d 02 80 14 f4 20 57 49  4e 44 4f 57 20 43 4f 4c  |..... WINDOW COL|
00000a10  4f 55 52 53 0d 02 8a 0f  62 6c 6f 63 6b 25 3f 33  |OURS....block%?3|
00000a20  32 3d 37 0d 02 94 0f 62  6c 6f 63 6b 25 3f 33 33  |2=7....block%?33|
00000a30  3d 31 0d 02 9e 23 62 6c  6f 63 6b 25 3f 33 34 3d  |=1...#block%?34=|
00000a40  31 20 3a f4 20 57 6f 72  6b 20 61 72 65 61 20 63  |1 :. Work area c|
00000a50  6f 6c 6f 75 72 0d 02 a8  20 62 6c 6f 63 6b 25 3f  |olour... block%?|
00000a60  33 35 3d 32 20 3a f4 20  57 6f 72 6b 20 61 72 65  |35=2 :. Work are|
00000a70  61 20 62 63 67 0d 02 b2  22 62 6c 6f 63 6b 25 3f  |a bcg..."block%?|
00000a80  33 36 3d 33 20 20 3a f4  20 53 63 72 6f 6c 6c 20  |36=3  :. Scroll |
00000a90  62 61 72 20 62 63 67 0d  02 bc 22 62 6c 6f 63 6b  |bar bcg..."block|
00000aa0  25 3f 33 37 3d 31 20 20  3a f4 20 54 69 74 6c 65  |%?37=1  :. Title|
00000ab0  20 62 61 72 20 66 67 6e  64 0d 02 c6 10 62 6c 6f  | bar fgnd....blo|
00000ac0  63 6b 25 3f 33 38 3d 31  32 0d 02 d0 16 f4 20 57  |ck%?38=12..... W|
00000ad0  6f 72 6b 20 61 72 65 61  20 65 78 74 65 6e 74 0d  |ork area extent.|
00000ae0  02 da 1a 62 6c 6f 63 6b  25 21 34 30 3d 30 20 20  |...block%!40=0  |
00000af0  3a f4 20 57 41 45 20 78  31 0d 02 e4 19 62 6c 6f  |:. WAE x1....blo|
00000b00  63 6b 25 21 34 34 3d 2d  76 77 68 25 2d 65 78 74  |ck%!44=-vwh%-ext|
00000b10  79 25 0d 02 ee 18 62 6c  6f 63 6b 25 21 34 38 3d  |y%....block%!48=|
00000b20  76 77 77 25 2b 65 78 74  78 25 0d 02 f8 0f 62 6c  |vww%+extx%....bl|
00000b30  6f 63 6b 25 21 35 32 3d  30 0d 03 02 11 62 6c 6f  |ock%!52=0....blo|
00000b40  63 6b 25 21 35 36 3d 26  33 44 0d 03 0c 13 62 6c  |ck%!56=&3D....bl|
00000b50  6f 63 6b 25 21 36 30 3d  33 3c 3c 31 32 0d 03 16  |ock%!60=3<<12...|
00000b60  1c 24 28 62 6c 6f 63 6b  25 2b 37 32 29 3d 22 45  |.$(block%+72)="E|
00000b70  78 63 68 61 6e 67 65 72  22 0d 03 20 2b c8 99 22  |xchanger".. +.."|
00000b80  57 69 6d 70 5f 43 72 65  61 74 65 57 69 6e 64 6f  |Wimp_CreateWindo|
00000b90  77 22 2c 2c 62 6c 6f 63  6b 25 20 b8 20 68 61 6e  |w",,block% . han|
00000ba0  64 6c 65 25 0d 03 2a 0c  3d 68 61 6e 64 6c 65 25  |dle%..*.=handle%|
00000bb0  0d 03 34 05 3a 0d 03 3e  0c dd f2 72 65 64 72 61  |..4.:..>...redra|
00000bc0  77 0d 03 48 15 62 6c 6f  63 6b 25 21 30 3d 77 68  |w..H.block%!0=wh|
00000bd0  61 6e 64 6c 65 25 0d 03  52 2a c8 99 20 22 57 69  |andle%..R*.. "Wi|
00000be0  6d 70 5f 52 65 64 72 61  77 57 69 6e 64 6f 77 22  |mp_RedrawWindow"|
00000bf0  2c 2c 62 6c 6f 63 6b 25  20 b8 20 6d 6f 72 65 25  |,,block% . more%|
00000c00  0d 03 5c 1e f2 67 65 74  6f 72 69 67 69 6e 28 62  |..\..getorigin(b|
00000c10  6c 6f 63 6b 25 2c 78 30  25 2c 79 30 25 29 0d 03  |lock%,x0%,y0%)..|
00000c20  66 0c c8 95 20 6d 6f 72  65 25 0d 03 70 12 f2 64  |f... more%..p..d|
00000c30  72 61 77 28 78 30 25 2c  79 30 25 29 0d 03 7a 29  |raw(x0%,y0%)..z)|
00000c40  c8 99 22 57 69 6d 70 5f  47 65 74 52 65 63 74 61  |.."Wimp_GetRecta|
00000c50  6e 67 6c 65 22 2c 2c 62  6c 6f 63 6b 25 20 b8 20  |ngle",,block% . |
00000c60  6d 6f 72 65 25 0d 03 84  05 ce 0d 03 8e 05 e1 0d  |more%...........|
00000c70  03 98 05 3a 0d 03 a2 25  dd f2 67 65 74 6f 72 69  |...:...%..getori|
00000c80  67 69 6e 28 62 6c 6f 63  6b 25 2c 20 f8 20 78 30  |gin(block%, . x0|
00000c90  25 2c 20 f8 20 79 30 25  29 0d 03 ac 1a 78 30 25  |%, . y0%)....x0%|
00000ca0  3d 62 6c 6f 63 6b 25 21  34 2d 62 6c 6f 63 6b 25  |=block%!4-block%|
00000cb0  21 32 30 0d 03 b6 1b 79  30 25 3d 62 6c 6f 63 6b  |!20....y0%=block|
00000cc0  25 21 31 36 2d 62 6c 6f  63 6b 25 21 32 34 0d 03  |%!16-block%!24..|
00000cd0  c0 05 e1 0d 03 ca 05 3a  0d 03 d4 13 dd f2 64 72  |.......:......dr|
00000ce0  61 77 28 78 30 25 2c 79  30 25 29 0d 03 de 18 c8  |aw(x0%,y0%).....|
00000cf0  99 22 57 69 6d 70 5f 53  65 74 43 6f 6c 6f 75 72  |."Wimp_SetColour|
00000d00  22 2c 37 0d 03 e8 28 ec  20 78 30 25 2b 32 30 30  |",7...(. x0%+200|
00000d10  2c 79 30 25 2d 39 30 3a  f1 3b 22 3c 20 45 78 63  |,y0%-90:.;"< Exc|
00000d20  68 61 6e 67 65 20 72 61  74 65 22 0d 03 f2 28 ec  |hange rate"...(.|
00000d30  20 78 30 25 2b 32 34 30  2c 79 30 25 2d 32 35 3a  | x0%+240,y0%-25:|
00000d40  f1 3b 22 3c 20 4d 6f 6e  65 79 20 28 53 74 61 72  |.;"< Money (Star|
00000d50  74 29 22 0d 03 fc 30 ec  20 78 30 25 2b 34 30 2c  |t)"...0. x0%+40,|
00000d60  79 30 25 2d 33 33 30 3a  f1 3b 22 44 65 66 61 75  |y0%-330:.;"Defau|
00000d70  6c 74 20 62 61 73 65 20  69 73 20 44 65 63 69 6d  |lt base is Decim|
00000d80  61 6c 22 0d 04 06 2d ec  20 78 30 25 2b 31 38 30  |al"...-. x0%+180|
00000d90  2c 79 30 25 2d 33 38 35  3a f1 3b 22 3c 43 6c 69  |,y0%-385:.;"<Cli|
00000da0  63 6b 20 74 6f 20 43 61  6c 63 75 6c 61 74 65 22  |ck to Calculate"|
00000db0  0d 04 10 22 ec 20 78 30  25 2b 31 38 30 2c 79 30  |...". x0%+180,y0|
00000dc0  25 2d 34 38 35 3a f1 3b  22 5e 41 6e 73 77 65 72  |%-485:.;"^Answer|
00000dd0  5e 22 0d 04 1a 05 e1 0d  04 24 05 3a 0d 04 2e 0b  |^".......$.:....|
00000de0  dd f2 63 6c 6f 73 65 0d  04 38 12 24 62 6c 6f 63  |..close..8.$bloc|
00000df0  6b 25 3d 22 54 41 53 4b  22 0d 04 42 24 c8 99 22  |k%="TASK"..B$.."|
00000e00  57 69 6d 70 5f 43 6c 6f  73 65 44 6f 77 6e 22 2c  |Wimp_CloseDown",|
00000e10  74 61 73 6b 25 2c 21 62  6c 6f 63 6b 25 0d 04 4c  |task%,!block%..L|
00000e20  05 e1 0d 04 56 05 3a 0d  04 60 0b dd f2 65 72 72  |....V.:..`...err|
00000e30  6f 72 0d 04 6a 08 ee 85  20 87 0d 04 74 12 24 62  |or..j... ...t.$b|
00000e40  6c 6f 63 6b 25 3d 22 54  41 53 4b 22 0d 04 7e 24  |lock%="TASK"..~$|
00000e50  c8 99 22 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |.."Wimp_CloseDow|
00000e60  6e 22 2c 74 61 73 6b 25  2c 21 62 6c 6f 63 6b 25  |n",task%,!block%|
00000e70  0d 04 88 16 f1 20 f6 24  3b 22 20 61 74 20 6c 69  |..... .$;" at li|
00000e80  6e 65 20 22 3b 9e 0d 04  92 05 e1 0d 04 9c 05 3a  |ne ";..........:|
00000e90  0d 04 a6 0f dd a4 57 69  6d 70 65 72 72 6f 72 0d  |......Wimperror.|
00000ea0  04 b0 0d 21 62 6c 6f 63  6b 25 3d 9f 0d 04 ba 24  |...!block%=....$|
00000eb0  24 28 62 6c 6f 63 6b 25  2b 34 29 3d f6 24 2b 22  |$(block%+4)=.$+"|
00000ec0  20 61 74 20 6c 69 6e 65  20 22 2b c3 9e 2b bd 30  | at line "+..+.0|
00000ed0  0d 04 c4 3b c8 99 20 22  57 69 6d 70 5f 52 65 70  |...;.. "Wimp_Rep|
00000ee0  6f 72 74 45 72 72 6f 72  22 2c 62 6c 6f 63 6b 25  |ortError",block%|
00000ef0  2c 33 2c 22 43 6f 6e 76  65 72 74 65 72 22 20 b8  |,3,"Converter" .|
00000f00  20 2c 72 65 73 70 6f 6e  73 65 25 0d 04 ce 23 e7  | ,response%...#.|
00000f10  20 72 65 73 70 6f 6e 73  65 25 3d 32 20 8c 20 f2  | response%=2 . .|
00000f20  63 6c 6f 73 65 20 3a 3d  b9 20 8b 20 3d a3 0d 04  |close :=. . =...|
00000f30  d8 05 3a 0d 04 e2 3c dd  a4 69 63 6f 6e 28 77 68  |..:...<..icon(wh|
00000f40  61 6e 64 6c 65 25 2c 69  78 25 2c 69 79 25 2c 69  |andle%,ix%,iy%,i|
00000f50  77 25 2c 69 68 25 2c 66  6c 61 67 25 2c 74 65 78  |w%,ih%,flag%,tex|
00000f60  74 24 2c 64 31 25 2c 64  32 25 2c 64 33 25 29 0d  |t$,d1%,d2%,d3%).|
00000f70  04 ec 15 62 6c 6f 63 6b  25 21 30 3d 77 68 61 6e  |...block%!0=whan|
00000f80  64 6c 65 25 0d 04 f6 1d  62 6c 6f 63 6b 25 21 34  |dle%....block%!4|
00000f90  3d 69 78 25 3a 62 6c 6f  63 6b 25 21 38 3d 69 79  |=ix%:block%!8=iy|
00000fa0  25 0d 05 00 15 62 6c 6f  63 6b 25 21 31 32 3d 69  |%....block%!12=i|
00000fb0  78 25 2b 69 77 25 0d 05  0a 15 62 6c 6f 63 6b 25  |x%+iw%....block%|
00000fc0  21 31 36 3d 69 79 25 2b  69 68 25 0d 05 14 13 62  |!16=iy%+ih%....b|
00000fd0  6c 6f 63 6b 25 21 32 30  3d 66 6c 61 67 25 0d 05  |lock%!20=flag%..|
00000fe0  1e 0d e7 20 64 31 25 3d  30 20 8c 0d 05 28 17 20  |... d1%=0 ...(. |
00000ff0  24 28 62 6c 6f 63 6b 25  2b 32 34 29 3d 74 65 78  |$(block%+24)=tex|
00001000  74 24 0d 05 32 05 cc 0d  05 3c 20 20 62 6c 6f 63  |t$..2....<  bloc|
00001010  6b 25 21 32 34 3d 64 31  25 3a 62 6c 6f 63 6b 25  |k%!24=d1%:block%|
00001020  21 32 38 3d 64 32 25 0d  05 46 12 20 62 6c 6f 63  |!28=d2%..F. bloc|
00001030  6b 25 21 33 32 3d 64 33  25 0d 05 50 05 cd 0d 05  |k%!32=d3%..P....|
00001040  5a 2a c8 99 22 57 69 6d  70 5f 43 72 65 61 74 65  |Z*.."Wimp_Create|
00001050  49 63 6f 6e 22 2c 2c 62  6c 6f 63 6b 25 20 b8 20  |Icon",,block% . |
00001060  69 68 61 6e 64 6c 65 25  0d 05 64 0d 3d 69 68 61  |ihandle%..d.=iha|
00001070  6e 64 6c 65 25 0d 05 6e  05 3a 0d 05 78 18 f4 20  |ndle%..n.:..x.. |
00001080  3e 3e 3e 3e 20 53 65 6c  65 63 74 73 20 4d 6f 64  |>>>> Selects Mod|
00001090  65 3a 0d 05 82 12 dd f2  64 65 61 6c 77 69 74 68  |e:......dealwith|
000010a0  49 63 6f 6e 0d 05 8c 6f  e7 20 62 6c 6f 63 6b 25  |Icon...o. block%|
000010b0  21 31 36 3d 69 31 68 61  6e 64 6c 65 25 20 8c 20  |!16=i1handle% . |
000010c0  24 61 6e 73 77 65 72 25  3d a4 63 6f 6e 76 65 72  |$answer%=.conver|
000010d0  74 28 24 74 65 78 74 32  25 2c 24 74 65 78 74 33  |t($text2%,$text3|
000010e0  25 2c 63 6f 6e 76 24 29  3a c8 99 22 57 69 6d 70  |%,conv$):.."Wimp|
000010f0  5f 46 6f 72 63 65 52 65  64 72 61 77 22 2c 77 68  |_ForceRedraw",wh|
00001100  61 6e 64 6c 65 25 2c 30  2c 2d 36 30 30 2c 34 30  |andle%,0,-600,40|
00001110  30 2c 30 0d 05 96 12 24  76 61 6c 32 25 3d 22 41  |0,0....$val2%="A|
00001120  30 2d 39 2e 22 0d 05 a0  23 e7 20 62 6c 6f 63 6b  |0-9."...#. block|
00001130  25 21 31 36 3d 69 32 68  61 6e 64 6c 65 25 20 63  |%!16=i2handle% c|
00001140  6f 6e 76 24 3d 22 a3 22  0d 05 aa 23 e7 20 62 6c  |onv$="."...#. bl|
00001150  6f 63 6b 25 21 31 36 3d  69 35 68 61 6e 64 6c 65  |ock%!16=i5handle|
00001160  25 20 63 6f 6e 76 24 3d  22 3f 22 0d 05 b4 23 e7  |% conv$="?"...#.|
00001170  20 62 6c 6f 63 6b 25 21  31 36 3d 69 36 68 61 6e  | block%!16=i6han|
00001180  64 6c 65 25 20 63 6f 6e  76 24 3d 22 7e 22 0d 05  |dle% conv$="~"..|
00001190  be 35 e7 20 62 6c 6f 63  6b 25 21 31 36 3d 69 37  |.5. block%!16=i7|
000011a0  68 61 6e 64 6c 65 25 20  63 6f 6e 76 24 3d 22 26  |handle% conv$="&|
000011b0  22 3a 24 76 61 6c 32 25  3d 22 41 30 2d 39 41 2d  |":$val2%="A0-9A-|
000011c0  46 2e 22 0d 05 c8 23 e7  20 62 6c 6f 63 6b 25 21  |F."...#. block%!|
000011d0  31 36 3d 69 38 68 61 6e  64 6c 65 25 20 63 6f 6e  |16=i8handle% con|
000011e0  76 24 3d 22 28 22 0d 05  d2 23 e7 20 62 6c 6f 63  |v$="("...#. bloc|
000011f0  6b 25 21 31 36 3d 69 39  68 61 6e 64 6c 65 25 20  |k%!16=i9handle% |
00001200  63 6f 6e 76 24 3d 22 25  22 0d 05 dc 05 e1 0d 05  |conv$="%".......|
00001210  e6 05 3a 0d 05 f0 1b dd  a4 63 6f 6e 76 65 72 74  |..:......convert|
00001220  28 6e 6f 24 2c 66 61 63  24 2c 66 64 24 29 0d 05  |(no$,fac$,fd$)..|
00001230  fa 16 ea 20 41 2c 41 24  3a 41 3d 32 30 30 3a 41  |... A,A$:A=200:A|
00001240  24 3d 22 22 0d 06 04 1e  66 69 67 75 72 65 3d bb  |$=""....figure=.|
00001250  28 6e 6f 24 29 3a 66 61  63 74 3d bb 28 66 61 63  |(no$):fact=.(fac|
00001260  24 29 0d 06 0e 1c e7 20  66 64 24 3d 22 26 22 20  |$)..... fd$="&" |
00001270  8c 20 41 3d a0 28 22 26  22 2b 6e 6f 24 29 0d 06  |. A=.("&"+no$)..|
00001280  18 1d e7 20 66 64 24 3d  22 a3 22 20 8c 20 41 3d  |... fd$="." . A=|
00001290  66 69 67 75 72 65 2f 66  61 63 74 0d 06 22 1d e7  |figure/fact.."..|
000012a0  20 66 64 24 3d 22 3f 22  20 8c 20 41 3d 66 69 67  | fd$="?" . A=fig|
000012b0  75 72 65 2a 66 61 63 74  0d 06 2c 1c e7 20 66 64  |ure*fact..,.. fd|
000012c0  24 3d 22 25 22 20 8c 20  41 3d a0 28 22 25 22 2b  |$="%" . A=.("%"+|
000012d0  6e 6f 24 29 0d 06 36 24  e7 20 66 64 24 3d 22 28  |no$)..6$. fd$="(|
000012e0  22 20 24 61 6e 73 77 65  72 25 3d 22 22 3a 3d a4  |" $answer%="":=.|
000012f0  44 54 42 28 6e 6f 24 29  0d 06 40 24 e7 20 66 64  |DTB(no$)..@$. fd|
00001300  24 3d 22 7e 22 20 24 61  6e 73 77 65 72 25 3d 22  |$="~" $answer%="|
00001310  22 3a 3d a4 44 54 48 28  6e 6f 24 29 0d 06 4a 09  |":=.DTH(no$)..J.|
00001320  3d c3 28 41 29 0d 06 54  05 3a 0d 06 5e 0f dd a4  |=.(A)..T.:..^...|
00001330  44 54 42 28 63 6f 6e 24  29 0d 06 68 10 ea 20 63  |DTB(con$)..h.. c|
00001340  6f 6e 2c 5a 2c 49 2c 43  24 0d 06 72 0f 63 6f 6e  |on,Z,I,C$..r.con|
00001350  3d a0 28 63 6f 6e 24 29  0d 06 7c 0f e7 20 63 6f  |=.(con$)..|.. co|
00001360  6e 3c 32 35 36 20 8c 0d  06 86 31 e3 20 49 3d 31  |n<256 ....1. I=1|
00001370  20 b8 20 38 3a 5a 3d a8  28 63 6f 6e 2f 32 29 3a  | . 8:Z=.(con/2):|
00001380  43 24 3d c3 28 63 6f 6e  2d 32 2a 5a 29 2b 43 24  |C$=.(con-2*Z)+C$|
00001390  3a 63 6f 6e 3d 5a 3a ed  0d 06 90 07 3d 43 24 0d  |:con=Z:.....=C$.|
000013a0  06 9a 05 cd 0d 06 a4 0d  e7 20 63 6f 6e 3e 32 35  |......... con>25|
000013b0  35 0d 06 ae 32 e3 20 49  3d 31 20 b8 20 32 30 3a  |5...2. I=1 . 20:|
000013c0  5a 3d a8 28 63 6f 6e 2f  32 29 3a 43 24 3d c3 28  |Z=.(con/2):C$=.(|
000013d0  63 6f 6e 2d 32 2a 5a 29  2b 43 24 3a 63 6f 6e 3d  |con-2*Z)+C$:con=|
000013e0  5a 3a ed 0d 06 b8 07 3d  43 24 0d 06 c2 05 3a 0d  |Z:.....=C$....:.|
000013f0  06 cc 10 dd a4 44 54 48  28 63 6f 6e 73 24 29 0d  |.....DTH(cons$).|
00001400  06 d6 0d ea 20 5a 24 2c  49 2c 43 24 0d 06 e0 12  |.... Z$,I,C$....|
00001410  5a 24 3d a4 44 54 42 28  63 6f 6e 73 24 29 0d 06  |Z$=.DTB(cons$)..|
00001420  ea 13 e3 20 49 3d 31 20  b8 20 a9 28 5a 24 29 2f  |... I=1 . .(Z$)/|
00001430  34 0d 06 f4 1d 41 24 3d  c2 5a 24 2c 34 29 3a 5a  |4....A$=.Z$,4):Z|
00001440  24 3d c0 5a 24 2c a9 28  5a 24 29 2d 34 29 0d 06  |$=.Z$,.(Z$)-4)..|
00001450  fe 12 43 24 3d a4 48 45  58 28 41 24 29 2b 43 24  |..C$=.HEX(A$)+C$|
00001460  0d 07 08 05 ed 0d 07 12  0b 3d 22 26 22 2b 43 24  |.........="&"+C$|
00001470  0d 07 1c 05 3a 0d 07 26  0f dd a4 48 45 58 28 47  |....:..&...HEX(G|
00001480  65 74 24 29 0d 07 30 09  ea 20 47 65 74 0d 07 3a  |et$)..0.. Get..:|
00001490  13 47 65 74 3d a0 28 22  25 22 2b 47 65 74 24 29  |.Get=.("%"+Get$)|
000014a0  0d 07 44 14 e7 20 47 65  74 3c 31 30 20 3d c3 28  |..D.. Get<10 =.(|
000014b0  47 65 74 29 0d 07 4e 16  e7 20 47 65 74 3e 39 20  |Get)..N.. Get>9 |
000014c0  3d bd 28 35 35 2b 47 65  74 29 0d 07 58 0a 3d 22  |=.(55+Get)..X.="|
000014d0  44 75 64 22 0d ff                                 |Dud"..|
000014d6