Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92 » !AWJUL92/Goodies/Pbuffer/!PrintBuff/!RunImage

!AWJUL92/Goodies/Pbuffer/!PrintBuff/!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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92
Filename: !AWJUL92/Goodies/Pbuffer/!PrintBuff/!RunImage
Read OK:
File size: 0D22 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > !RunImage
   20REM for !PrintBuff
   30REM By Ben Barter
   40version$= "1.10"
   50date$   = "(Feb-92)"
   60*BUFFERSIZE 131072
   70*BUFFER ON
   80ONERROR:ONERROROFF:ERROR ERR,REPORT$+" at line "+STR$ERL:END
   90PROCinit
  100poll%=%1110010110011
  110ONERROR dummy=FNerror(ERR,REPORT$,%10010)
  120REPEAT
  130SYS"Wimp_Poll",poll%,q% TO action%
  140CASE action% OF
  150WHEN 2 : SYS"Wimp_OpenWindow",,q%
  160WHEN 3 : SYS"Wimp_CloseWindow",,q%
  170WHEN 6 : PROCclick(q%!0,q%!4,q%!8,q%!12,q%!16)
  180WHEN 9 : IFq%!0>-1 PROCdec(q%!0,q%!4,q%!8)
  190WHEN 17,18,19:PROCmess
  200ENDCASE
  210UNTIL quit%
  220SYS"Wimp_CloseDown",task%,&4B534154
  230END
  240DEFPROCinit
  250SYS"Wimp_Initialise",200,&4B534154,"Printer Buffer" TO ,task%
  260quit%=FALSE:myref%=0
  270DIM q% &100, err1% &100, err2% 15, indmenu% 256, xdiv% 5, ydiv% 5, valid% 10
  280DIM buffer% 900, indirect% 300
  290PROCenvironment
  300$err2%="PrintBuff":$xdiv%=STR$X%:$ydiv%=STR$Y%:$valid%="A0-9"
  310SYS"Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
  320SYS"Wimp_LoadTemplate",,buffer%,indirect%,indirect%+169,-1,"info",0
  330SYS"Wimp_CreateWindow",,buffer% TO info%:$(indirect%+20)=version$+" "+date$
  340SYS"Wimp_CloseTemplate"
  350LOCALsx%,sy%,sm%,px%,py%
  360sprite$="!printbuff"
  370SYS"Wimp_SpriteOp",40,,sprite$ TO ,,,sx%,sy%,,sm%
  380SYS"OS_ReadModeVariable",sm%,4 TO ,,px%:sx%=sx%<<px%
  390SYS"OS_ReadModeVariable",sm%,5 TO ,,py%:sy%=sy%<<py%
  400!q%=-2
  410q%!4=0:q%!8=0:q%!12=q%!4+sx%:q%!16=sy%
  420q%!20=&1701300A
  430$(q%+24)=sprite$
  440SYS"Wimp_CreateIcon",,q% TO ic%
  450q%!0=20:q%!4=0:q%!8=0:q%!12=0:q%!16=&801FF:SYS"Wimp_SendMessage",17,q%,0
  460ENDPROC
  470DEFPROCclick(mx%,my%,b%,w%,i%):LOCAL sx%,sy%,sm%,px%,py%
  480IF w%=-2 THEN
  490 CASE b% OF
  500  WHEN 2   :PROCmenu
  510  WHEN 1,4 :
  520 ENDCASE
  530ENDIF
  540ENDPROC
  550DEFFNerror(error%,err$,fl%)
  560poll%=%1100010110011
  570err1%!0=error%:$(err1%+4)=err$+STR$ERL
  580SYS"Wimp_ReportError",err1%,fl%,err2% TO click%
  590=click%
  600DEFPROCmess:LOCAL data$,n%
  610CASE q%!16 OF
  620 WHEN 0:      quit%=TRUE
  630 WHEN &801FF: IF q%!4<>task% quit%=TRUE
  640ENDCASE
  650ENDPROC
  660DEFPROCdec(select%,under%,screed%):LOCALdummy%,m
  670SYS"Wimp_GetPointerInfo",,q%:m=q%!8
  680CASE select% OF
  690 WHEN 1:OSCLI "RMKILL PrinterBuffer":quit%=TRUE
  700ENDCASE
  710IF(m AND1)=1 PROCmenu
  720ENDPROC
  730DEFPROCmenu:LOCALh%
  740h%=22*4
  750mr%=indmenu%
  760PROClead(buffer%,"PrintBuff",10)
  770PROCbulk(buffer%+28,&00,info%,&7000001,"Info")
  780PROCbulk(buffer%+52,&80,-1,&7000001,"Quit")
  790SYS"Wimp_CreateMenu",,buffer%,q%!0-64,h%+96
  800ENDPROC
  810DEFPROCbulk(base%,flag%,ptr%,icfl%,data$):LOCAL data1%,data2%,data3%
  820IF LENdata$<12 THEN
  830 base%!0=flag%:base%!4=ptr%:base%!8=icfl%:$(base%+12)=data$
  840ELSE
  850 data1%=mr%:data2%=-1:data3%=LENdata$+1:icfl%=(icfl%AND&FFFFFEFF)EOR&00000100
  860 base%!0=flag%:base%!4=ptr%:base%!8=icfl%
  870 base%!12=data1%:base%!16=data2%:base%!20=data3%
  880 $mr%=data$
  890 mr%+=data3%
  900ENDIF
  910ENDPROC
  920DEFPROClead(base%,data$,width%)
  930$base%=data$:base%!12=&00070207:base%!16=width%*16:base%!20=44:base%!24=0
  940ENDPROC
  950DEFPROCbias(base%,flag%,ptr%,icfl%,data1%,data2%,data3%)
  960base%!0=flag%:base%!4=ptr%:base%!8=icfl%
  970base%!12=data1%:base%!16=data2%:base%!20=data3%
  980ENDPROC
  990DEFPROCopnwind(f%)
 1000q%!52=h%:SYS"Wimp_GetWindowState",,q%+52
 1010SYS"Wimp_OpenWindow",,q%+52
 1020ENDPROC
 1030DEFPROCfrcicn(h%,i%)
 1040q%!0=h%:q%!4=i%:SYS"Wimp_GetIconState",,q%
 1050SYS"Wimp_ForceRedraw",h%,q%!8,q%!12,q%!16,q%!20
 1060ENDPROC
 1070DEFPROCwrticn(h%,i%,data$)
 1080q%!0=h%:q%!4=i%:SYS"Wimp_GetIconState",,q%
 1090$(q%!28)=data$
 1100PROCfrcicn(h%,i%)
 1110ENDPROC
 1120DEFPROCenvironment
 1130SYS"OS_GetEnv" TO env$:I%=INSTR(env$,"-quit")
 1140I%=INSTR(env$,"""",I%+1):I%=INSTR(env$,"""",I%+1):env$=MID$(env$,I%+1)
 1150WHILELEFT$(env$,1)=" ":env$=MID$(env$,2):ENDWHILE
 1160x$=LEFT$(env$,INSTR(env$," ")-1):y$=MID$(env$,LENx$+1)
 1170X%=EVALx$:Y%=EVALy$
 1180ENDPROC

� > !RunImage
� for !PrintBuff
� By Ben Barter
(version$= "1.10"
2date$   = "(Feb-92)"
<*BUFFERSIZE 131072
F*BUFFER ON
P"�::� �,�$+" at line "+Þ:�
Z	�init
dpoll%=%1110010110011
n � dummy=�error(�,�$,%10010)
x�
�$ș"Wimp_Poll",poll%,q% � action%
�Ȏ action% �
�!� 2 : ș"Wimp_OpenWindow",,q%
�"� 3 : ș"Wimp_CloseWindow",,q%
�,� 6 : �click(q%!0,q%!4,q%!8,q%!12,q%!16)
�'� 9 : �q%!0>-1 �dec(q%!0,q%!4,q%!8)
�� 17,18,19:�mess
��
�� quit%
�&ș"Wimp_CloseDown",task%,&4B534154
��
�
��init
�?ș"Wimp_Initialise",200,&4B534154,"Printer Buffer" � ,task%
quit%=�:myref%=0
N� q% &100, err1% &100, err2% 15, indmenu% 256, xdiv% 5, ydiv% 5, valid% 10
 � buffer% 900, indirect% 300
"�environment
,;$err2%="PrintBuff":$xdiv%=�X%:$ydiv%=�Y%:$valid%="A0-9"
61ș"Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
@Fș"Wimp_LoadTemplate",,buffer%,indirect%,indirect%+169,-1,"info",0
JMș"Wimp_CreateWindow",,buffer% � info%:$(indirect%+20)=version$+" "+date$
Tș"Wimp_CloseTemplate"
^�sx%,sy%,sm%,px%,py%
hsprite$="!printbuff"
r3ș"Wimp_SpriteOp",40,,sprite$ � ,,,sx%,sy%,,sm%
|6ș"OS_ReadModeVariable",sm%,4 � ,,px%:sx%=sx%<<px%
�6ș"OS_ReadModeVariable",sm%,5 � ,,py%:sy%=sy%<<py%
�
!q%=-2
�*q%!4=0:q%!8=0:q%!12=q%!4+sx%:q%!16=sy%
�q%!20=&1701300A
�$(q%+24)=sprite$
�!ș"Wimp_CreateIcon",,q% � ic%
�Kq%!0=20:q%!4=0:q%!8=0:q%!12=0:q%!16=&801FF:ș"Wimp_SendMessage",17,q%,0
��
�3��click(mx%,my%,b%,w%,i%):� sx%,sy%,sm%,px%,py%
�
� w%=-2 �
� Ȏ b% �
�  � 2   :�menu
�
  � 1,4 :
 �
�
�
&ݤerror(error%,err$,fl%)
0poll%=%1100010110011
:%err1%!0=error%:$(err1%+4)=err$+Þ
D1ș"Wimp_ReportError",err1%,fl%,err2% � click%
N=click%
X��mess:� data$,n%
bȎ q%!16 �
l � 0:      quit%=�
v$ � &801FF: � q%!4<>task% quit%=�
��
��
�+��dec(select%,under%,screed%):�dummy%,m
�&ș"Wimp_GetPointerInfo",,q%:m=q%!8
�Ȏ select% �
�) � 1:� "RMKILL PrinterBuffer":quit%=�
��
��(m �1)=1 �menu
��
���menu:�h%
�h%=22*4
�mr%=indmenu%
�!�lead(buffer%,"PrintBuff",10)
/�bulk(buffer%+28,&00,info%,&7000001,"Info")
,�bulk(buffer%+52,&80,-1,&7000001,"Quit")
.ș"Wimp_CreateMenu",,buffer%,q%!0-64,h%+96
 �
*?��bulk(base%,flag%,ptr%,icfl%,data$):� data1%,data2%,data3%
4� �data$<12 �
>? base%!0=flag%:base%!4=ptr%:base%!8=icfl%:$(base%+12)=data$
H�
RK data1%=mr%:data2%=-1:data3%=�data$+1:icfl%=(icfl%�&FFFFFEFF)�&00000100
\- base%!0=flag%:base%!4=ptr%:base%!8=icfl%
f4 base%!12=data1%:base%!16=data2%:base%!20=data3%
p $mr%=data$
z mr%+=data3%
��
��
���lead(base%,data$,width%)
�M$base%=data$:base%!12=&00070207:base%!16=width%*16:base%!20=44:base%!24=0
��
�7��bias(base%,flag%,ptr%,icfl%,data1%,data2%,data3%)
�,base%!0=flag%:base%!4=ptr%:base%!8=icfl%
�3base%!12=data1%:base%!16=data2%:base%!20=data3%
��
���opnwind(f%)
�+q%!52=h%:ș"Wimp_GetWindowState",,q%+52
�ș"Wimp_OpenWindow",,q%+52
��
��frcicn(h%,i%)
-q%!0=h%:q%!4=i%:ș"Wimp_GetIconState",,q%
2ș"Wimp_ForceRedraw",h%,q%!8,q%!12,q%!16,q%!20
$�
.��wrticn(h%,i%,data$)
8-q%!0=h%:q%!4=i%:ș"Wimp_GetIconState",,q%
B$(q%!28)=data$
L�frcicn(h%,i%)
V�
`��environment
j*ș"OS_GetEnv" � env$:I%=�env$,"-quit")
t<I%=�env$,"""",I%+1):I%=�env$,"""",I%+1):env$=�env$,I%+1)
~"ȕ�env$,1)=" ":env$=�env$,2):�
�*x$=�env$,�env$," ")-1):y$=�env$,�x$+1)
�X%=�x$:Y%=�y$
��
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 14 f4 20 66  6f 72 20 21 50 72 69 6e  |e..... for !Prin|
00000020  74 42 75 66 66 0d 00 1e  13 f4 20 42 79 20 42 65  |tBuff..... By Be|
00000030  6e 20 42 61 72 74 65 72  0d 00 28 14 76 65 72 73  |n Barter..(.vers|
00000040  69 6f 6e 24 3d 20 22 31  2e 31 30 22 0d 00 32 18  |ion$= "1.10"..2.|
00000050  64 61 74 65 24 20 20 20  3d 20 22 28 46 65 62 2d  |date$   = "(Feb-|
00000060  39 32 29 22 0d 00 3c 16  2a 42 55 46 46 45 52 53  |92)"..<.*BUFFERS|
00000070  49 5a 45 20 31 33 31 30  37 32 0d 00 46 0e 2a 42  |IZE 131072..F.*B|
00000080  55 46 46 45 52 20 4f 4e  0d 00 50 22 ee 85 3a ee  |UFFER ON..P"..:.|
00000090  85 87 3a 85 20 9f 2c f6  24 2b 22 20 61 74 20 6c  |..:. .,.$+" at l|
000000a0  69 6e 65 20 22 2b c3 9e  3a e0 0d 00 5a 09 f2 69  |ine "+..:...Z..i|
000000b0  6e 69 74 0d 00 64 18 70  6f 6c 6c 25 3d 25 31 31  |nit..d.poll%=%11|
000000c0  31 30 30 31 30 31 31 30  30 31 31 0d 00 6e 20 ee  |10010110011..n .|
000000d0  85 20 64 75 6d 6d 79 3d  a4 65 72 72 6f 72 28 9f  |. dummy=.error(.|
000000e0  2c f6 24 2c 25 31 30 30  31 30 29 0d 00 78 05 f5  |,.$,%10010)..x..|
000000f0  0d 00 82 24 c8 99 22 57  69 6d 70 5f 50 6f 6c 6c  |...$.."Wimp_Poll|
00000100  22 2c 70 6f 6c 6c 25 2c  71 25 20 b8 20 61 63 74  |",poll%,q% . act|
00000110  69 6f 6e 25 0d 00 8c 10  c8 8e 20 61 63 74 69 6f  |ion%...... actio|
00000120  6e 25 20 ca 0d 00 96 21  c9 20 32 20 3a 20 c8 99  |n% ....!. 2 : ..|
00000130  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00000140  22 2c 2c 71 25 0d 00 a0  22 c9 20 33 20 3a 20 c8  |",,q%...". 3 : .|
00000150  99 22 57 69 6d 70 5f 43  6c 6f 73 65 57 69 6e 64  |."Wimp_CloseWind|
00000160  6f 77 22 2c 2c 71 25 0d  00 aa 2c c9 20 36 20 3a  |ow",,q%...,. 6 :|
00000170  20 f2 63 6c 69 63 6b 28  71 25 21 30 2c 71 25 21  | .click(q%!0,q%!|
00000180  34 2c 71 25 21 38 2c 71  25 21 31 32 2c 71 25 21  |4,q%!8,q%!12,q%!|
00000190  31 36 29 0d 00 b4 27 c9  20 39 20 3a 20 e7 71 25  |16)...'. 9 : .q%|
000001a0  21 30 3e 2d 31 20 f2 64  65 63 28 71 25 21 30 2c  |!0>-1 .dec(q%!0,|
000001b0  71 25 21 34 2c 71 25 21  38 29 0d 00 be 14 c9 20  |q%!4,q%!8)..... |
000001c0  31 37 2c 31 38 2c 31 39  3a f2 6d 65 73 73 0d 00  |17,18,19:.mess..|
000001d0  c8 05 cb 0d 00 d2 0b fd  20 71 75 69 74 25 0d 00  |........ quit%..|
000001e0  dc 26 c8 99 22 57 69 6d  70 5f 43 6c 6f 73 65 44  |.&.."Wimp_CloseD|
000001f0  6f 77 6e 22 2c 74 61 73  6b 25 2c 26 34 42 35 33  |own",task%,&4B53|
00000200  34 31 35 34 0d 00 e6 05  e0 0d 00 f0 0a dd f2 69  |4154...........i|
00000210  6e 69 74 0d 00 fa 3f c8  99 22 57 69 6d 70 5f 49  |nit...?.."Wimp_I|
00000220  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 26  |nitialise",200,&|
00000230  34 42 35 33 34 31 35 34  2c 22 50 72 69 6e 74 65  |4B534154,"Printe|
00000240  72 20 42 75 66 66 65 72  22 20 b8 20 2c 74 61 73  |r Buffer" . ,tas|
00000250  6b 25 0d 01 04 14 71 75  69 74 25 3d a3 3a 6d 79  |k%....quit%=.:my|
00000260  72 65 66 25 3d 30 0d 01  0e 4e de 20 71 25 20 26  |ref%=0...N. q% &|
00000270  31 30 30 2c 20 65 72 72  31 25 20 26 31 30 30 2c  |100, err1% &100,|
00000280  20 65 72 72 32 25 20 31  35 2c 20 69 6e 64 6d 65  | err2% 15, indme|
00000290  6e 75 25 20 32 35 36 2c  20 78 64 69 76 25 20 35  |nu% 256, xdiv% 5|
000002a0  2c 20 79 64 69 76 25 20  35 2c 20 76 61 6c 69 64  |, ydiv% 5, valid|
000002b0  25 20 31 30 0d 01 18 20  de 20 62 75 66 66 65 72  |% 10... . buffer|
000002c0  25 20 39 30 30 2c 20 69  6e 64 69 72 65 63 74 25  |% 900, indirect%|
000002d0  20 33 30 30 0d 01 22 10  f2 65 6e 76 69 72 6f 6e  | 300.."..environ|
000002e0  6d 65 6e 74 0d 01 2c 3b  24 65 72 72 32 25 3d 22  |ment..,;$err2%="|
000002f0  50 72 69 6e 74 42 75 66  66 22 3a 24 78 64 69 76  |PrintBuff":$xdiv|
00000300  25 3d c3 58 25 3a 24 79  64 69 76 25 3d c3 59 25  |%=.X%:$ydiv%=.Y%|
00000310  3a 24 76 61 6c 69 64 25  3d 22 41 30 2d 39 22 0d  |:$valid%="A0-9".|
00000320  01 36 31 c8 99 22 57 69  6d 70 5f 4f 70 65 6e 54  |.61.."Wimp_OpenT|
00000330  65 6d 70 6c 61 74 65 22  2c 2c 22 3c 4f 62 65 79  |emplate",,"<Obey|
00000340  24 44 69 72 3e 2e 54 65  6d 70 6c 61 74 65 73 22  |$Dir>.Templates"|
00000350  0d 01 40 46 c8 99 22 57  69 6d 70 5f 4c 6f 61 64  |..@F.."Wimp_Load|
00000360  54 65 6d 70 6c 61 74 65  22 2c 2c 62 75 66 66 65  |Template",,buffe|
00000370  72 25 2c 69 6e 64 69 72  65 63 74 25 2c 69 6e 64  |r%,indirect%,ind|
00000380  69 72 65 63 74 25 2b 31  36 39 2c 2d 31 2c 22 69  |irect%+169,-1,"i|
00000390  6e 66 6f 22 2c 30 0d 01  4a 4d c8 99 22 57 69 6d  |nfo",0..JM.."Wim|
000003a0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
000003b0  2c 62 75 66 66 65 72 25  20 b8 20 69 6e 66 6f 25  |,buffer% . info%|
000003c0  3a 24 28 69 6e 64 69 72  65 63 74 25 2b 32 30 29  |:$(indirect%+20)|
000003d0  3d 76 65 72 73 69 6f 6e  24 2b 22 20 22 2b 64 61  |=version$+" "+da|
000003e0  74 65 24 0d 01 54 1a c8  99 22 57 69 6d 70 5f 43  |te$..T..."Wimp_C|
000003f0  6c 6f 73 65 54 65 6d 70  6c 61 74 65 22 0d 01 5e  |loseTemplate"..^|
00000400  18 ea 73 78 25 2c 73 79  25 2c 73 6d 25 2c 70 78  |..sx%,sy%,sm%,px|
00000410  25 2c 70 79 25 0d 01 68  18 73 70 72 69 74 65 24  |%,py%..h.sprite$|
00000420  3d 22 21 70 72 69 6e 74  62 75 66 66 22 0d 01 72  |="!printbuff"..r|
00000430  33 c8 99 22 57 69 6d 70  5f 53 70 72 69 74 65 4f  |3.."Wimp_SpriteO|
00000440  70 22 2c 34 30 2c 2c 73  70 72 69 74 65 24 20 b8  |p",40,,sprite$ .|
00000450  20 2c 2c 2c 73 78 25 2c  73 79 25 2c 2c 73 6d 25  | ,,,sx%,sy%,,sm%|
00000460  0d 01 7c 36 c8 99 22 4f  53 5f 52 65 61 64 4d 6f  |..|6.."OS_ReadMo|
00000470  64 65 56 61 72 69 61 62  6c 65 22 2c 73 6d 25 2c  |deVariable",sm%,|
00000480  34 20 b8 20 2c 2c 70 78  25 3a 73 78 25 3d 73 78  |4 . ,,px%:sx%=sx|
00000490  25 3c 3c 70 78 25 0d 01  86 36 c8 99 22 4f 53 5f  |%<<px%...6.."OS_|
000004a0  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
000004b0  22 2c 73 6d 25 2c 35 20  b8 20 2c 2c 70 79 25 3a  |",sm%,5 . ,,py%:|
000004c0  73 79 25 3d 73 79 25 3c  3c 70 79 25 0d 01 90 0a  |sy%=sy%<<py%....|
000004d0  21 71 25 3d 2d 32 0d 01  9a 2a 71 25 21 34 3d 30  |!q%=-2...*q%!4=0|
000004e0  3a 71 25 21 38 3d 30 3a  71 25 21 31 32 3d 71 25  |:q%!8=0:q%!12=q%|
000004f0  21 34 2b 73 78 25 3a 71  25 21 31 36 3d 73 79 25  |!4+sx%:q%!16=sy%|
00000500  0d 01 a4 13 71 25 21 32  30 3d 26 31 37 30 31 33  |....q%!20=&17013|
00000510  30 30 41 0d 01 ae 14 24  28 71 25 2b 32 34 29 3d  |00A....$(q%+24)=|
00000520  73 70 72 69 74 65 24 0d  01 b8 21 c8 99 22 57 69  |sprite$...!.."Wi|
00000530  6d 70 5f 43 72 65 61 74  65 49 63 6f 6e 22 2c 2c  |mp_CreateIcon",,|
00000540  71 25 20 b8 20 69 63 25  0d 01 c2 4b 71 25 21 30  |q% . ic%...Kq%!0|
00000550  3d 32 30 3a 71 25 21 34  3d 30 3a 71 25 21 38 3d  |=20:q%!4=0:q%!8=|
00000560  30 3a 71 25 21 31 32 3d  30 3a 71 25 21 31 36 3d  |0:q%!12=0:q%!16=|
00000570  26 38 30 31 46 46 3a c8  99 22 57 69 6d 70 5f 53  |&801FF:.."Wimp_S|
00000580  65 6e 64 4d 65 73 73 61  67 65 22 2c 31 37 2c 71  |endMessage",17,q|
00000590  25 2c 30 0d 01 cc 05 e1  0d 01 d6 33 dd f2 63 6c  |%,0........3..cl|
000005a0  69 63 6b 28 6d 78 25 2c  6d 79 25 2c 62 25 2c 77  |ick(mx%,my%,b%,w|
000005b0  25 2c 69 25 29 3a ea 20  73 78 25 2c 73 79 25 2c  |%,i%):. sx%,sy%,|
000005c0  73 6d 25 2c 70 78 25 2c  70 79 25 0d 01 e0 0d e7  |sm%,px%,py%.....|
000005d0  20 77 25 3d 2d 32 20 8c  0d 01 ea 0c 20 c8 8e 20  | w%=-2 ..... .. |
000005e0  62 25 20 ca 0d 01 f4 12  20 20 c9 20 32 20 20 20  |b% .....  . 2   |
000005f0  3a f2 6d 65 6e 75 0d 01  fe 0d 20 20 c9 20 31 2c  |:.menu....  . 1,|
00000600  34 20 3a 0d 02 08 06 20  cb 0d 02 12 05 cd 0d 02  |4 :.... ........|
00000610  1c 05 e1 0d 02 26 1c dd  a4 65 72 72 6f 72 28 65  |.....&...error(e|
00000620  72 72 6f 72 25 2c 65 72  72 24 2c 66 6c 25 29 0d  |rror%,err$,fl%).|
00000630  02 30 18 70 6f 6c 6c 25  3d 25 31 31 30 30 30 31  |.0.poll%=%110001|
00000640  30 31 31 30 30 31 31 0d  02 3a 25 65 72 72 31 25  |0110011..:%err1%|
00000650  21 30 3d 65 72 72 6f 72  25 3a 24 28 65 72 72 31  |!0=error%:$(err1|
00000660  25 2b 34 29 3d 65 72 72  24 2b c3 9e 0d 02 44 31  |%+4)=err$+....D1|
00000670  c8 99 22 57 69 6d 70 5f  52 65 70 6f 72 74 45 72  |.."Wimp_ReportEr|
00000680  72 6f 72 22 2c 65 72 72  31 25 2c 66 6c 25 2c 65  |ror",err1%,fl%,e|
00000690  72 72 32 25 20 b8 20 63  6c 69 63 6b 25 0d 02 4e  |rr2% . click%..N|
000006a0  0b 3d 63 6c 69 63 6b 25  0d 02 58 15 dd f2 6d 65  |.=click%..X...me|
000006b0  73 73 3a ea 20 64 61 74  61 24 2c 6e 25 0d 02 62  |ss:. data$,n%..b|
000006c0  0e c8 8e 20 71 25 21 31  36 20 ca 0d 02 6c 16 20  |... q%!16 ...l. |
000006d0  c9 20 30 3a 20 20 20 20  20 20 71 75 69 74 25 3d  |. 0:      quit%=|
000006e0  b9 0d 02 76 24 20 c9 20  26 38 30 31 46 46 3a 20  |...v$ . &801FF: |
000006f0  e7 20 71 25 21 34 3c 3e  74 61 73 6b 25 20 71 75  |. q%!4<>task% qu|
00000700  69 74 25 3d b9 0d 02 80  05 cb 0d 02 8a 05 e1 0d  |it%=............|
00000710  02 94 2b dd f2 64 65 63  28 73 65 6c 65 63 74 25  |..+..dec(select%|
00000720  2c 75 6e 64 65 72 25 2c  73 63 72 65 65 64 25 29  |,under%,screed%)|
00000730  3a ea 64 75 6d 6d 79 25  2c 6d 0d 02 9e 26 c8 99  |:.dummy%,m...&..|
00000740  22 57 69 6d 70 5f 47 65  74 50 6f 69 6e 74 65 72  |"Wimp_GetPointer|
00000750  49 6e 66 6f 22 2c 2c 71  25 3a 6d 3d 71 25 21 38  |Info",,q%:m=q%!8|
00000760  0d 02 a8 10 c8 8e 20 73  65 6c 65 63 74 25 20 ca  |...... select% .|
00000770  0d 02 b2 29 20 c9 20 31  3a ff 20 22 52 4d 4b 49  |...) . 1:. "RMKI|
00000780  4c 4c 20 50 72 69 6e 74  65 72 42 75 66 66 65 72  |LL PrinterBuffer|
00000790  22 3a 71 75 69 74 25 3d  b9 0d 02 bc 05 cb 0d 02  |":quit%=........|
000007a0  c6 13 e7 28 6d 20 80 31  29 3d 31 20 f2 6d 65 6e  |...(m .1)=1 .men|
000007b0  75 0d 02 d0 05 e1 0d 02  da 0e dd f2 6d 65 6e 75  |u...........menu|
000007c0  3a ea 68 25 0d 02 e4 0b  68 25 3d 32 32 2a 34 0d  |:.h%....h%=22*4.|
000007d0  02 ee 10 6d 72 25 3d 69  6e 64 6d 65 6e 75 25 0d  |...mr%=indmenu%.|
000007e0  02 f8 21 f2 6c 65 61 64  28 62 75 66 66 65 72 25  |..!.lead(buffer%|
000007f0  2c 22 50 72 69 6e 74 42  75 66 66 22 2c 31 30 29  |,"PrintBuff",10)|
00000800  0d 03 02 2f f2 62 75 6c  6b 28 62 75 66 66 65 72  |.../.bulk(buffer|
00000810  25 2b 32 38 2c 26 30 30  2c 69 6e 66 6f 25 2c 26  |%+28,&00,info%,&|
00000820  37 30 30 30 30 30 31 2c  22 49 6e 66 6f 22 29 0d  |7000001,"Info").|
00000830  03 0c 2c f2 62 75 6c 6b  28 62 75 66 66 65 72 25  |..,.bulk(buffer%|
00000840  2b 35 32 2c 26 38 30 2c  2d 31 2c 26 37 30 30 30  |+52,&80,-1,&7000|
00000850  30 30 31 2c 22 51 75 69  74 22 29 0d 03 16 2e c8  |001,"Quit").....|
00000860  99 22 57 69 6d 70 5f 43  72 65 61 74 65 4d 65 6e  |."Wimp_CreateMen|
00000870  75 22 2c 2c 62 75 66 66  65 72 25 2c 71 25 21 30  |u",,buffer%,q%!0|
00000880  2d 36 34 2c 68 25 2b 39  36 0d 03 20 05 e1 0d 03  |-64,h%+96.. ....|
00000890  2a 3f dd f2 62 75 6c 6b  28 62 61 73 65 25 2c 66  |*?..bulk(base%,f|
000008a0  6c 61 67 25 2c 70 74 72  25 2c 69 63 66 6c 25 2c  |lag%,ptr%,icfl%,|
000008b0  64 61 74 61 24 29 3a ea  20 64 61 74 61 31 25 2c  |data$):. data1%,|
000008c0  64 61 74 61 32 25 2c 64  61 74 61 33 25 0d 03 34  |data2%,data3%..4|
000008d0  11 e7 20 a9 64 61 74 61  24 3c 31 32 20 8c 0d 03  |.. .data$<12 ...|
000008e0  3e 3f 20 62 61 73 65 25  21 30 3d 66 6c 61 67 25  |>? base%!0=flag%|
000008f0  3a 62 61 73 65 25 21 34  3d 70 74 72 25 3a 62 61  |:base%!4=ptr%:ba|
00000900  73 65 25 21 38 3d 69 63  66 6c 25 3a 24 28 62 61  |se%!8=icfl%:$(ba|
00000910  73 65 25 2b 31 32 29 3d  64 61 74 61 24 0d 03 48  |se%+12)=data$..H|
00000920  05 cc 0d 03 52 4b 20 64  61 74 61 31 25 3d 6d 72  |....RK data1%=mr|
00000930  25 3a 64 61 74 61 32 25  3d 2d 31 3a 64 61 74 61  |%:data2%=-1:data|
00000940  33 25 3d a9 64 61 74 61  24 2b 31 3a 69 63 66 6c  |3%=.data$+1:icfl|
00000950  25 3d 28 69 63 66 6c 25  80 26 46 46 46 46 46 45  |%=(icfl%.&FFFFFE|
00000960  46 46 29 82 26 30 30 30  30 30 31 30 30 0d 03 5c  |FF).&00000100..\|
00000970  2d 20 62 61 73 65 25 21  30 3d 66 6c 61 67 25 3a  |- base%!0=flag%:|
00000980  62 61 73 65 25 21 34 3d  70 74 72 25 3a 62 61 73  |base%!4=ptr%:bas|
00000990  65 25 21 38 3d 69 63 66  6c 25 0d 03 66 34 20 62  |e%!8=icfl%..f4 b|
000009a0  61 73 65 25 21 31 32 3d  64 61 74 61 31 25 3a 62  |ase%!12=data1%:b|
000009b0  61 73 65 25 21 31 36 3d  64 61 74 61 32 25 3a 62  |ase%!16=data2%:b|
000009c0  61 73 65 25 21 32 30 3d  64 61 74 61 33 25 0d 03  |ase%!20=data3%..|
000009d0  70 0f 20 24 6d 72 25 3d  64 61 74 61 24 0d 03 7a  |p. $mr%=data$..z|
000009e0  10 20 6d 72 25 2b 3d 64  61 74 61 33 25 0d 03 84  |. mr%+=data3%...|
000009f0  05 cd 0d 03 8e 05 e1 0d  03 98 1e dd f2 6c 65 61  |.............lea|
00000a00  64 28 62 61 73 65 25 2c  64 61 74 61 24 2c 77 69  |d(base%,data$,wi|
00000a10  64 74 68 25 29 0d 03 a2  4d 24 62 61 73 65 25 3d  |dth%)...M$base%=|
00000a20  64 61 74 61 24 3a 62 61  73 65 25 21 31 32 3d 26  |data$:base%!12=&|
00000a30  30 30 30 37 30 32 30 37  3a 62 61 73 65 25 21 31  |00070207:base%!1|
00000a40  36 3d 77 69 64 74 68 25  2a 31 36 3a 62 61 73 65  |6=width%*16:base|
00000a50  25 21 32 30 3d 34 34 3a  62 61 73 65 25 21 32 34  |%!20=44:base%!24|
00000a60  3d 30 0d 03 ac 05 e1 0d  03 b6 37 dd f2 62 69 61  |=0........7..bia|
00000a70  73 28 62 61 73 65 25 2c  66 6c 61 67 25 2c 70 74  |s(base%,flag%,pt|
00000a80  72 25 2c 69 63 66 6c 25  2c 64 61 74 61 31 25 2c  |r%,icfl%,data1%,|
00000a90  64 61 74 61 32 25 2c 64  61 74 61 33 25 29 0d 03  |data2%,data3%)..|
00000aa0  c0 2c 62 61 73 65 25 21  30 3d 66 6c 61 67 25 3a  |.,base%!0=flag%:|
00000ab0  62 61 73 65 25 21 34 3d  70 74 72 25 3a 62 61 73  |base%!4=ptr%:bas|
00000ac0  65 25 21 38 3d 69 63 66  6c 25 0d 03 ca 33 62 61  |e%!8=icfl%...3ba|
00000ad0  73 65 25 21 31 32 3d 64  61 74 61 31 25 3a 62 61  |se%!12=data1%:ba|
00000ae0  73 65 25 21 31 36 3d 64  61 74 61 32 25 3a 62 61  |se%!16=data2%:ba|
00000af0  73 65 25 21 32 30 3d 64  61 74 61 33 25 0d 03 d4  |se%!20=data3%...|
00000b00  05 e1 0d 03 de 11 dd f2  6f 70 6e 77 69 6e 64 28  |........opnwind(|
00000b10  66 25 29 0d 03 e8 2b 71  25 21 35 32 3d 68 25 3a  |f%)...+q%!52=h%:|
00000b20  c8 99 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |.."Wimp_GetWindo|
00000b30  77 53 74 61 74 65 22 2c  2c 71 25 2b 35 32 0d 03  |wState",,q%+52..|
00000b40  f2 1e c8 99 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |...."Wimp_OpenWi|
00000b50  6e 64 6f 77 22 2c 2c 71  25 2b 35 32 0d 03 fc 05  |ndow",,q%+52....|
00000b60  e1 0d 04 06 13 dd f2 66  72 63 69 63 6e 28 68 25  |.......frcicn(h%|
00000b70  2c 69 25 29 0d 04 10 2d  71 25 21 30 3d 68 25 3a  |,i%)...-q%!0=h%:|
00000b80  71 25 21 34 3d 69 25 3a  c8 99 22 57 69 6d 70 5f  |q%!4=i%:.."Wimp_|
00000b90  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 71  |GetIconState",,q|
00000ba0  25 0d 04 1a 32 c8 99 22  57 69 6d 70 5f 46 6f 72  |%...2.."Wimp_For|
00000bb0  63 65 52 65 64 72 61 77  22 2c 68 25 2c 71 25 21  |ceRedraw",h%,q%!|
00000bc0  38 2c 71 25 21 31 32 2c  71 25 21 31 36 2c 71 25  |8,q%!12,q%!16,q%|
00000bd0  21 32 30 0d 04 24 05 e1  0d 04 2e 19 dd f2 77 72  |!20..$........wr|
00000be0  74 69 63 6e 28 68 25 2c  69 25 2c 64 61 74 61 24  |ticn(h%,i%,data$|
00000bf0  29 0d 04 38 2d 71 25 21  30 3d 68 25 3a 71 25 21  |)..8-q%!0=h%:q%!|
00000c00  34 3d 69 25 3a c8 99 22  57 69 6d 70 5f 47 65 74  |4=i%:.."Wimp_Get|
00000c10  49 63 6f 6e 53 74 61 74  65 22 2c 2c 71 25 0d 04  |IconState",,q%..|
00000c20  42 12 24 28 71 25 21 32  38 29 3d 64 61 74 61 24  |B.$(q%!28)=data$|
00000c30  0d 04 4c 12 f2 66 72 63  69 63 6e 28 68 25 2c 69  |..L..frcicn(h%,i|
00000c40  25 29 0d 04 56 05 e1 0d  04 60 11 dd f2 65 6e 76  |%)..V....`...env|
00000c50  69 72 6f 6e 6d 65 6e 74  0d 04 6a 2a c8 99 22 4f  |ironment..j*.."O|
00000c60  53 5f 47 65 74 45 6e 76  22 20 b8 20 65 6e 76 24  |S_GetEnv" . env$|
00000c70  3a 49 25 3d a7 65 6e 76  24 2c 22 2d 71 75 69 74  |:I%=.env$,"-quit|
00000c80  22 29 0d 04 74 3c 49 25  3d a7 65 6e 76 24 2c 22  |")..t<I%=.env$,"|
00000c90  22 22 22 2c 49 25 2b 31  29 3a 49 25 3d a7 65 6e  |""",I%+1):I%=.en|
00000ca0  76 24 2c 22 22 22 22 2c  49 25 2b 31 29 3a 65 6e  |v$,"""",I%+1):en|
00000cb0  76 24 3d c1 65 6e 76 24  2c 49 25 2b 31 29 0d 04  |v$=.env$,I%+1)..|
00000cc0  7e 22 c8 95 c0 65 6e 76  24 2c 31 29 3d 22 20 22  |~"...env$,1)=" "|
00000cd0  3a 65 6e 76 24 3d c1 65  6e 76 24 2c 32 29 3a ce  |:env$=.env$,2):.|
00000ce0  0d 04 88 2a 78 24 3d c0  65 6e 76 24 2c a7 65 6e  |...*x$=.env$,.en|
00000cf0  76 24 2c 22 20 22 29 2d  31 29 3a 79 24 3d c1 65  |v$," ")-1):y$=.e|
00000d00  6e 76 24 2c a9 78 24 2b  31 29 0d 04 92 11 58 25  |nv$,.x$+1)....X%|
00000d10  3d a0 78 24 3a 59 25 3d  a0 79 24 0d 04 9c 05 e1  |=.x$:Y%=.y$.....|
00000d20  0d ff                                             |..|
00000d22