Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199204.adf » April92 » !AWApr92/Goodies/BBCFontEd/!BBCFontEd/!RunImage

!AWApr92/Goodies/BBCFontEd/!BBCFontEd/!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_199204.adf » April92
Filename: !AWApr92/Goodies/BBCFontEd/!BBCFontEd/!RunImage
Read OK:
File size: 729F bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > !RunImage
   20REM !BBCFontEd
   30REM 1991 Nicholas Waddell
   35REM LEN Archimedes World April 1992
   40:
   50PROCinitialise
   60quit%=0
   70ON ERROR PROCerror(ERR,REPORT$,3)
   80REPEAT
   90  PROCpoll
  100UNTIL quit%
  110SYS "Wimp_CloseDown",taskid%,"TASK"
  120END
  130:
  140DEFPROCpoll
  150block%!0=0
  160SYS "Wimp_Poll",1,block% TO poll%
  170CASE poll% OF
  180  WHEN 1: PROCredraw(block%!0)
  190  WHEN 2: PROCopen(block%!0,-1)
  200  WHEN 3: PROCclose(block%!0)
  210  WHEN 6: PROCmouse_click(block%!12)
  220  WHEN 7: PROCdrag_end
  230  WHEN 8: PROCprocess_key(block%!0,block%!4,block%!24)
  240  WHEN 9: PROCmenu_selection
  250  WHEN 17,18: PROCreceive
  260ENDCASE
  270ENDPROC
  280:
  290DEFPROCerror(error%,report$,flag%)
  300SYS "Wimp_DragBox",,-1
  310SYS "Wimp_CreateMenu",-1
  320adjust%=0
  330IF error%=168 OR error%=204 OR error%=248 OR error%=253 OR error%=67788 OR error%=67756 flag%=1
  340!buffer%=error%
  350$(buffer%+4)=report$+CHR$0
  360SYS "Wimp_ReportError",buffer%,flag%,FNmess("APP") TO ,ok%
  370IF flag%=3 AND ok%=1 PROCfinish
  380ENDPROC
  390:
  400DEFPROCverify
  410PROCerror(1,FNmess("OK1"),3)
  420ENDPROC
  430:
  440DEFPROCfinish
  450quit%=-1
  460ENDPROC
  470:
  480DEFPROCinitialise
  490PROCdimensions
  500PROCvariables
  510PROCload_default("<BBCFontEd$Dir>.Resources.Defaults")
  520PROCload_messages("<BBCFontEd$Dir>.Resources.UK")
  530PROCstart_task
  540PROCload_templates("<BBCFontEd$Dir>.Templates")
  550PROCset_text
  560page%=VAL(FNmess("PAG"))
  570IF page%<>1 page%=0: PROCnew_page
  580OSCLI "IconSprites <BBCFontEd$Dir>.Resources.Sprites"
  590PROCload_menus("<BBCFontEd$Dir>.Resources.Menus")
  600cur_grid%=VAL(FNmess("GRD"))
  610PROCchange_grid(cur_grid%)
  620PROCcheck_font
  630ENDPROC       
  640:
  650DEFPROCcheck_font
  660f%=OPENIN "<BBCFontEd$Dir>.NewFont"
  670CLOSE#f%
  680IF f%<>0 THEN
  690  OSCLI "Print <BBCFontEd$Dir>.NewFont"
  700  PROCredraw_screen
  710ENDIF
  720SYS "Hourglass_On"
  730FOR i%=32 TO 255
  740  SYS "Hourglass_Percentage",INT((i%-33)/223*100)
  750  PROCget_bitmap(i%)
  760  FOR j%=1 TO 8
  770    or_def%(i%-32,j%)=bml%(j%)
  780  NEXT j%
  790NEXT i%
  800SYS "Hourglass_Off"
  810ENDPROC
  820:
  830DEFPROCset_text
  840PROCupdate_icon_text(1,6,FNmess("APP"))
  850PROCupdate_icon_text(1,12,FNmess("PUR"))
  860PROCupdate_icon_text(1,15,FNmess("AUT"))
  870PROCupdate_icon_text(1,18,FNmess("VER"))
  880PROCupdate_icon_text(4,87,FNmess("PAG"))
  890PROCupdate_icon_text(4,116,FNmess("SVF"))
  900PROCupdate_icon_text(4,121,FNmess("SVT"))
  910PROCupdate_icon_text(4,105,FNmess("GRD"))
  920PROCupdate_icon_text(5,10,FNmess("SDI"))
  930ENDPROC
  940:
  950DEFPROCdimensions
  960windows%=7
  970DIM buffer% 128, block% 4096, help% 512
  980DIM handle%(windows%), window_hnd$(windows%)
  990DIM bml%(8), bml2%(8), lines%(8), or_def%(223,16), rp$(4)
 1000DIM iconmenu 256
 1010lines%()=2
 1020ENDPROC
 1030:
 1040DEFPROCvariables
 1050ch%=FALSE: rc%=TRUE: pane%=TRUE: flp%=FALSE: autup%=FALSE
 1060ce%=0: cts%=0: aan%=1: ec%=0: sa%=2: do%=1: oi%=-1
 1070window_hnd$(1)="info"
 1080window_hnd$(2)="characters"
 1090window_hnd$(3)="edit"
 1100window_hnd$(4)="tools"
 1110window_hnd$(5)="savefontas"
 1120window_hnd$(6)="ascii"
 1130window_hnd$(7)="scroll"
 1140ENDPROC
 1150:
 1160DEFPROCload_default(default$)
 1170LOCAL l%,i%,b%
 1180l%=OPENIN default$
 1190FOR i%=32 TO 255
 1200  FOR b%=1 TO 8
 1210    or_def%(i%-32,b%+8)=BGET#l%
 1220  NEXT b%
 1230NEXT i%
 1240CLOSE#l%
 1250ENDPROC
 1260:
 1270DEFPROCload_menus(file$)
 1280LOCAL lmf%,lm$,cm%
 1290lmf%=OPENIN file$
 1300IF lmf%=0 ERROR 0,"Cannot find menu definitions"
 1310menus%=0
 1320SYS "Hourglass_On"
 1330WHILE NOT (EOF#lmf%)
 1340  lm$=GET$#lmf%
 1350  IF LEFT$(lm$,1)=">" menus%+=1
 1360ENDWHILE
 1370IF menus%<>0 THEN
 1380  DIM menus$(menus%-1),items$(menus%-1,20),menu_hnd$(menus%-1),menu_handle%(menus%-1)
 1390  PTR#lmf%=0
 1400  cm%=-1
 1410  ci%=0
 1420  WHILE NOT EOF#lmf%
 1430    lm$=GET$#lmf%
 1440    IF lm$<>"" THEN
 1450      IF LEFT$(lm$,1)<>";" THEN
 1460        IF LEFT$(lm$,1)=">" THEN
 1470          cm%+=1
 1480          menus$(cm%)=MID$(lm$,2)
 1490          menu_hnd$(cm%)=MID$(lm$,INSTR(lm$,">")+1,INSTR(lm$,":")-INSTR(lm$,">")-1)
 1500          ci%=0
 1510        ELSE
 1520          items$(cm%,ci%)=lm$
 1530          ci%+=1
 1540        ENDIF
 1550      ENDIF
 1560    ENDIF
 1570  ENDWHILE
 1580ENDIF
 1590CLOSE#lmf%
 1600DIM mem% 1024*menus%
 1610PROCmake_menus(mem%)
 1620SYS "Hourglass_Off"
 1630ENDPROC
 1640:
 1650DEFPROCmake_menus(xmem%)
 1660FOR menu%=0 TO menus%-1
 1670  menu_handle%(menu%)=FNmenu(menu%,xmem%+(menu%*1024))
 1680NEXT menu%
 1690ENDPROC
 1700:
 1710DEFFNmenu(menu%,xmem%)
 1720PROCmenu_flags(menus$(menu%),xmem%)
 1730FOR item%=0 TO FNitems(menu%)
 1740  PROCmenu_item(menu%,items$(menu%,item%),xmem%)
 1750NEXT item%
 1760=xmem%
 1770:
 1780DEFPROCmenu_flags(title$,xmem%)
 1790$xmem%=FNmess(MID$(title$,INSTR(title$,":")+1,INSTR(title$,",")-INSTR(title$,":")-1))
 1800xmem%?12=7
 1810xmem%?13=2
 1820xmem%?14=7
 1830xmem%?15=0
 1840xmem%!16=VAL(MID$(title$,INSTR(title$,",")+1))
 1850xmem%!20=40
 1860xmem%!24=4
 1870ENDPROC
 1880:
 1890DEFPROCmenu_item(menu%,item$,xmem%)
 1900menu_item%=xmem%+24*(item%+1)+4
 1910!menu_item%=0
 1920IF INSTR(item$,"~")>0 !menu_item%=!menu_item% OR &1
 1930IF INSTR(item$,"|")>0 !menu_item%=!menu_item% OR &2
 1940IF item%=FNitems(menu%) !menu_item%=!menu_item% OR &80
 1950!(menu_item%+4)=FNsubmenu(item$)
 1960!(menu_item%+8)=&07000001
 1970text$=FNmess(LEFT$(item$,INSTR(item$,":")-1))
 1980IF LENtext$<13 THEN
 1990  $(menu_item%+12)=text$
 2000ELSE
 2010  DIM indir% LENtext$
 2020  $indir%=text$
 2030  !(menu_item%+8)=!(menu_item%+8) OR &100
 2040  !(menu_item%+12)=indir%
 2050  !(menu_item%+16)=-1
 2060  !(menu_item%+20)=LENtext$
 2070ENDIF
 2080ENDPROC                          
 2090:
 2100DEFFNsubmenu(item$)
 2110IF INSTR(item$,"-")>0 THEN
 2120  item$=MID$(item$,INSTR(item$,"-")+1)
 2130  FOR hnd%=1 TO windows%
 2140    IF item$=window_hnd$(hnd%) THEN
 2150      =handle%(hnd%)               
 2160    ENDIF
 2170  NEXT
 2180ENDIF
 2190IF INSTR(item$,"+")>0 THEN
 2200  item$=MID$(item$,INSTR(item$,"+")+1)
 2210  FOR hnd%=0 TO menus%-1
 2220    IF item$=menu_hnd$(hnd%) THEN
 2230      =mem%+(hnd%*1024)
 2240    ENDIF
 2250  NEXT
 2260ENDIF
 2270=-1
 2280:
 2290DEFFNitems(menu%)
 2300i%=0
 2310WHILE items$(menu%,i%)<>""
 2320  i%+=1
 2330ENDWHILE
 2340=i%-1
 2350:
 2360DEFPROCload_messages(file$)
 2370LOCAL lmf%,lm$,cm%
 2380lmf%=OPENIN file$
 2390IF lmf%=0 ERROR 0,"Cannot find text resources"
 2400messages%=0
 2410SYS "Hourglass_On"
 2420WHILE NOT (EOF#lmf%)
 2430  lm$=GET$#lmf%
 2440  IF lm$<>"" THEN
 2450    IF LEFT$(lm$,1)<>";" THEN
 2460      IF INSTR(lm$,":")<>0 messages%+=1
 2470    ENDIF
 2480  ENDIF
 2490ENDWHILE
 2500IF messages%<>0 THEN
 2510  DIM messages$(messages%-1),codes$(messages%-1)
 2520  PTR#lmf%=0
 2530  cm%=0
 2540  WHILE NOT EOF#lmf%
 2550    lm$=GET$#lmf%
 2560    IF lm$<>"" THEN
 2570      IF LEFT$(lm$,1)<>";" THEN
 2580        codes$(cm%)=LEFT$(lm$,INSTR(lm$,":")-1)
 2590        messages$(cm%)=MID$(lm$,INSTR(lm$,":")+1)
 2600        cm%+=1
 2610      ENDIF
 2620    ENDIF
 2630  ENDWHILE
 2640ENDIF
 2650CLOSE#lmf%
 2660SYS "Hourglass_Off"
 2670ENDPROC
 2680:
 2690DEFFNmess(code$)
 2700=FNmessage(code$,"","","","")
 2710:
 2720DEFFNmessage(code$,rp$(1),rp$(2),rp$(3),rp$(4))
 2730LOCAL i%,f%
 2740IF messages%=0 THEN
 2750  =code$
 2760ELSE
 2770  FOR ms%=0 TO messages%-1
 2780    IF code$=codes$(ms%) THEN
 2790      message$=messages$(ms%)
 2800      FOR r%=1 TO 4
 2810        rp%=INSTR(message$,"%"+STR$(r%-1))
 2820        IF rp%<>0 message$=LEFT$(message$,rp%-1)+rp$(r%)+MID$(message$,rp%+2)
 2830      NEXT r%
 2840      ms%=messages%
 2850    ENDIF
 2860  NEXT ms%
 2870ENDIF
 2880=message$
 2890:
 2900DEFPROCstart_task
 2910SYS "Wimp_Initialise",200,&4B534154,FNmess("TSK") TO ,taskid%
 2920iconbar%=FNiconbar(-1,0,0,68,68,FNmess("ICON"))
 2930ENDPROC
 2940:
 2950DEFPROCload_templates(file$)
 2960DIM lw% 5120,infw% 512,charw% 512,editw% 512,toolsw% 1536,savew% 512,asciiw% 512,panew% 512
 2970SYS "Wimp_OpenTemplate",,file$
 2980handle%(1)=FNload_template("info",infw%,512)
 2990handle%(2)=FNload_template("characters",charw%,512)
 3000handle%(3)=FNload_template("edit",editw%,512)
 3010handle%(4)=FNload_template("tools",toolsw%,1536)
 3020handle%(5)=FNload_template("savefontas",savew%,512)
 3030handle%(6)=FNload_template("ascii",asciiw%,512)
 3040handle%(7)=FNload_template("scroll",panew%,512)
 3050SYS "Wimp_CloseTemplate"
 3060ENDPROC
 3070:
 3080DEFFNload_template(template$,wa%,blklen%)
 3090SYS "Wimp_LoadTemplate",,lw%,wa%,wa%+blklen%,-1,template$,0
 3100SYS "Wimp_CreateWindow",,lw% TO window_handle%
 3110=window_handle%
 3120:
 3130DEFFNread_indirected_icon_text(window%,icon%)
 3140!buffer%=window%
 3150buffer%!4=icon%
 3160SYS "Wimp_GetIconState",,buffer%
 3170=$(buffer%!28)
 3180:
 3190DEFPROCmouse_click(handle%)
 3200CASE handle% OF
 3210  WHEN -2: CASE block%!8 OF
 3220    WHEN 2: SYS "Wimp_CreateMenu",0,menu_handle%(0),block%!0-100,408
 3230      current_menu%=0
 3240    WHEN 4: block%!0=handle%(2)
 3250      SYS "Wimp_CloseWindow",,block%
 3260      PROCopen(handle%(2),0)
 3270  ENDCASE
 3280  WHEN handle%(2): CASE block%!8 OF
 3290    WHEN 1: IF VAL(STR$FNget_blob)<256 THEN
 3300        sa%=3-sa%
 3310        IF sa%=1 PROCupdate_icon_text(4,32,STR$FNget_blob) ELSE PROCupdate_icon_text(4,37,STR$FNget_blob)
 3320      ENDIF
 3330    WHEN 2: SYS "Wimp_CreateMenu",0,menu_handle%(1),block%!0-190,block%!4+20
 3340      current_menu%=1
 3350    WHEN 4: PROCnew_char(FNget_blob)
 3360  ENDCASE
 3370  WHEN handle%(3): PROCset_blob(block%!16)
 3380  WHEN handle%(4): CASE block%!8 OF
 3390    WHEN 1,4: PROCtools(block%!16,block%!8)
 3400    WHEN 2: SYS "Wimp_CreateMenu",0,menu_handle%(1),block%!0-190,block%!4+20
 3410      current_menu%=1
 3420  ENDCASE
 3430  WHEN handle%(5): CASE block%!16 OF
 3440    WHEN 0: PROCstart_drag(5,0)
 3450    WHEN 6: IF block%!8=4 PROCok_click(TRUE)
 3460  ENDCASE
 3470  WHEN handle%(6): CASE block%!16 OF
 3480    WHEN 9:
 3490      b%=block%!8
 3500      IF b%=1 OR b%=4 THEN
 3510        PROCreverse_icon(handle%(6),7,8,9)
 3520        PROCnew_char(VALFNread_indirected_icon_text(handle%(6),3))
 3530        PROCreverse_icon(handle%(6),7,8,9)
 3540        IF b%=4 SYS "Wimp_CreateMenu",-1
 3550      ENDIF
 3560    ENDCASE
 3570  WHEN handle%(7):
 3580    IF block%!8=4 AND block%!16>-1 THEN
 3590      block%!0=handle%(3)
 3600      SYS "Wimp_CloseWindow",,block%
 3610      PROCscroll(block%!16)
 3620      PROCopen(handle%(3),0)
 3630      ch%=TRUE
 3640    ENDIF
 3650ENDCASE
 3660ENDPROC
 3670:
 3680DEFPROCprocess_key(window%,icon%,key%)
 3690SYS "Wimp_ProcessKey",key%
 3700CASE window% OF
 3710  WHEN handle%(5): CASE key% OF
 3720    WHEN 13: PROCok_click(FALSE)
 3730  ENDCASE
 3740  WHEN handle%(6): CASE key% OF
 3750    WHEN 13: PROCnew_char(VALFNread_indirected_icon_text(handle%(6),3))
 3760    SYS "Wimp_CreateMenu",-1
 3770  ENDCASE
 3780  WHEN handle%(4): CASE icon% OF
 3790    WHEN 32: CASE key% OF
 3800      WHEN 13,&18E,&18F: PROCset_caret(handle%(4),37)
 3810    ENDCASE
 3820    WHEN 37: CASE key% OF
 3830      WHEN 13: PROCtool_go
 3840      WHEN &18E,&18F: PROCset_caret(handle%(4),32)
 3850    ENDCASE
 3860    WHEN 116: CASE key% OF
 3870      WHEN 13,&18E,&18F: PROCset_caret(handle%(4),121)
 3880    ENDCASE
 3890    WHEN 121: CASE key% OF
 3900      WHEN 13:
 3910        SYS "Wimp_GetPointerInfo",,block%
 3920        SYS "Wimp_CreateMenu",0,handle%(5),block%!0-170,block%!4+50
 3930        PROCset_caret(handle%(5),10)
 3940      WHEN &18E,&18F: PROCset_caret(handle%(4),116)
 3950    ENDCASE
 3960    WHEN 105: CASE key% OF
 3970      WHEN 13:
 3980        cur_grid%=VALFNread_indirected_icon_text(handle%(4),105)
 3990        PROCchange_grid(cur_grid%)
 4000        PROCopen(handle%(3),0)
 4010    ENDCASE
 4020  ENDCASE
 4030ENDCASE
 4040ENDPROC
 4050:
 4060DEFPROCset_caret(window%,icon%)
 4070SYS "Wimp_SetCaretPosition",window%,icon%,,,-1,0
 4080ENDPROC
 4090:
 4100DEFPROCmenu_selection
 4110SYS "Wimp_GetPointerInfo",,buffer%
 4120adjust%=(buffer%!8=1)
 4130CASE current_menu% OF
 4140  WHEN 0:
 4150    CASE block%!0 OF
 4160      WHEN 1: PROCdefault_set
 4170      WHEN 2: PROCoriginal_set
 4180      WHEN 3: PROCshow_tools
 4190      WHEN 4: PROCok_click(FALSE)
 4200      WHEN 5: IF ch%=FALSE PROCfinish ELSE PROCverify
 4210    ENDCASE
 4220  WHEN 1:
 4230    CASE block%!0 OF
 4240      WHEN 1: PROCdefault_set
 4250      WHEN 2: PROCoriginal_set
 4260      WHEN 3: PROCshow_tools
 4270      WHEN 4: CASE block%!4 OF
 4280          WHEN 0:
 4290            flp%=-1-flp%
 4300            PROCopen(handle%(3),0)
 4310          WHEN 1:
 4320            pane%=-1-pane%
 4330            PROCchange_flag(menu_handle%(2),1,&1)
 4340            PROCchange_flag(menu_handle%(2),0,&400000)
 4350            IF pane%=FALSE PROCclose(handle%(7)) ELSE PROCopen(handle%(3),0)
 4360          WHEN 2:
 4370            autup%=-1-autup%
 4380            PROCchange_flag(menu_handle%(2),2,&1)
 4390        ENDCASE
 4400      WHEN 5: PROCok_click(FALSE)
 4410    ENDCASE
 4420ENDCASE
 4430IF adjust% SYS "Wimp_CreateMenu",0,menu_handle%(current_menu%)
 4440ENDPROC                
 4450:
 4460DEFPROCchange_flag(menu%,item%,flag%)
 4470LOCAL address%
 4480address%=menu%+28+(24*item%)
 4490IF flag%=&400000 THEN
 4500  address%!8=address%!8 EOR flag%
 4510ELSE
 4520  address%!0=address%!0 EOR flag%
 4530ENDIF
 4540ENDPROC
 4550:
 4560DEFPROCdefault_set
 4570ch%=FALSE
 4580SYS "Hourglass_On"
 4590FOR c%=32 TO 255
 4600  SYS "Hourglass_Percentage",INT((c%-33)/223*100)
 4610  PROCdefault_character(c%,1)
 4620NEXT c%
 4630SYS "Hourglass_Off"
 4640PROCput_char(ce%)
 4650PROCredraw_screen
 4660ENDPROC
 4670:
 4680DEFPROCoriginal_set
 4690ch%=FALSE
 4700SYS "Hourglass_On"
 4710FOR c%=32 TO 255
 4720  SYS "Hourglass_Percentage",INT((c%-33)/223*100)
 4730  PROCdefault_character(c%,2)
 4740NEXT c%
 4750SYS "Hourglass_Off"
 4760PROCput_char(ce%)
 4770PROCredraw_screen
 4780ENDPROC
 4790:
 4800DEFPROCshow_tools
 4810PROCchange_flag(menu_handle%(0),3,&400000)
 4820PROCchange_flag(menu_handle%(1),3,&400000)
 4830block%!0=handle%(4)
 4840SYS "Wimp_CloseWindow",,block%
 4850PROCopen(handle%(4),0)
 4860ENDPROC
 4870:
 4880DEFFNiconbar(handle%,x%,y%,w%,h%,icon$)
 4890block%!0=handle%
 4900block%!4=x%
 4910block%!8=y%
 4920block%!12=x%+w%
 4930block%!16=y%+h%
 4940block%!20=&3102
 4950DIM block%!24 LENicon$+1
 4960$(block%!24)=icon$
 4970block%!28=1
 4980block%!32=LENicon$+1
 4990SYS "Wimp_CreateIcon",,block% TO icon_handle%
 5000=icon_handle%
 5010:
 5020DEFPROCredraw_screen
 5030SYS "Wimp_ForceRedraw",-1,-1E9,-1E9,1E9,1E9
 5040ENDPROC
 5050:
 5060DEFPROCredraw(handle%)
 5070block%!0=handle%
 5080SYS "Wimp_RedrawWindow",0,block% TO more%
 5090WHILE more%
 5100  SYS "Wimp_GetRectangle",0,block% TO more%
 5110ENDWHILE
 5120ENDPROC
 5130:
 5140DEFPROCclose(handle%)
 5150block%!0=handle%
 5160SYS "Wimp_CloseWindow",0,block%
 5170IF handle%=handle%(2) OR handle%=handle%(3) THEN
 5180  IF do%=1 THEN
 5190    PROCupdate_icon_text(4,100,"Default Character")
 5200  ELSE
 5210    PROCupdate_icon_text(4,100,"Original Char")
 5220  ENDIF
 5230  PROCupdate_icon_text(4,50,"Apply to Current")
 5240  IF handle%=handle%(2) THEN
 5250    PROCclose(handle%(3))
 5260  ENDIF
 5270  IF handle%=handle%(3) THEN
 5280    PROCclose(handle%(7))
 5290    ce%=0
 5300    IF ec%=1 THEN
 5310      IF autup% PROCredraw_screen
 5320      ec%=0
 5330    ENDIF
 5340  ENDIF
 5350ENDIF
 5360:
 5370IF handle%=handle%(4) THEN
 5380  PROCchange_flag(menu_handle%(0),3,&400000)
 5390  PROCchange_flag(menu_handle%(1),3,&400000)
 5400ENDIF
 5410ENDPROC
 5420:
 5430DEFPROCopen(handle%,a%)
 5440IF handle%=handle%(3) AND ce%=0 ENDPROC
 5450block%!0=handle%
 5460IF NOT a% SYS "Wimp_GetWindowState",0,block%
 5470SYS "Wimp_OpenWindow",0,block%
 5480CASE handle% OF
 5490  WHEN handle%(3): IF pane% PROCredraw_pane
 5500ENDCASE
 5510ENDPROC
 5520:
 5530DEFPROCredraw_pane
 5540SYS "Wimp_GetWindowOutline",,block%
 5550CASE flp% OF
 5560  WHEN FALSE:
 5570    block%!4-=62
 5580    block%!8+=108
 5590    block%!12=block%!4+62
 5600    block%!16=block%!8+212
 5610  WHEN TRUE:
 5620    block%!4+=242
 5630    block%!8+=108
 5640    block%!12=block%!4+62
 5650    block%!16=block%!8+212
 5660ENDCASE
 5670block%!0=handle%(7)
 5680SYS "Wimp_OpenWindow",0,block%
 5690ENDPROC
 5700:
 5710DEFFNx
 5720=block%!4-block%!20
 5730:
 5740DEFFNy
 5750=block%!16-block%!24
 5760:
 5770DEFPROCupdate_icon_text(window%,icon%,text$)
 5780block%!0=handle%(window%)
 5790block%!4=icon%
 5800SYS "Wimp_GetIconState",,block%
 5810$block%!28=text$
 5820block%!8=0
 5830block%!12=0
 5840SYS "Wimp_SetIconState",,block%
 5850ENDPROC
 5860:
 5870DEFPROCreceive
 5880CASE block%! 16 OF
 5890  WHEN 0     : PROCfinish
 5900  WHEN 2     : PROCsaveack
 5910  WHEN 3     : PROCload_font(FNstring(block%+44))
 5920  WHEN &502  : PROChelp(block%!32,block%!36)
 5930  WHEN &400C2: PROCtaskinitialise(LEFT$($(block%+28),LENFNmess("TSK")),block%!4)
 5940ENDCASE
 5950ENDPROC
 5960:
 5970DEFPROChelp(handle%,icon%)
 5980LOCAL help$
 5990CASE handle% OF
 6000  WHEN -2: help$=FNmess("Hicn")
 6010  WHEN handle%(2): help$=FNmess("Hcsw")
 6020  WHEN handle%(3): help$=FNmess("Hcew")
 6030  WHEN handle%(4): help$=FNmess("Htlw")
 6040    CASE icon% OF
 6050      WHEN 9,10,11,12,13,14,15,16,17,18,19,20: help$+=FNmess("Htls")
 6060      WHEN 32,37: help$+=FNmess("Htcr")
 6070      WHEN 43: help$+=FNmess("Htok")
 6080      WHEN 44: help$+=FNmess("Haan")
 6090      WHEN 50: help$+=FNmess("Htcc")
 6100      WHEN 75,76,77,78,79,80,81,82: help$+=FNmess("Hlns")
 6110      WHEN 84,88: help$+=FNmess("Hcpa")       
 6120      WHEN 87: help$+=FNmess("Hcpe")
 6130      WHEN 94: help$+=FNmess("Hshp")
 6140      WHEN 100: help$+=FNmess("Hcdo")
 6150      WHEN 105: help$+=FNmess("Hgpc")
 6160      WHEN 111: help$+=FNmess("Hgok")
 6170      WHEN 116,121: help$+=FNmess("Hscr")
 6180    ENDCASE
 6190  WHEN handle%(5): help$=FNmess("Hsdw")
 6200  WHEN handle%(6): help$=FNmess("Hasw")
 6210  WHEN handle%(7): help$=FNmess("Hscw")
 6220ENDCASE
 6230IF help$<>"" THEN
 6240  !help%=(25+LENhelp$) AND NOT 3
 6250  help%!12=block%!8
 6260  help%!16=&503
 6270  $(help%+20)=help$+CHR$0
 6280  SYS "Wimp_SendMessage",17,help%,block%!4
 6290ENDIF
 6300ENDPROC      
 6310:
 6320DEFPROCtaskinitialise(task$,task%)
 6330IF task$=FNmess("TSK") AND task%<>taskid% THEN
 6340  block%!16=0
 6350  SYS "Wimp_SendMessage",17,block%,block%!4
 6360  PROCerror(1,"Task already initialised",1)
 6370ENDIF
 6380ENDPROC
 6390:
 6400DEFFNstring(a%)
 6410LOCAL b$
 6420b$=""
 6430WHILE ?a%<>0
 6440  b$+=CHR$?a%
 6450  a%+=1
 6460ENDWHILE
 6470=b$
 6480:
 6490DEFPROCok_click(icon_click%)
 6500IF icon_click% THEN
 6510  PROCreverse_icon(handle%(5),4,5,6)
 6520  PROCreverse_icon(handle%(5),4,5,6)
 6530ENDIF
 6540name$=FNread_indirected_icon_text(handle%(5),10)
 6550IF name$="" PROCerror(1,FNmess("OK2"),1): ENDPROC
 6560IF INSTR(name$,".")=0 PROCerror(1,FNmess("OK3"),1): ENDPROC
 6570PROCsave(name$)
 6580ENDPROC
 6590:
 6600DEFPROCstart_drag(window%,icon%)
 6610block%!0=handle%(window%)
 6620SYS "Wimp_GetWindowState",,block%
 6630wx%=block%!4-block%!20
 6640wy%=block%!16-block%!24
 6650block%!4=icon%
 6660SYS "Wimp_GetIconState",,block%
 6670block%!0=handle%(window%)
 6680block%!4=5
 6690block%!8+=wx%
 6700block%!12+=wy%
 6710block%!16+=wx%
 6720block%!20+=wy%-2
 6730block%!24=0
 6740block%!28=0
 6750block%!32=(FNread_mode(-1,11)+1)*2^FNread_mode(-1,4)
 6760block%!36=(FNread_mode(-1,12)+1)*2^FNread_mode(-1,5)
 6770SYS "Wimp_DragBox",,block%
 6780ENDPROC
 6790:
 6800DEFFNread_mode(mode%,var%)
 6810SYS "OS_ReadModeVariable",mode%,var% TO ,,value%
 6820=value%
 6830:
 6840DEFPROCdrag_end
 6850SYS "Wimp_GetPointerInfo",,block%
 6860mx%=block%!0
 6870my%=block%!4
 6880window%=block%!12
 6890IF window%<1 ENDPROC
 6900name$=FNfilename(FNread_indirected_icon_text(handle%(5),10))
 6910block%!0=44+((LENname$ DIV 4)+1)*4
 6920block%!16=1
 6930block%!20=window%
 6940block%!24=-1
 6950block%!28=mx%
 6960block%!32=my%
 6970block%!36=910
 6980block%!40=&FF7
 6990$(block%+44)=name$+CHR$0
 7000SYS "Wimp_SendMessage",17,block%,window%
 7010ENDPROC
 7020:
 7030DEFPROCsaveack
 7040name$=FNstring(block%+44)
 7050IF FNfilename(name$)="" PROCerror(1,FNmess("OK2"),1): ENDPROC
 7060PROCsave(name$)
 7070ENDPROC
 7080:
 7090DEFPROCload_font(l$)
 7100IF block%!40<>&FF7 PROCerror(1,FNmess("OK4"),1): ENDPROC
 7110OSCLI"PRINT "+l$
 7120PROCredraw_screen
 7130PROCupdate_icon_text(5,10,l$)
 7140ENDPROC
 7150:
 7160DEFFNfilename(f$)
 7170WHILE INSTR(f$,".")>0
 7180  f$=MID$(f$,INSTR(f$,".")+1)
 7190ENDWHILE
 7200=f$
 7210:
 7220DEFPROCedit_char(char%)
 7230block%!0=handle%(3)
 7240SYS "Wimp_CloseWindow",0,block%
 7250PROCretitle(handle%(3),STR$char%+" : "+CHR$char%)
 7260IF do%=1 THEN
 7270  PROCupdate_icon_text(4,100,"Default ' "+CHR$char%+" '")
 7280ELSE
 7290  PROCupdate_icon_text(4,100,"Original ' "+CHR$char%+" '")
 7300ENDIF
 7310PROCupdate_icon_text(4,50,"Apply to  ' "+CHR$char%+" '")
 7320PROCput_char(char%)
 7330PROCopen(handle%(3),0)
 7340IF ec%<>0 AND autup% PROCredraw_screen
 7350ec%=0
 7360ENDPROC          
 7370:
 7380DEFPROCnew_char(char%)
 7390IF char%<32 OR char%>255 OR char%=127 ENDPROC
 7400ce%=char%
 7410PROCedit_char(char%)
 7420ENDPROC
 7430:
 7440DEFPROCretitle(handle%,title$)
 7450block%!0=handle%
 7460SYS "Wimp_GetWindowInfo",,block%
 7470$block%!76=title$
 7480block%!84=LENtitle$
 7490ENDPROC
 7500:
 7510DEFPROCput_char(char%)
 7520PROCget_bitmap(char%)
 7530block%!0=handle%(3)
 7540FOR y%=1 TO 8
 7550  FOR x%=7 TO 0 STEP -1
 7560    block%!4=(y%-1)*8+(7-x%)
 7570    IF bml%(y%)-2^x%>-1 THEN
 7580      bml%(y%)-=2^x%
 7590      block%!8=&70000000
 7600      block%!12=&F0000000
 7610    ELSE
 7620      block%!8=&10000000
 7630      block%!12=&F0000000
 7640    ENDIF
 7650    SYS "Wimp_SetIconState",,block%
 7660  NEXT x%
 7670NEXT y%
 7680ENDPROC
 7690:
 7700DEFPROCreverse_icon(handle%,icon1%,icon2%,icon3%)
 7710block%!0=handle%
 7720block%!4=icon1%
 7730block%!8=1<<30
 7740block%!12=0
 7750SYS "Wimp_SetIconState",,block%
 7760block%!4=icon2%
 7770SYS "Wimp_SetIconState",,block%
 7780block%!4=icon3%
 7790block%!8=15<<28
 7800SYS "Wimp_SetIconState",,block%
 7810REPEAT
 7820  SYS "OS_Mouse" TO ,,but%
 7830UNTIL but%=0
 7840ENDPROC
 7850:
 7860DEFPROCchange_grid(grid_col%)
 7870block%!0=handle%(3)
 7880SYS "Wimp_CloseWindow",,block%
 7890IF grid_col%<0 OR grid_col%>15 grid_col%=1
 7900block%!0=handle%(3)
 7910FOR icon%=0 TO 63
 7920  block%!4=icon%
 7930  block%!8=grid_col%<<24
 7940  block%!12=&F000000
 7950  SYS "Wimp_SetIconState",,block%
 7960NEXT icon%
 7970ENDPROC
 7980:
 7990DEFPROCget_bitmap(c%)
 8000buffer%?0=c%
 8010SYS "OS_Word",10,buffer%
 8020FOR gbm%=1 TO 8
 8030  bml%(gbm%)=buffer%?gbm%
 8040NEXT gbm%
 8050ENDPROC
 8060:
 8070DEFPROCset_blob(icon%)
 8080SYS "Wimp_GetPointerInfo",,block%
 8090mouse%=block%!8
 8100IF mouse%=0 THEN rc%=TRUE
 8110IF mouse%=1 OR mouse%=2 OR (mouse%=4 AND (icon%<>oi% OR rc%)) THEN
 8120  ch%=TRUE
 8130  rc%=FALSE
 8140  block%!0=handle%(3)
 8150  block%!4=icon%
 8160  IF mouse%=1 THEN
 8170    block%!8=&10000000
 8180    block%!12=&F0000000
 8190  ENDIF
 8200  IF mouse%=2 THEN
 8210    block%!8=&70000000
 8220    block%!12=&F0000000
 8230  ENDIF
 8240  IF mouse%=4 THEN
 8250    block%!8=&60000000
 8260    block%!12=0
 8270  ENDIF
 8280  SYS "Wimp_SetIconState",,block%
 8290  bx%=8-(icon% MOD 8)
 8300  by%=(icon% DIV 8)+1
 8310  PROCget_bitmap(ce%)
 8320  IF mouse%=1 bml%(by%)=bml%(by%) AND (255-(2^(bx%-1)))
 8330  IF mouse%=2 bml%(by%)=bml%(by%) OR 2^(bx%-1)
 8340  IF mouse%=4 bml%(by%)=bml%(by%) EOR 2^(bx%-1)
 8350  VDU 23,ce%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
 8360  PROCupdate_char(ce%)
 8370  ec%=1
 8380  oi%=icon%
 8390ENDIF
 8400ENDPROC
 8410:
 8420DEFPROCupdate_char(char%)
 8430chars%=(char%-32)-((page%-1)*91)
 8440chars%+=chars% DIV 13+15
 8450block%!0=handle%(2)
 8460block%!4=chars%
 8470block%!8=0
 8480block%!12=0
 8490SYS "Wimp_SetIconState",,block%
 8500ENDPROC
 8510:
 8520DEFFNget_blob
 8530SYS "Wimp_GetPointerInfo",,buffer%
 8540i%=buffer%!16+17
 8550IF (i%-17) MOD 14=0 =256
 8560IF i%<32 =256
 8570FOR cd%=1 TO 8
 8580  IF i%>32+cd%*13 i%-=1
 8590NEXT cd%
 8600i%+=(page%-1)*91
 8610=i%
 8620:
 8630DEFPROCtools(i%,b%)
 8640CASE i% OF
 8650  WHEN cts%: IF b%=1 cts%=0
 8660  WHEN 9,10,11,12,13,14,15,16,17,18,19,20: cts%=i%
 8670  WHEN 75,76,77,78,79,80,81,82: lines%(i%-74)=3-lines%(i%-74)
 8680  WHEN 44: aan%=3-aan%
 8690  WHEN 100: CASE b% OF
 8700    WHEN 1: PROCchange_def
 8710    WHEN 4: PROCreverse_icon(handle%(4),98,99,100)
 8720      block%!0=handle%(3)
 8730      SYS "Wimp_CloseWindow",,block%
 8740      PROCdefault_character(ce%,do%)
 8750      PROCput_char(ce%)
 8760      PROCopen(handle%(3),0)
 8770      PROCreverse_icon(handle%(4),98,99,100)
 8780  ENDCASE
 8790  WHEN 84,88: IF b%=4 PROCpage
 8800  WHEN 94: IF b%=4 THEN
 8810      PROCreverse_icon(handle%(4),92,93,94)
 8820      PROCnew_page
 8830      PROCopen(handle%(2),0)
 8840      PROCreverse_icon(handle%(4),92,93,94)
 8850    ENDIF
 8860  WHEN 43: IF b%=4 THEN
 8870      PROCreverse_icon(handle%(4),41,42,43)
 8880      PROCtool_go
 8890      PROCreverse_icon(handle%(4),41,42,43)
 8900    ENDIF
 8910  WHEN 50: IF b%=4 THEN
 8920      PROCreverse_icon(handle%(4),48,49,50)
 8930      PROCtool_go
 8940      PROCreverse_icon(handle%(4),48,49,50)
 8950    ENDIF
 8960  WHEN 111: IF b%=4 THEN
 8970      PROCreverse_icon(handle%(4),109,110,111)
 8980      cur_grid%=VALFNread_indirected_icon_text(handle%(4),105)
 8990      PROCchange_grid(cur_grid%)
 9000      PROCopen(handle%(3),0)
 9010      PROCreverse_icon(handle%(4),109,110,111)
 9020    ENDIF
 9030ENDCASE
 9040ENDPROC
 9050:
 9060DEFPROCtool_go
 9070IF i%=50 AND ce%=0 PROCerror(1,FNmess("OK5"),1): ENDPROC
 9080IF i%=50 AND (cts%=14 OR cts%=17) PROCerror(1,FNmess("OK6"),1): ENDPROC
 9090IF cts%=0 PROCerror(1,FNmess("OK7"),1): ENDPROC
 9100IF FNlines=0 AND cts%<>9 AND cts%<>10 AND cts%<>11 AND cts%<>12 AND cts%<>20 PROCerror(1,FNmess("OK8"),1): ENDPROC
 9110block%!0=handle%(3)
 9120SYS "Wimp_CloseWindow",,block%
 9130ON cts%-8 PROCoblique(1),PROCoblique(2),PROCflip(1),PROCflip(2),PROCclear,PROCcopy,PROCthin,PROCset,PROCswap,PROCbold,PROCinverse,PROCrotate
 9140ch%=TRUE
 9150PROCput_char(ce%)
 9160PROCopen(handle%(3),0)
 9170IF autup% PROCredraw_screen ELSE PROCredraw(handle%(2))
 9180ENDPROC
 9190:
 9200DEFPROCchange_def
 9210do%=3-do%
 9220CASE do% OF
 9230  WHEN 1: IF ce%=0 PROCupdate_icon_text(4,100,"Default Character")
 9240    IF ce%<>0 PROCupdate_icon_text(4,100,"Default ' "+CHR$ce%+" '")
 9250  WHEN 2: IF ce%=0 PROCupdate_icon_text(4,100,"Original Char")
 9260    IF ce%<>0 PROCupdate_icon_text(4,100,"Original ' "+CHR$ce%+" '")
 9270ENDCASE
 9280ENDPROC
 9290:
 9300DEFFNlines
 9310FOR cl%=1 TO 8
 9320  IF lines%(cl%)=2 =1
 9330NEXT cl%
 9340=0
 9350:
 9360DEFPROCget_chars
 9370f%=VAL(FNread_indirected_icon_text(handle%(4),32))
 9380t$=FNread_indirected_icon_text(handle%(4),37)
 9390t%=VAL(t$)
 9400IF i%=50 f%=ce%: t%=ce%
 9410ENDPROC
 9420:
 9430DEFPROCalphanum(nc%)
 9440IF nc%=58 f%=65: t%=90
 9450IF nc%=91 f%=97: t%=122
 9460ENDPROC
 9470:
 9480DEFFNcheck_chars
 9490IF f%<32 OR f%>255 PROCerror(1,FNmess("OK9"),1): =1
 9500IF t%<32 AND t$<>"" OR t%>255 PROCerror(1,FNmess("OK9"),1): =1
 9510IF t%<f% AND t$<>"" PROCerror(1,FNmess("OK9"),1): =1
 9520=2
 9530:
 9540DEFPROCclear
 9550PROCget_chars
 9560IF aan%=2 f%=48: t%=57
 9570IF FNcheck_chars<>2 ENDPROC
 9580REPEAT
 9590  FOR xx%=f% TO t%
 9600    PROCget_bitmap(xx%)
 9610    FOR lc%=1 TO 8
 9620      IF lines%(lc%)=2 bml%(lc%)=0
 9630    NEXT lc%
 9640    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
 9650  NEXT xx%
 9660  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
 9670UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
 9680ENDPROC
 9690:
 9700DEFPROCset
 9710PROCget_chars
 9720IF aan%=2 f%=48: t%=57
 9730IF FNcheck_chars<>2 ENDPROC
 9740REPEAT
 9750  FOR xx%=f% TO t%
 9760    PROCget_bitmap(xx%)
 9770    FOR lc%=1 TO 8
 9780      IF lines%(lc%)=2 bml%(lc%)=255
 9790    NEXT lc%
 9800    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
 9810  NEXT xx%
 9820  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
 9830UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
 9840ENDPROC
 9850:
 9860DEFPROCinverse
 9870PROCget_chars
 9880IF aan%=2 f%=48: t%=57
 9890IF FNcheck_chars<>2 ENDPROC
 9900REPEAT
 9910  FOR xx%=f% TO t%
 9920    PROCget_bitmap(xx%)
 9930    FOR lc%=1 TO 8
 9940      IF lines%(lc%)=2 bml%(lc%)=NOT bml%(lc%)
 9950    NEXT lc%
 9960    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
 9970  NEXT xx%
 9980  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
 9990UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
10000ENDPROC
10010:
10020DEFPROCcopy
10030PROCget_chars
10040IF f%<32 OR f%>255 PROCerror(1,FNmess("OK9"),1): ENDPROC
10050IF t%<32 OR t%>255 PROCerror(1,FNmess("OK9"),1): ENDPROC
10060PROCget_bitmap(f%)
10070FOR i%=1 TO 8
10080  bml2%(i%)=bml%(i%)
10090NEXT i%
10100PROCget_bitmap(t%)
10110FOR i%=1 TO 8
10120  IF lines%(i%)=2 bml%(i%)=bml2%(i%)
10130NEXT i%
10140VDU 23,t%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10150ENDPROC
10160:
10170DEFPROCswap
10180PROCget_chars
10190IF f%<32 OR f%>255 PROCerror(1,FNmess("OK9"),1): ENDPROC
10200IF t%<32 OR t%>255 PROCerror(1,FNmess("OK9"),1): ENDPROC
10210PROCget_bitmap(t%)
10220FOR i%=1 TO 8
10230  bml2%(i%)=bml%(i%)
10240NEXT i%
10250PROCget_bitmap(f%)
10260FOR lc%=1 TO 8
10270  IF lines%(lc%)=1 d%=bml%(lc%): bml%(lc%)=bml2%(lc%): bml2%(lc%)=d%
10280NEXT lc%
10290VDU 23,f%,bml2%(1),bml2%(2),bml2%(3),bml2%(4),bml2%(5),bml2%(6),bml2%(7),bml2%(8)
10300VDU 23,t%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10310ENDPROC
10320:
10330DEFPROCbold
10340PROCget_chars
10350IF aan%=2 f%=48: t%=57
10360IF FNcheck_chars<>2 ENDPROC
10370REPEAT
10380  FOR xx%=f% TO t%
10390    PROCget_bitmap(xx%)
10400    FOR lc%=1 TO 8
10410      IF lines%(lc%)=2 bml%(lc%)=bml%(lc%) OR bml%(lc%)/2
10420    NEXT lc%
10430    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10440  NEXT xx%
10450  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
10460UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
10470ENDPROC
10480:
10490DEFPROCthin
10500PROCget_chars
10510IF aan%=2 f%=48: t%=57
10520IF FNcheck_chars<>2 ENDPROC
10530REPEAT
10540  FOR xx%=f% TO t%
10550    PROCget_bitmap(xx%)
10560    FOR lc%=1 TO 8
10570      IF lines%(lc%)=2 bml%(lc%)=bml%(lc%) AND bml%(lc%)/2
10580    NEXT lc%
10590    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10600  NEXT xx%
10610  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
10620UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
10630ENDPROC
10640:
10650DEFPROCoblique(tp%)
10660PROCget_chars
10670IF aan%=2 f%=48: t%=57
10680IF FNcheck_chars<>2 ENDPROC
10690REPEAT
10700  FOR xx%=f% TO t%
10710    PROCget_bitmap(xx%)
10720    IF tp%=1 bml%(5)=bml%(5)*2: bml%(6)=bml%(6)*2: bml%(7)=bml%(7)*2: bml%(8)=bml%(8)*2 ELSE bml%(1)=bml%(1)/2: bml%(2)=bml%(2)/2: bml%(3)=bml%(3)/2: bml%(6)=bml%(6)*2: bml%(7)=bml%(7)*2: bml%(8)=bml%(8)*4
10730    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10740  NEXT xx%
10750  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
10760UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
10770ENDPROC
10780:
10790DEFPROCflip(tp%)
10800PROCget_chars
10810IF aan%=2 f%=48: t%=57
10820IF FNcheck_chars<>2 ENDPROC
10830REPEAT
10840  FOR xx%=f% TO t%
10850    PROCget_bitmap(xx%)
10860    IF tp%=1 PROCflipx ELSE PROCflipy
10870    VDU 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
10880  NEXT xx%
10890  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
10900UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
10910ENDPROC
10920:
10930DEFPROCflipx
10940d%=bml%(8)
10950bml%(8)=bml%(1)
10960bml%(1)=d%
10970d%=bml%(7)
10980bml%(7)=bml%(2)
10990bml%(2)=d%
11000d%=bml%(6)
11010bml%(6)=bml%(3)
11020bml%(3)=d%
11030d%=bml%(5)
11040bml%(5)=bml%(4)
11050bml%(4)=d%
11060ENDPROC
11070:
11080DEFPROCflipy
11090FOR l%=1 TO 8
11100  FOR c%=1 TO 4
11110    rb%=2^(c%-1)
11120    d1%=bml%(l%) AND rb%
11130    lb%=2^(8-c%)
11140    d2%=bml%(l%) AND lb%
11150    IF d2%=lb% bml%(l%)=bml%(l%) OR rb% ELSE bml%(l%)=bml%(l%) AND NOT rb%
11160    IF d1%=rb% bml%(l%)=bml%(l%) OR lb% ELSE bml%(l%)=bml%(l%) AND NOT lb%
11170  NEXT c%
11180NEXT l%
11190ENDPROC
11200:
11210DEFPROCrotate
11220PROCget_chars
11230IF aan%=2 f%=48: t%=57
11240IF FNcheck_chars<>2 ENDPROC
11250REPEAT
11260  FOR xx%=f% TO t%
11270    PROCget_bitmap(xx%)
11280    FOR r%=1 TO 8
11290      c%=0
11300      FOR lc%=1 TO 8
11310        IF (bml%(lc%) AND 2^(8-r%)) c%+=2^(lc%-1)
11320      NEXT lc%
11330      bml2%(r%)=c%
11340    NEXT r%
11350    VDU 23,xx%,bml2%(1),bml2%(2),bml2%(3),bml2%(4),bml2%(5),bml2%(6),bml2%(7),bml2%(8)
11360  NEXT xx%
11370  IF aan%=2 AND xx%<123 PROCalphanum(xx%)
11380UNTIL (xx%>t% AND aan%=1) OR (xx%=123 AND aan%=2)
11390ENDPROC
11400:
11410DEFPROCscroll(i%)
11420PROCget_bitmap(ce%)
11430ON i%+1 PROCscroll_u,PROCscroll_l,PROCscroll_r,PROCscroll_d
11440VDU 23,ce%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
11450PROCput_char(ce%)
11460PROCupdate_char(ce%)
11470ENDPROC
11480:
11490DEFPROCscroll_l
11500FOR s%=1 TO 8
11510  bml%(s%)=bml%(s%)*2
11520NEXT s%
11530ENDPROC
11540:
11550DEFPROCscroll_r
11560FOR s%=1 TO 8
11570  bml%(s%)=bml%(s%)/2
11580NEXT s%
11590ENDPROC
11600:
11610DEFPROCscroll_u
11620FOR s%=1 TO 7
11630  bml%(s%)=bml%(s%+1)
11640NEXT s%
11650bml%(8)=0
11660ENDPROC
11670:
11680DEFPROCscroll_d
11690FOR s%=8 TO 2 STEP-1
11700  bml%(s%)=bml%(s%-1)
11710NEXT s%
11720bml%(1)=0
11730ENDPROC
11740:
11750DEFPROCdefault_character(char%,wt%)
11760IF char%=0 PROCerror(1,FNmess("OK5"),1): ENDPROC
11770IF wt%=1 THEN
11780  VDU 23,char%,or_def%(char%-32,9),or_def%(char%-32,10),or_def%(char%-32,11),or_def%(char%-32,12),or_def%(char%-32,13),or_def%(char%-32,14),or_def%(char%-32,15),or_def%(char%-32,16)
11790ELSE
11800  VDU 23,char%,or_def%(char%-32,1),or_def%(char%-32,2),or_def%(char%-32,3),or_def%(char%-32,4),or_def%(char%-32,5),or_def%(char%-32,6),or_def%(char%-32,7),or_def%(char%-32,8)
11810ENDIF
11820IF autup% PROCredraw_screen
11830ENDPROC
11840:
11850DEFPROCpage
11860wpage%=VALFNread_indirected_icon_text(handle%(4),87)
11870IF i%=84 AND wpage%>1 wpage%-=1
11880IF i%=88 AND wpage%<3 wpage%+=1
11890PROCupdate_icon_text(4,87,STR$wpage%)
11900ENDPROC
11910:
11920DEFPROCnew_page
11930npage%=VALFNread_indirected_icon_text(handle%(4),87)
11940IF npage%=page% ENDPROC ELSE page%=npage%
11950block%!0=handle%(2)
11960SYS "Wimp_CloseWindow",,block%
11970c%=(page%-1)*91+32
11980s%=(page%-1)*91+31
11990ic%=14
12000REPEAT
12010  REPEAT
12020    IF ic% MOD 14=0 THEN
12030      IF page%=3 AND ic%>69 THEN
12040        PROCupdate_icon_text(2,ic%,"")
12050      ELSE
12060        PROCupdate_icon_text(2,ic%,STR$s%)
12070      ENDIF
12080      s%+=13
12090    ENDIF
12100    ic%+=1
12110  UNTIL ic% MOD 14<>0
12120  IF c%>255 THEN
12130    PROCupdate_icon_text(2,ic%,"")
12140   ELSE
12150     PROCupdate_icon_text(2,ic%,CHR$c%)
12160   ENDIF
12170  c%+=1
12180UNTIL ic%=111
12190PROCclose(handle%(3))
12200ENDPROC
12210:
12220DEFPROCsave(pn$)
12230f%=VALFNread_indirected_icon_text(handle%(4),116)
12240t%=VALFNread_indirected_icon_text(handle%(4),121)
12250t$=STR$t%
12260IF FNcheck_chars<>2 ENDPROC
12270SYS "Hourglass_On"
12280c%=OPENOUT pn$
12290FOR p%=f% TO t%
12300  BPUT#c%,23
12310  BPUT#c%,p%
12320  PROCget_bitmap(p%)
12330  FOR b%=1 TO 8
12340    BPUT#c%,bml%(b%)
12350  NEXT b%
12360NEXT p%
12370CLOSE#c%
12380OSCLI"SETTYPE "+pn$+" FF7"
12390ch%=FALSE
12400PROCupdate_icon_text(5,10,pn$)
12410SYS "Wimp_CreateMenu",,-1
12420SYS "Hourglass_Off"
12430ENDPROC

� > !RunImage
� !BBCFontEd
� 1991 Nicholas Waddell
##� � Archimedes World April 1992
(:
2�initialise
<quit%=0
F� � �error(�,�$,3)
P�
Z  �poll
d� quit%
n&ș "Wimp_CloseDown",taskid%,"TASK"
x�
�:
�
��poll
�block%!0=0
�#ș "Wimp_Poll",1,block% � poll%
�Ȏ poll% �
�  � 1: �redraw(block%!0)
�  � 2: �open(block%!0,-1)
�  � 3: �close(block%!0)
�"  � 6: �mouse_click(block%!12)
�  � 7: �drag_end
�4  � 8: �process_key(block%!0,block%!4,block%!24)
�  � 9: �menu_selection
�  � 17,18: �receive
�
�
:
"!��error(error%,report$,flag%)
,ș "Wimp_DragBox",,-1
6ș "Wimp_CreateMenu",-1
@
adjust%=0
J]� error%=168 � error%=204 � error%=248 � error%=253 � error%=67788 � error%=67756 flag%=1
T!buffer%=error%
^$(buffer%+4)=report$+�0
h;ș "Wimp_ReportError",buffer%,flag%,�mess("APP") � ,ok%
r� flag%=3 � ok%=1 �finish
|�
�:
���verify
��error(1,�mess("OK1"),3)
��
�:
���finish
�quit%=-1
��
�:
���initialise
��dimensions
��variables
�7�load_default("<BBCFontEd$Dir>.Resources.Defaults")
2�load_messages("<BBCFontEd$Dir>.Resources.UK")
�start_task
0�load_templates("<BBCFontEd$Dir>.Templates")
&
�set_text
0page%=�(�mess("PAG"))
:!� page%<>1 page%=0: �new_page
D5� "IconSprites <BBCFontEd$Dir>.Resources.Sprites"
N2�load_menus("<BBCFontEd$Dir>.Resources.Menus")
Xcur_grid%=�(�mess("GRD"))
b�change_grid(cur_grid%)
l�check_font
v�       
�:
���check_font
�"f%=� "<BBCFontEd$Dir>.NewFont"
��#f%
�
� f%<>0 �
�'  � "Print <BBCFontEd$Dir>.NewFont"
�  �redraw_screen
��
�ș "Hourglass_On"
�� i%=32 � 255
�2  ș "Hourglass_Percentage",�((i%-33)/223*100)
�  �get_bitmap(i%)
�  � j%=1 � 8
"    or_def%(i%-32,j%)=bml%(j%)

  � j%
� i%
 ș "Hourglass_Off"
*�
4:
>��set_text
H'�update_icon_text(1,6,�mess("APP"))
R(�update_icon_text(1,12,�mess("PUR"))
\(�update_icon_text(1,15,�mess("AUT"))
f(�update_icon_text(1,18,�mess("VER"))
p(�update_icon_text(4,87,�mess("PAG"))
z)�update_icon_text(4,116,�mess("SVF"))
�)�update_icon_text(4,121,�mess("SVT"))
�)�update_icon_text(4,105,�mess("GRD"))
�(�update_icon_text(5,10,�mess("SDI"))
��
�:
���dimensions
�windows%=7
�)� buffer% 128, block% 4096, help% 512
�.� handle%(windows%), window_hnd$(windows%)
�;� bml%(8), bml2%(8), lines%(8), or_def%(223,16), rp$(4)
�� iconmenu 256
�lines%()=2
��
:
��variables
+ch%=�: rc%=�: pane%=�: flp%=�: autup%=�
$6ce%=0: cts%=0: aan%=1: ec%=0: sa%=2: do%=1: oi%=-1
.window_hnd$(1)="info"
8window_hnd$(2)="characters"
Bwindow_hnd$(3)="edit"
Lwindow_hnd$(4)="tools"
Vwindow_hnd$(5)="savefontas"
`window_hnd$(6)="ascii"
jwindow_hnd$(7)="scroll"
t�
~:
���load_default(default$)
�� l%,i%,b%
�l%=� default$
�� i%=32 � 255
�  � b%=1 � 8
�     or_def%(i%-32,b%+8)=�#l%
�
  � b%
�� i%
��#l%
��
�:
���load_menus(file$)
� lmf%,lm$,cm%

lmf%=� file$
/� lmf%=0 � 0,"Cannot find menu definitions"
menus%=0
(ș "Hourglass_On"
2ȕ � (�#lmf%)
<  lm$=�#lmf%
F  � �lm$,1)=">" menus%+=1
P�
Z� menus%<>0 �
dW  � menus$(menus%-1),items$(menus%-1,20),menu_hnd$(menus%-1),menu_handle%(menus%-1)
n  �#lmf%=0
x  cm%=-1
�  ci%=0
�  ȕ � �#lmf%
�    lm$=�#lmf%
�    � lm$<>"" �
�      � �lm$,1)<>";" �
�        � �lm$,1)=">" �
�          cm%+=1
�!          menus$(cm%)=�lm$,2)
�D          menu_hnd$(cm%)=�lm$,�lm$,">")+1,�lm$,":")-�lm$,">")-1)
�          ci%=0
�
        �
�!          items$(cm%,ci%)=lm$
�          ci%+=1

        �
      �
	    �
"  �
,�
6
�#lmf%
@� mem% 1024*menus%
J�make_menus(mem%)
Tș "Hourglass_Off"
^�
h:
r��make_menus(xmem%)
|� menu%=0 � menus%-1
�9  menu_handle%(menu%)=�menu(menu%,xmem%+(menu%*1024))
�� menu%
��
�:
�ݤmenu(menu%,xmem%)
�$�menu_flags(menus$(menu%),xmem%)
�� item%=0 � �items(menu%)
�1  �menu_item(menu%,items$(menu%,item%),xmem%)
�� item%
�
=xmem%
�:
���menu_flags(title$,xmem%)
�E$xmem%=�mess(�title$,�title$,":")+1,�title$,",")-�title$,":")-1))
xmem%?12=7
xmem%?13=2
xmem%?14=7
&xmem%?15=0
0'xmem%!16=�(�title$,�title$,",")+1))
:xmem%!20=40
Dxmem%!24=4
N�
X:
b"��menu_item(menu%,item$,xmem%)
l#menu_item%=xmem%+24*(item%+1)+4
v!menu_item%=0
�0� �item$,"~")>0 !menu_item%=!menu_item% � &1
�0� �item$,"|")>0 !menu_item%=!menu_item% � &2
�7� item%=�items(menu%) !menu_item%=!menu_item% � &80
�#!(menu_item%+4)=�submenu(item$)
�!(menu_item%+8)=&07000001
�&text$=�mess(�item$,�item$,":")-1))
�� �text$<13 �
�  $(menu_item%+12)=text$
��
�  � indir% �text$
�  $indir%=text$
�,  !(menu_item%+8)=!(menu_item%+8) � &100
�  !(menu_item%+12)=indir%
  !(menu_item%+16)=-1
  !(menu_item%+20)=�text$
�
 �                          
*:
4ݤsubmenu(item$)
>� �item$,"-")>0 �
H!  item$=�item$,�item$,"-")+1)
R  � hnd%=1 � windows%
\#    � item$=window_hnd$(hnd%) �
f'      =handle%(hnd%)               
p	    �
z  �
��
�� �item$,"+")>0 �
�!  item$=�item$,�item$,"+")+1)
�  � hnd%=0 � menus%-1
�!    � item$=menu_hnd$(hnd%) �
�      =mem%+(hnd%*1024)
�	    �
�  �
��
�=-1
�:
�ݤitems(menu%)
�i%=0
	ȕ items$(menu%,i%)<>""
	  i%+=1
	�
	$	=i%-1
	.:
	8��load_messages(file$)
	B� lmf%,lm$,cm%
	Llmf%=� file$
	V-� lmf%=0 � 0,"Cannot find text resources"
	`messages%=0
	jș "Hourglass_On"
	tȕ � (�#lmf%)
	~  lm$=�#lmf%
	�  � lm$<>"" �
	�    � �lm$,1)<>";" �
	�%      � �lm$,":")<>0 messages%+=1
	�	    �
	�  �
	��
	�� messages%<>0 �
	�2  � messages$(messages%-1),codes$(messages%-1)
	�  �#lmf%=0
	�  cm%=0
	�  ȕ � �#lmf%
	�    lm$=�#lmf%
    � lm$<>"" �

      � �lm$,1)<>";" �
)        codes$(cm%)=�lm$,�lm$,":")-1)
,        messages$(cm%)=�lm$,�lm$,":")+1)
(        cm%+=1
2      �
<	    �
F  �
P�
Z
�#lmf%
dș "Hourglass_Off"
n�
x:
�ݤmess(code$)
� =�message(code$,"","","","")
�:
�0ݤmessage(code$,rp$(1),rp$(2),rp$(3),rp$(4))
�� i%,f%
�� messages%=0 �
�  =code$
��
�  � ms%=0 � messages%-1
�    � code$=codes$(ms%) �
�!      message$=messages$(ms%)
�      � r%=1 � 4
�&        rp%=�message$,"%"+�(r%-1))
G        � rp%<>0 message$=�message$,rp%-1)+rp$(r%)+�message$,rp%+2)
      � r%
      ms%=messages%
"	    �
,  � ms%
6�
@
=message$
J:
T��start_task
^>ș "Wimp_Initialise",200,&4B534154,�mess("TSK") � ,taskid%
h1iconbar%=�iconbar(-1,0,0,68,68,�mess("ICON"))
r�
|:
���load_templates(file$)
�]� lw% 5120,infw% 512,charw% 512,editw% 512,toolsw% 1536,savew% 512,asciiw% 512,panew% 512
�!ș "Wimp_OpenTemplate",,file$
�/handle%(1)=�load_template("info",infw%,512)
�6handle%(2)=�load_template("characters",charw%,512)
�0handle%(3)=�load_template("edit",editw%,512)
�3handle%(4)=�load_template("tools",toolsw%,1536)
�6handle%(5)=�load_template("savefontas",savew%,512)
�2handle%(6)=�load_template("ascii",asciiw%,512)
�2handle%(7)=�load_template("scroll",panew%,512)
�ș "Wimp_CloseTemplate"
��
�:
*ݤload_template(template$,wa%,blklen%)
>ș "Wimp_LoadTemplate",,lw%,wa%,wa%+blklen%,-1,template$,0
0ș "Wimp_CreateWindow",,lw% � window_handle%
&=window_handle%
0:
:.ݤread_indirected_icon_text(window%,icon%)
D!buffer%=window%
Nbuffer%!4=icon%
X#ș "Wimp_GetIconState",,buffer%
b=$(buffer%!28)
l:
v��mouse_click(handle%)
�Ȏ handle% �
�  � -2: Ȏ block%!8 �
�D    � 2: ș "Wimp_CreateMenu",0,menu_handle%(0),block%!0-100,408
�      current_menu%=0
�     � 4: block%!0=handle%(2)
�'      ș "Wimp_CloseWindow",,block%
�      �open(handle%(2),0)
�  �
�!  � handle%(2): Ȏ block%!8 �
�"    � 1: � �(äget_blob)<256 �
�        sa%=3-sa%
�[        � sa%=1 �update_icon_text(4,32,äget_blob) � �update_icon_text(4,37,äget_blob)
�      �

L    � 2: ș "Wimp_CreateMenu",0,menu_handle%(1),block%!0-190,block%!4+20

      current_menu%=1

!    � 4: �new_char(�get_blob)

   �

*(  � handle%(3): �set_blob(block%!16)

4!  � handle%(4): Ȏ block%!8 �

>)    � 1,4: �tools(block%!16,block%!8)

HL    � 2: ș "Wimp_CreateMenu",0,menu_handle%(1),block%!0-190,block%!4+20

R      current_menu%=1

\  �

f"  � handle%(5): Ȏ block%!16 �

p    � 0: �start_drag(5,0)

z&    � 6: � block%!8=4 �ok_click(�)

�  �

�"  � handle%(6): Ȏ block%!16 �

�    � 9:

�      b%=block%!8

�      � b%=1 � b%=4 �

�+        �reverse_icon(handle%(6),7,8,9)

�@        �new_char(��read_indirected_icon_text(handle%(6),3))

�+        �reverse_icon(handle%(6),7,8,9)

�*        � b%=4 ș "Wimp_CreateMenu",-1

�      �

�	    �

�  � handle%(7):

�%    � block%!8=4 � block%!16>-1 �
      block%!0=handle%(3)
'      ș "Wimp_CloseWindow",,block%
      �scroll(block%!16)
$      �open(handle%(3),0)
.      ch%=�
8	    �
B�
L�
V:
`%��process_key(window%,icon%,key%)
jș "Wimp_ProcessKey",key%
tȎ window% �
~  � handle%(5): Ȏ key% �
�    � 13: �ok_click(�)
�  �
�  � handle%(6): Ȏ key% �
�B    � 13: �new_char(��read_indirected_icon_text(handle%(6),3))
�    ș "Wimp_CreateMenu",-1
�  �
�  � handle%(4): Ȏ icon% �
�    � 32: Ȏ key% �
�3      � 13,&18E,&18F: �set_caret(handle%(4),37)
�	    �
�    � 37: Ȏ key% �
�      � 13: �tool_go
0      � &18E,&18F: �set_caret(handle%(4),32)

	    �
    � 116: Ȏ key% �
4      � 13,&18E,&18F: �set_caret(handle%(4),121)
(	    �
2    � 121: Ȏ key% �
<      � 13:
F,        ș "Wimp_GetPointerInfo",,block%
PF        ș "Wimp_CreateMenu",0,handle%(5),block%!0-170,block%!4+50
Z%        �set_caret(handle%(5),10)
d1      � &18E,&18F: �set_caret(handle%(4),116)
n	    �
x    � 105: Ȏ key% �
�      � 13:
�A        cur_grid%=��read_indirected_icon_text(handle%(4),105)
�#        �change_grid(cur_grid%)
�        �open(handle%(3),0)
�	    �
�  �
��
��
�:
���set_caret(window%,icon%)
�3ș "Wimp_SetCaretPosition",window%,icon%,,,-1,0
��
�:
��menu_selection
%ș "Wimp_GetPointerInfo",,buffer%
adjust%=(buffer%!8=1)
"Ȏ current_menu% �
,
  � 0:
6    Ȏ block%!0 �
@      � 1: �default_set
J      � 2: �original_set
T      � 3: �show_tools
^      � 4: �ok_click(�)
h(      � 5: � ch%=� �finish � �verify
r	    �
|
  � 1:
�    Ȏ block%!0 �
�      � 1: �default_set
�      � 2: �original_set
�      � 3: �show_tools
�      � 4: Ȏ block%!4 �
�          � 0:
�            flp%=-1-flp%
�#            �open(handle%(3),0)
�          � 1:
�            pane%=-1-pane%
�2            �change_flag(menu_handle%(2),1,&1)
�7            �change_flag(menu_handle%(2),0,&400000)
�B            � pane%=� �close(handle%(7)) � �open(handle%(3),0)
          � 2:
             autup%=-1-autup%
2            �change_flag(menu_handle%(2),2,&1)
&
        �
0      � 5: �ok_click(�)
:	    �
D�
N@� adjust% ș "Wimp_CreateMenu",0,menu_handle%(current_menu%)
X�                
b:
l$��change_flag(menu%,item%,flag%)
v� address%
� address%=menu%+28+(24*item%)
�� flag%=&400000 �
�#  address%!8=address%!8 � flag%
��
�#  address%!0=address%!0 � flag%
��
��
�:
���default_set
�	ch%=�
�ș "Hourglass_On"
�� c%=32 � 255
�2  ș "Hourglass_Percentage",�((c%-33)/223*100)
  �default_character(c%,1)
� c%
ș "Hourglass_Off"
 �put_char(ce%)
*�redraw_screen
4�
>:
H��original_set
R	ch%=�
\ș "Hourglass_On"
f� c%=32 � 255
p2  ș "Hourglass_Percentage",�((c%-33)/223*100)
z  �default_character(c%,2)
�� c%
�ș "Hourglass_Off"
��put_char(ce%)
��redraw_screen
��
�:
���show_tools
�+�change_flag(menu_handle%(0),3,&400000)
�+�change_flag(menu_handle%(1),3,&400000)
�block%!0=handle%(4)
�!ș "Wimp_CloseWindow",,block%
��open(handle%(4),0)
��
:
(ݤiconbar(handle%,x%,y%,w%,h%,icon$)
block%!0=handle%
$block%!4=x%
.block%!8=y%
8block%!12=x%+w%
Bblock%!16=y%+h%
Lblock%!20=&3102
V� block%!24 �icon$+1
`$(block%!24)=icon$
jblock%!28=1
tblock%!32=�icon$+1
~/ș "Wimp_CreateIcon",,block% � icon_handle%
�=icon_handle%
�:
���redraw_screen
�.ș "Wimp_ForceRedraw",-1,-1E9,-1E9,1E9,1E9
��
�:
���redraw(handle%)
�block%!0=handle%
�+ș "Wimp_RedrawWindow",0,block% � more%
�ȕ more%
�-  ș "Wimp_GetRectangle",0,block% � more%
��
�

:
��close(handle%)
block%!0=handle%
("ș "Wimp_CloseWindow",0,block%
2/� handle%=handle%(2) � handle%=handle%(3) �
<  � do%=1 �
F4    �update_icon_text(4,100,"Default Character")
P  �
Z0    �update_icon_text(4,100,"Original Char")
d  �
n0  �update_icon_text(4,50,"Apply to Current")
x  � handle%=handle%(2) �
�    �close(handle%(3))
�  �
�  � handle%=handle%(3) �
�    �close(handle%(7))
�
    ce%=0
�    � ec%=1 �
�!      � autup% �redraw_screen
�      ec%=0
�	    �
�  �
��
�:
�� handle%=handle%(4) �
-  �change_flag(menu_handle%(0),3,&400000)
-  �change_flag(menu_handle%(1),3,&400000)
�
"�
,:
6��open(handle%,a%)
@"� handle%=handle%(3) � ce%=0 �
Jblock%!0=handle%
T,� � a% ș "Wimp_GetWindowState",0,block%
^!ș "Wimp_OpenWindow",0,block%
hȎ handle% �
r(  � handle%(3): � pane% �redraw_pane
|�
��
�:
���redraw_pane
�&ș "Wimp_GetWindowOutline",,block%
�
Ȏ flp% �
�
  � �:
�    block%!4-=62
�    block%!8+=108
�    block%!12=block%!4+62
�    block%!16=block%!8+212
�
  � �:
�    block%!4+=242
�    block%!8+=108
    block%!12=block%!4+62
    block%!16=block%!8+212
�
&block%!0=handle%(7)
0!ș "Wimp_OpenWindow",0,block%
:�
D:
Nݤx
X=block%!4-block%!20
b:
lݤy
v=block%!16-block%!24
�:
�+��update_icon_text(window%,icon%,text$)
�block%!0=handle%(window%)
�block%!4=icon%
�"ș "Wimp_GetIconState",,block%
�$block%!28=text$
�block%!8=0
�block%!12=0
�"ș "Wimp_SetIconState",,block%
��
�:
�
��receive
�Ȏ block%! 16 �
  � 0     : �finish
  � 2     : �saveack
.  � 3     : �load_font(�string(block%+44))
 *  � &502  : �help(block%!32,block%!36)
*F  � &400C2: �taskinitialise(�$(block%+28),��mess("TSK")),block%!4)
4�
>�
H:
R��help(handle%,icon%)
\� help$
fȎ handle% �
p  � -2: help$=�mess("Hicn")
z'  � handle%(2): help$=�mess("Hcsw")
�'  � handle%(3): help$=�mess("Hcew")
�'  � handle%(4): help$=�mess("Htlw")
�    Ȏ icon% �
�D      � 9,10,11,12,13,14,15,16,17,18,19,20: help$+=�mess("Htls")
�'      � 32,37: help$+=�mess("Htcr")
�$      � 43: help$+=�mess("Htok")
�$      � 44: help$+=�mess("Haan")
�$      � 50: help$+=�mess("Htcc")
�9      � 75,76,77,78,79,80,81,82: help$+=�mess("Hlns")
�.      � 84,88: help$+=�mess("Hcpa")       
�$      � 87: help$+=�mess("Hcpe")
�$      � 94: help$+=�mess("Hshp")
�%      � 100: help$+=�mess("Hcdo")
%      � 105: help$+=�mess("Hgpc")
%      � 111: help$+=�mess("Hgok")
)      � 116,121: help$+=�mess("Hscr")
$	    �
.'  � handle%(5): help$=�mess("Hsdw")
8'  � handle%(6): help$=�mess("Hasw")
B'  � handle%(7): help$=�mess("Hscw")
L�
V� help$<>"" �
`  !help%=(25+�help$) � � 3
j  help%!12=block%!8
t  help%!16=&503
~  $(help%+20)=help$+�0
�-  ș "Wimp_SendMessage",17,help%,block%!4
��
��      
�:
�!��taskinitialise(task$,task%)
�+� task$=�mess("TSK") � task%<>taskid% �
�  block%!16=0
�.  ș "Wimp_SendMessage",17,block%,block%!4
�,  �error(1,"Task already initialised",1)
��
��
�:
ݤstring(a%)

� b$
	b$=""

ȕ ?a%<>0
(  b$+=�?a%
2  a%+=1
<�
F=b$
P:
Z��ok_click(icon_click%)
d� icon_click% �
n%  �reverse_icon(handle%(5),4,5,6)
x%  �reverse_icon(handle%(5),4,5,6)
��
�3name$=�read_indirected_icon_text(handle%(5),10)
�*� name$="" �error(1,�mess("OK2"),1): �
�/� �name$,".")=0 �error(1,�mess("OK3"),1): �
��save(name$)
��
�:
���start_drag(window%,icon%)
�block%!0=handle%(window%)
�$ș "Wimp_GetWindowState",,block%
�wx%=block%!4-block%!20
�wy%=block%!16-block%!24
�block%!4=icon%
"ș "Wimp_GetIconState",,block%
block%!0=handle%(window%)
block%!4=5
"block%!8+=wx%
,block%!12+=wy%
6block%!16+=wx%
@block%!20+=wy%-2
Jblock%!24=0
Tblock%!28=0
^6block%!32=(�read_mode(-1,11)+1)*2^�read_mode(-1,4)
h6block%!36=(�read_mode(-1,12)+1)*2^�read_mode(-1,5)
rș "Wimp_DragBox",,block%
|�
�:
�ݤread_mode(mode%,var%)
�2ș "OS_ReadModeVariable",mode%,var% � ,,value%
�=value%
�:
���drag_end
�$ș "Wimp_GetPointerInfo",,block%
�mx%=block%!0
�my%=block%!4
�window%=block%!12
�� window%<1 �
�>name$=�filename(�read_indirected_icon_text(handle%(5),10))
�"block%!0=44+((�name$ � 4)+1)*4
block%!16=1
block%!20=window%
block%!24=-1
&block%!28=mx%
0block%!32=my%
:block%!36=910
Dblock%!40=&FF7
N$(block%+44)=name$+�0
X+ș "Wimp_SendMessage",17,block%,window%
b�
l:
v
��saveack
�name$=�string(block%+44)
�5� �filename(name$)="" �error(1,�mess("OK2"),1): �
��save(name$)
��
�:
���load_font(l$)
�1� block%!40<>&FF7 �error(1,�mess("OK4"),1): �
��"PRINT "+l$
��redraw_screen
��update_icon_text(5,10,l$)
��
�:
�ݤfilename(f$)
ȕ �f$,".")>0
  f$=�f$,�f$,".")+1)
�
 =f$
*:
4��edit_char(char%)
>block%!0=handle%(3)
H"ș "Wimp_CloseWindow",0,block%
R,�retitle(handle%(3),�char%+" : "+�char%)
\
� do%=1 �
f7  �update_icon_text(4,100,"Default ' "+�char%+" '")
p�
z8  �update_icon_text(4,100,"Original ' "+�char%+" '")
��
�6�update_icon_text(4,50,"Apply to  ' "+�char%+" '")
��put_char(char%)
��open(handle%(3),0)
�$� ec%<>0 � autup% �redraw_screen
�	ec%=0
��          
�:
���new_char(char%)
�(� char%<32 � char%>255 � char%=127 �
�
ce%=char%
��edit_char(char%)
��
:
��retitle(handle%,title$)
block%!0=handle%
$#ș "Wimp_GetWindowInfo",,block%
.$block%!76=title$
8block%!84=�title$
B�
L:
V��put_char(char%)
`�get_bitmap(char%)
jblock%!0=handle%(3)
t� y%=1 � 8
~  � x%=7 � 0 � -1
�     block%!4=(y%-1)*8+(7-x%)
�    � bml%(y%)-2^x%>-1 �
�      bml%(y%)-=2^x%
�      block%!8=&70000000
�      block%!12=&F0000000
�	    �
�      block%!8=&10000000
�      block%!12=&F0000000
�	    �
�&    ș "Wimp_SetIconState",,block%
�
  � x%
�� y%
�

:
0��reverse_icon(handle%,icon1%,icon2%,icon3%)
block%!0=handle%
(block%!4=icon1%
2block%!8=1<<30
<block%!12=0
F"ș "Wimp_SetIconState",,block%
Pblock%!4=icon2%
Z"ș "Wimp_SetIconState",,block%
dblock%!4=icon3%
nblock%!8=15<<28
x"ș "Wimp_SetIconState",,block%
��
�  ș "OS_Mouse" � ,,but%
�� but%=0
��
�:
���change_grid(grid_col%)
�block%!0=handle%(3)
�!ș "Wimp_CloseWindow",,block%
�,� grid_col%<0 � grid_col%>15 grid_col%=1
�block%!0=handle%(3)
�� icon%=0 � 63
�  block%!4=icon%
�  block%!8=grid_col%<<24
  block%!12=&F000000
$  ș "Wimp_SetIconState",,block%
� icon%
"�
,:
6��get_bitmap(c%)
@buffer%?0=c%
Jș "OS_Word",10,buffer%
T� gbm%=1 � 8
^  bml%(gbm%)=buffer%?gbm%
h
� gbm%
r�
|:
���set_blob(icon%)
�$ș "Wimp_GetPointerInfo",,block%
�mouse%=block%!8
�� mouse%=0 � rc%=�
�=� mouse%=1 � mouse%=2 � (mouse%=4 � (icon%<>oi% � rc%)) �
�  ch%=�
�  rc%=�
�  block%!0=handle%(3)
�  block%!4=icon%
�  � mouse%=1 �
�    block%!8=&10000000
�    block%!12=&F0000000
�  �
   � mouse%=2 �
     block%!8=&70000000
     block%!12=&F0000000
 &  �
 0  � mouse%=4 �
 :    block%!8=&60000000
 D    block%!12=0
 N  �
 X$  ș "Wimp_SetIconState",,block%
 b  bx%=8-(icon% � 8)
 l  by%=(icon% � 8)+1
 v  �get_bitmap(ce%)
 �8  � mouse%=1 bml%(by%)=bml%(by%) � (255-(2^(bx%-1)))
 �0  � mouse%=2 bml%(by%)=bml%(by%) � 2^(bx%-1)
 �0  � mouse%=4 bml%(by%)=bml%(by%) � 2^(bx%-1)
 �N  � 23,ce%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
 �  �update_char(ce%)
 �  ec%=1
 �  oi%=icon%
 ��
 ��
 �:
 ���update_char(char%)
 �$chars%=(char%-32)-((page%-1)*91)
 �chars%+=chars% � 13+15
!block%!0=handle%(2)
!block%!4=chars%
!block%!8=0
! block%!12=0
!*"ș "Wimp_SetIconState",,block%
!4�
!>:
!Hݤget_blob
!R%ș "Wimp_GetPointerInfo",,buffer%
!\i%=buffer%!16+17
!f� (i%-17) � 14=0 =256
!p� i%<32 =256
!z� cd%=1 � 8
!�  � i%>32+cd%*13 i%-=1
!�	� cd%
!�i%+=(page%-1)*91
!�=i%
!�:
!���tools(i%,b%)
!�Ȏ i% �
!�  � cts%: � b%=1 cts%=0
!�3  � 9,10,11,12,13,14,15,16,17,18,19,20: cts%=i%
!�>  � 75,76,77,78,79,80,81,82: lines%(i%-74)=3-lines%(i%-74)
!�  � 44: aan%=3-aan%
!�  � 100: Ȏ b% �
!�    � 1: �change_def
"0    � 4: �reverse_icon(handle%(4),98,99,100)
"      block%!0=handle%(3)
"'      ș "Wimp_CloseWindow",,block%
"$%      �default_character(ce%,do%)
".      �put_char(ce%)
"8      �open(handle%(3),0)
"B-      �reverse_icon(handle%(4),98,99,100)
"L  �
"V  � 84,88: � b%=4 �page
"`  � 94: � b%=4 �
"j,      �reverse_icon(handle%(4),92,93,94)
"t      �new_page
"~      �open(handle%(2),0)
"�,      �reverse_icon(handle%(4),92,93,94)
"�	    �
"�  � 43: � b%=4 �
"�,      �reverse_icon(handle%(4),41,42,43)
"�      �tool_go
"�,      �reverse_icon(handle%(4),41,42,43)
"�	    �
"�  � 50: � b%=4 �
"�,      �reverse_icon(handle%(4),48,49,50)
"�      �tool_go
"�,      �reverse_icon(handle%(4),48,49,50)
"�	    �
#  � 111: � b%=4 �
#
/      �reverse_icon(handle%(4),109,110,111)
#?      cur_grid%=��read_indirected_icon_text(handle%(4),105)
#!      �change_grid(cur_grid%)
#(      �open(handle%(3),0)
#2/      �reverse_icon(handle%(4),109,110,111)
#<	    �
#F�
#P�
#Z:
#d
��tool_go
#n/� i%=50 � ce%=0 �error(1,�mess("OK5"),1): �
#x=� i%=50 � (cts%=14 � cts%=17) �error(1,�mess("OK6"),1): �
#�(� cts%=0 �error(1,�mess("OK7"),1): �
#�`� �lines=0 � cts%<>9 � cts%<>10 � cts%<>11 � cts%<>12 � cts%<>20 �error(1,�mess("OK8"),1): �
#�block%!0=handle%(3)
#�!ș "Wimp_CloseWindow",,block%
#�k� cts%-8 �oblique(1),�oblique(2),�flip(1),�flip(2),�clear,�copy,�thin,�set,�swap,�bold,�inverse,�rotate
#�	ch%=�
#��put_char(ce%)
#��open(handle%(3),0)
#�1� autup% �redraw_screen � �redraw(handle%(2))
#��
#�:
#���change_def
#�
do%=3-do%
$Ȏ do% �
$?  � 1: � ce%=0 �update_icon_text(4,100,"Default Character")
$@    � ce%<>0 �update_icon_text(4,100,"Default ' "+�ce%+" '")
$";  � 2: � ce%=0 �update_icon_text(4,100,"Original Char")
$,A    � ce%<>0 �update_icon_text(4,100,"Original ' "+�ce%+" '")
$6�
$@�
$J:
$Tݤlines
$^� cl%=1 � 8
$h  � lines%(cl%)=2 =1
$r	� cl%
$|=0
$�:
$���get_chars
$�3f%=�(�read_indirected_icon_text(handle%(4),32))
$�0t$=�read_indirected_icon_text(handle%(4),37)
$�t%=�(t$)
$�� i%=50 f%=ce%: t%=ce%
$��
$�:
$���alphanum(nc%)
$�� nc%=58 f%=65: t%=90
$�� nc%=91 f%=97: t%=122
$��
$�:
%ݤcheck_chars
%1� f%<32 � f%>255 �error(1,�mess("OK9"),1): =1
%:� t%<32 � t$<>"" � t%>255 �error(1,�mess("OK9"),1): =1
%&1� t%<f% � t$<>"" �error(1,�mess("OK9"),1): =1
%0=2
%::
%D��clear
%N�get_chars
%X� aan%=2 f%=48: t%=57
%b� �check_chars<>2 �
%l�
%v  � xx%=f% � t%
%�    �get_bitmap(xx%)
%�    � lc%=1 � 8
%�%      � lines%(lc%)=2 bml%(lc%)=0
%�
    � lc%
%�P    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
%�  � xx%
%�'  � aan%=2 � xx%<123 �alphanum(xx%)
%�,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
%��
%�:
%�	��set
%��get_chars
%�� aan%=2 f%=48: t%=57
&� �check_chars<>2 �
&�
&  � xx%=f% � t%
&     �get_bitmap(xx%)
&*    � lc%=1 � 8
&4'      � lines%(lc%)=2 bml%(lc%)=255
&>
    � lc%
&HP    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
&R  � xx%
&\'  � aan%=2 � xx%<123 �alphanum(xx%)
&f,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
&p�
&z:
&�
��inverse
&��get_chars
&�� aan%=2 f%=48: t%=57
&�� �check_chars<>2 �
&��
&�  � xx%=f% � t%
&�    �get_bitmap(xx%)
&�    � lc%=1 � 8
&�/      � lines%(lc%)=2 bml%(lc%)=� bml%(lc%)
&�
    � lc%
&�P    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
&�  � xx%
&�'  � aan%=2 � xx%<123 �alphanum(xx%)
',� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
'�
':
'$
��copy
'.�get_chars
'80� f%<32 � f%>255 �error(1,�mess("OK9"),1): �
'B0� t%<32 � t%>255 �error(1,�mess("OK9"),1): �
'L�get_bitmap(f%)
'V� i%=1 � 8
'`  bml2%(i%)=bml%(i%)
'j� i%
't�get_bitmap(t%)
'~� i%=1 � 8
'�'  � lines%(i%)=2 bml%(i%)=bml2%(i%)
'�� i%
'�K� 23,t%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
'��
'�:
'�
��swap
'��get_chars
'�0� f%<32 � f%>255 �error(1,�mess("OK9"),1): �
'�0� t%<32 � t%>255 �error(1,�mess("OK9"),1): �
'��get_bitmap(t%)
'�� i%=1 � 8
'�  bml2%(i%)=bml%(i%)
(� i%
(
�get_bitmap(f%)
(� lc%=1 � 8
(G  � lines%(lc%)=1 d%=bml%(lc%): bml%(lc%)=bml2%(lc%): bml2%(lc%)=d%
((	� lc%
(2S� 23,f%,bml2%(1),bml2%(2),bml2%(3),bml2%(4),bml2%(5),bml2%(6),bml2%(7),bml2%(8)
(<K� 23,t%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
(F�
(P:
(Z
��bold
(d�get_chars
(n� aan%=2 f%=48: t%=57
(x� �check_chars<>2 �
(��
(�  � xx%=f% � t%
(�    �get_bitmap(xx%)
(�    � lc%=1 � 8
(�;      � lines%(lc%)=2 bml%(lc%)=bml%(lc%) � bml%(lc%)/2
(�
    � lc%
(�P    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
(�  � xx%
(�'  � aan%=2 � xx%<123 �alphanum(xx%)
(�,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
(��
(�:
(�
��thin
)�get_chars
)� aan%=2 f%=48: t%=57
)� �check_chars<>2 �
)"�
),  � xx%=f% � t%
)6    �get_bitmap(xx%)
)@    � lc%=1 � 8
)J;      � lines%(lc%)=2 bml%(lc%)=bml%(lc%) � bml%(lc%)/2
)T
    � lc%
)^P    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
)h  � xx%
)r'  � aan%=2 � xx%<123 �alphanum(xx%)
)|,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
)��
)�:
)���oblique(tp%)
)��get_chars
)�� aan%=2 f%=48: t%=57
)�� �check_chars<>2 �
)��
)�  � xx%=f% � t%
)�    �get_bitmap(xx%)
)��    � tp%=1 bml%(5)=bml%(5)*2: bml%(6)=bml%(6)*2: bml%(7)=bml%(7)*2: bml%(8)=bml%(8)*2 � bml%(1)=bml%(1)/2: bml%(2)=bml%(2)/2: bml%(3)=bml%(3)/2: bml%(6)=bml%(6)*2: bml%(7)=bml%(7)*2: bml%(8)=bml%(8)*4
)�P    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
)�  � xx%
)�'  � aan%=2 � xx%<123 �alphanum(xx%)
*,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
*�
*:
*&��flip(tp%)
*0�get_chars
*:� aan%=2 f%=48: t%=57
*D� �check_chars<>2 �
*N�
*X  � xx%=f% � t%
*b    �get_bitmap(xx%)
*l    � tp%=1 �flipx � �flipy
*vP    � 23,xx%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
*�  � xx%
*�'  � aan%=2 � xx%<123 �alphanum(xx%)
*�,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
*��
*�:
*���flipx
*�d%=bml%(8)
*�bml%(8)=bml%(1)
*�bml%(1)=d%
*�d%=bml%(7)
*�bml%(7)=bml%(2)
*�bml%(2)=d%
*�d%=bml%(6)
+bml%(6)=bml%(3)
+bml%(3)=d%
+d%=bml%(5)
+ bml%(5)=bml%(4)
+*bml%(4)=d%
+4�
+>:
+H��flipy
+R� l%=1 � 8
+\  � c%=1 � 4
+f    rb%=2^(c%-1)
+p    d1%=bml%(l%) � rb%
+z    lb%=2^(8-c%)
+�    d2%=bml%(l%) � lb%
+�E    � d2%=lb% bml%(l%)=bml%(l%) � rb% � bml%(l%)=bml%(l%) � � rb%
+�E    � d1%=rb% bml%(l%)=bml%(l%) � lb% � bml%(l%)=bml%(l%) � � lb%
+�
  � c%
+�� l%
+��
+�:
+���rotate
+��get_chars
+�� aan%=2 f%=48: t%=57
+�� �check_chars<>2 �
+��
+�  � xx%=f% � t%
,    �get_bitmap(xx%)
,    � r%=1 � 8
,      c%=0
,$      � lc%=1 � 8
,.2        � (bml%(lc%) � 2^(8-r%)) c%+=2^(lc%-1)
,8      � lc%
,B      bml2%(r%)=c%
,L    � r%
,VX    � 23,xx%,bml2%(1),bml2%(2),bml2%(3),bml2%(4),bml2%(5),bml2%(6),bml2%(7),bml2%(8)
,`  � xx%
,j'  � aan%=2 � xx%<123 �alphanum(xx%)
,t,� (xx%>t% � aan%=1) � (xx%=123 � aan%=2)
,~�
,�:
,���scroll(i%)
,��get_bitmap(ce%)
,�2� i%+1 �scroll_u,�scroll_l,�scroll_r,�scroll_d
,�L� 23,ce%,bml%(1),bml%(2),bml%(3),bml%(4),bml%(5),bml%(6),bml%(7),bml%(8)
,��put_char(ce%)
,��update_char(ce%)
,��
,�:
,���scroll_l
,�� s%=1 � 8
,�  bml%(s%)=bml%(s%)*2
-� s%
-
�
-:
-��scroll_r
-(� s%=1 � 8
-2  bml%(s%)=bml%(s%)/2
-<� s%
-F�
-P:
-Z��scroll_u
-d� s%=1 � 7
-n  bml%(s%)=bml%(s%+1)
-x� s%
-�
bml%(8)=0
-��
-�:
-���scroll_d
-�� s%=8 � 2 �-1
-�  bml%(s%)=bml%(s%-1)
-�� s%
-�
bml%(1)=0
-��
-�:
-�"��default_character(char%,wt%)
-�)� char%=0 �error(1,�mess("OK5"),1): �
-�
� wt%=1 �
.�  � 23,char%,or_def%(char%-32,9),or_def%(char%-32,10),or_def%(char%-32,11),or_def%(char%-32,12),or_def%(char%-32,13),or_def%(char%-32,14),or_def%(char%-32,15),or_def%(char%-32,16)
.�
.�  � 23,char%,or_def%(char%-32,1),or_def%(char%-32,2),or_def%(char%-32,3),or_def%(char%-32,4),or_def%(char%-32,5),or_def%(char%-32,6),or_def%(char%-32,7),or_def%(char%-32,8)
."�
.,� autup% �redraw_screen
.6�
.@:
.J
��page
.T5wpage%=��read_indirected_icon_text(handle%(4),87)
.^ � i%=84 � wpage%>1 wpage%-=1
.h � i%=88 � wpage%<3 wpage%+=1
.r#�update_icon_text(4,87,�wpage%)
.|�
.�:
.���new_page
.�5npage%=��read_indirected_icon_text(handle%(4),87)
.�#� npage%=page% � � page%=npage%
.�block%!0=handle%(2)
.�!ș "Wimp_CloseWindow",,block%
.�c%=(page%-1)*91+32
.�s%=(page%-1)*91+31
.�
ic%=14
.��
.�  �
.�    � ic% � 14=0 �
.�      � page%=3 � ic%>69 �
/'        �update_icon_text(2,ic%,"")
/      �
/(        �update_icon_text(2,ic%,�s%)
/&      �
/0      s%+=13
/:	    �
/D    ic%+=1
/N  � ic% � 14<>0
/X  � c%>255 �
/b#    �update_icon_text(2,ic%,"")
/l   �
/v%     �update_icon_text(2,ic%,�c%)
/�   �
/�  c%+=1
/�
� ic%=111
/��close(handle%(3))
/��
/�:
/���save(pn$)
/�2f%=��read_indirected_icon_text(handle%(4),116)
/�2t%=��read_indirected_icon_text(handle%(4),121)
/�
t$=�t%
/�� �check_chars<>2 �
/�ș "Hourglass_On"
/�c%=� pn$
0� p%=f% � t%
0
  �#c%,23
0
  �#c%,p%
0   �get_bitmap(p%)
0*  � b%=1 � 8
04    �#c%,bml%(b%)
0>
  � b%
0H� p%
0R�#c%
0\�"SETTYPE "+pn$+" FF7"
0f	ch%=�
0p�update_icon_text(5,10,pn$)
0zș "Wimp_CreateMenu",,-1
0�ș "Hourglass_Off"
0��
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 10 f4 20 21  42 42 43 46 6f 6e 74 45  |e..... !BBCFontE|
00000020  64 0d 00 1e 1b f4 20 31  39 39 31 20 4e 69 63 68  |d..... 1991 Nich|
00000030  6f 6c 61 73 20 57 61 64  64 65 6c 6c 0d 00 23 23  |olas Waddell..##|
00000040  f4 20 a9 20 41 72 63 68  69 6d 65 64 65 73 20 57  |. . Archimedes W|
00000050  6f 72 6c 64 20 41 70 72  69 6c 20 31 39 39 32 0d  |orld April 1992.|
00000060  00 28 05 3a 0d 00 32 0f  f2 69 6e 69 74 69 61 6c  |.(.:..2..initial|
00000070  69 73 65 0d 00 3c 0b 71  75 69 74 25 3d 30 0d 00  |ise..<.quit%=0..|
00000080  46 16 ee 20 85 20 f2 65  72 72 6f 72 28 9f 2c f6  |F.. . .error(.,.|
00000090  24 2c 33 29 0d 00 50 05  f5 0d 00 5a 0b 20 20 f2  |$,3)..P....Z.  .|
000000a0  70 6f 6c 6c 0d 00 64 0b  fd 20 71 75 69 74 25 0d  |poll..d.. quit%.|
000000b0  00 6e 26 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |.n&.. "Wimp_Clos|
000000c0  65 44 6f 77 6e 22 2c 74  61 73 6b 69 64 25 2c 22  |eDown",taskid%,"|
000000d0  54 41 53 4b 22 0d 00 78  05 e0 0d 00 82 05 3a 0d  |TASK"..x......:.|
000000e0  00 8c 0a dd f2 70 6f 6c  6c 0d 00 96 0e 62 6c 6f  |.....poll....blo|
000000f0  63 6b 25 21 30 3d 30 0d  00 a0 23 c8 99 20 22 57  |ck%!0=0...#.. "W|
00000100  69 6d 70 5f 50 6f 6c 6c  22 2c 31 2c 62 6c 6f 63  |imp_Poll",1,bloc|
00000110  6b 25 20 b8 20 70 6f 6c  6c 25 0d 00 aa 0e c8 8e  |k% . poll%......|
00000120  20 70 6f 6c 6c 25 20 ca  0d 00 b4 1c 20 20 c9 20  | poll% .....  . |
00000130  31 3a 20 f2 72 65 64 72  61 77 28 62 6c 6f 63 6b  |1: .redraw(block|
00000140  25 21 30 29 0d 00 be 1d  20 20 c9 20 32 3a 20 f2  |%!0)....  . 2: .|
00000150  6f 70 65 6e 28 62 6c 6f  63 6b 25 21 30 2c 2d 31  |open(block%!0,-1|
00000160  29 0d 00 c8 1b 20 20 c9  20 33 3a 20 f2 63 6c 6f  |)....  . 3: .clo|
00000170  73 65 28 62 6c 6f 63 6b  25 21 30 29 0d 00 d2 22  |se(block%!0)..."|
00000180  20 20 c9 20 36 3a 20 f2  6d 6f 75 73 65 5f 63 6c  |  . 6: .mouse_cl|
00000190  69 63 6b 28 62 6c 6f 63  6b 25 21 31 32 29 0d 00  |ick(block%!12)..|
000001a0  dc 14 20 20 c9 20 37 3a  20 f2 64 72 61 67 5f 65  |..  . 7: .drag_e|
000001b0  6e 64 0d 00 e6 34 20 20  c9 20 38 3a 20 f2 70 72  |nd...4  . 8: .pr|
000001c0  6f 63 65 73 73 5f 6b 65  79 28 62 6c 6f 63 6b 25  |ocess_key(block%|
000001d0  21 30 2c 62 6c 6f 63 6b  25 21 34 2c 62 6c 6f 63  |!0,block%!4,bloc|
000001e0  6b 25 21 32 34 29 0d 00  f0 1a 20 20 c9 20 39 3a  |k%!24)....  . 9:|
000001f0  20 f2 6d 65 6e 75 5f 73  65 6c 65 63 74 69 6f 6e  | .menu_selection|
00000200  0d 00 fa 17 20 20 c9 20  31 37 2c 31 38 3a 20 f2  |....  . 17,18: .|
00000210  72 65 63 65 69 76 65 0d  01 04 05 cb 0d 01 0e 05  |receive.........|
00000220  e1 0d 01 18 05 3a 0d 01  22 21 dd f2 65 72 72 6f  |.....:.."!..erro|
00000230  72 28 65 72 72 6f 72 25  2c 72 65 70 6f 72 74 24  |r(error%,report$|
00000240  2c 66 6c 61 67 25 29 0d  01 2c 19 c8 99 20 22 57  |,flag%)..,... "W|
00000250  69 6d 70 5f 44 72 61 67  42 6f 78 22 2c 2c 2d 31  |imp_DragBox",,-1|
00000260  0d 01 36 1b c8 99 20 22  57 69 6d 70 5f 43 72 65  |..6... "Wimp_Cre|
00000270  61 74 65 4d 65 6e 75 22  2c 2d 31 0d 01 40 0d 61  |ateMenu",-1..@.a|
00000280  64 6a 75 73 74 25 3d 30  0d 01 4a 5d e7 20 65 72  |djust%=0..J]. er|
00000290  72 6f 72 25 3d 31 36 38  20 84 20 65 72 72 6f 72  |ror%=168 . error|
000002a0  25 3d 32 30 34 20 84 20  65 72 72 6f 72 25 3d 32  |%=204 . error%=2|
000002b0  34 38 20 84 20 65 72 72  6f 72 25 3d 32 35 33 20  |48 . error%=253 |
000002c0  84 20 65 72 72 6f 72 25  3d 36 37 37 38 38 20 84  |. error%=67788 .|
000002d0  20 65 72 72 6f 72 25 3d  36 37 37 35 36 20 66 6c  | error%=67756 fl|
000002e0  61 67 25 3d 31 0d 01 54  13 21 62 75 66 66 65 72  |ag%=1..T.!buffer|
000002f0  25 3d 65 72 72 6f 72 25  0d 01 5e 1b 24 28 62 75  |%=error%..^.$(bu|
00000300  66 66 65 72 25 2b 34 29  3d 72 65 70 6f 72 74 24  |ffer%+4)=report$|
00000310  2b bd 30 0d 01 68 3b c8  99 20 22 57 69 6d 70 5f  |+.0..h;.. "Wimp_|
00000320  52 65 70 6f 72 74 45 72  72 6f 72 22 2c 62 75 66  |ReportError",buf|
00000330  66 65 72 25 2c 66 6c 61  67 25 2c a4 6d 65 73 73  |fer%,flag%,.mess|
00000340  28 22 41 50 50 22 29 20  b8 20 2c 6f 6b 25 0d 01  |("APP") . ,ok%..|
00000350  72 1d e7 20 66 6c 61 67  25 3d 33 20 80 20 6f 6b  |r.. flag%=3 . ok|
00000360  25 3d 31 20 f2 66 69 6e  69 73 68 0d 01 7c 05 e1  |%=1 .finish..|..|
00000370  0d 01 86 05 3a 0d 01 90  0c dd f2 76 65 72 69 66  |....:......verif|
00000380  79 0d 01 9a 1c f2 65 72  72 6f 72 28 31 2c a4 6d  |y.....error(1,.m|
00000390  65 73 73 28 22 4f 4b 31  22 29 2c 33 29 0d 01 a4  |ess("OK1"),3)...|
000003a0  05 e1 0d 01 ae 05 3a 0d  01 b8 0c dd f2 66 69 6e  |......:......fin|
000003b0  69 73 68 0d 01 c2 0c 71  75 69 74 25 3d 2d 31 0d  |ish....quit%=-1.|
000003c0  01 cc 05 e1 0d 01 d6 05  3a 0d 01 e0 10 dd f2 69  |........:......i|
000003d0  6e 69 74 69 61 6c 69 73  65 0d 01 ea 0f f2 64 69  |nitialise.....di|
000003e0  6d 65 6e 73 69 6f 6e 73  0d 01 f4 0e f2 76 61 72  |mensions.....var|
000003f0  69 61 62 6c 65 73 0d 01  fe 37 f2 6c 6f 61 64 5f  |iables...7.load_|
00000400  64 65 66 61 75 6c 74 28  22 3c 42 42 43 46 6f 6e  |default("<BBCFon|
00000410  74 45 64 24 44 69 72 3e  2e 52 65 73 6f 75 72 63  |tEd$Dir>.Resourc|
00000420  65 73 2e 44 65 66 61 75  6c 74 73 22 29 0d 02 08  |es.Defaults")...|
00000430  32 f2 6c 6f 61 64 5f 6d  65 73 73 61 67 65 73 28  |2.load_messages(|
00000440  22 3c 42 42 43 46 6f 6e  74 45 64 24 44 69 72 3e  |"<BBCFontEd$Dir>|
00000450  2e 52 65 73 6f 75 72 63  65 73 2e 55 4b 22 29 0d  |.Resources.UK").|
00000460  02 12 0f f2 73 74 61 72  74 5f 74 61 73 6b 0d 02  |....start_task..|
00000470  1c 30 f2 6c 6f 61 64 5f  74 65 6d 70 6c 61 74 65  |.0.load_template|
00000480  73 28 22 3c 42 42 43 46  6f 6e 74 45 64 24 44 69  |s("<BBCFontEd$Di|
00000490  72 3e 2e 54 65 6d 70 6c  61 74 65 73 22 29 0d 02  |r>.Templates")..|
000004a0  26 0d f2 73 65 74 5f 74  65 78 74 0d 02 30 19 70  |&..set_text..0.p|
000004b0  61 67 65 25 3d bb 28 a4  6d 65 73 73 28 22 50 41  |age%=.(.mess("PA|
000004c0  47 22 29 29 0d 02 3a 21  e7 20 70 61 67 65 25 3c  |G"))..:!. page%<|
000004d0  3e 31 20 70 61 67 65 25  3d 30 3a 20 f2 6e 65 77  |>1 page%=0: .new|
000004e0  5f 70 61 67 65 0d 02 44  35 ff 20 22 49 63 6f 6e  |_page..D5. "Icon|
000004f0  53 70 72 69 74 65 73 20  3c 42 42 43 46 6f 6e 74  |Sprites <BBCFont|
00000500  45 64 24 44 69 72 3e 2e  52 65 73 6f 75 72 63 65  |Ed$Dir>.Resource|
00000510  73 2e 53 70 72 69 74 65  73 22 0d 02 4e 32 f2 6c  |s.Sprites"..N2.l|
00000520  6f 61 64 5f 6d 65 6e 75  73 28 22 3c 42 42 43 46  |oad_menus("<BBCF|
00000530  6f 6e 74 45 64 24 44 69  72 3e 2e 52 65 73 6f 75  |ontEd$Dir>.Resou|
00000540  72 63 65 73 2e 4d 65 6e  75 73 22 29 0d 02 58 1d  |rces.Menus")..X.|
00000550  63 75 72 5f 67 72 69 64  25 3d bb 28 a4 6d 65 73  |cur_grid%=.(.mes|
00000560  73 28 22 47 52 44 22 29  29 0d 02 62 1b f2 63 68  |s("GRD"))..b..ch|
00000570  61 6e 67 65 5f 67 72 69  64 28 63 75 72 5f 67 72  |ange_grid(cur_gr|
00000580  69 64 25 29 0d 02 6c 0f  f2 63 68 65 63 6b 5f 66  |id%)..l..check_f|
00000590  6f 6e 74 0d 02 76 0c e1  20 20 20 20 20 20 20 0d  |ont..v..       .|
000005a0  02 80 05 3a 0d 02 8a 10  dd f2 63 68 65 63 6b 5f  |...:......check_|
000005b0  66 6f 6e 74 0d 02 94 22  66 25 3d 8e 20 22 3c 42  |font..."f%=. "<B|
000005c0  42 43 46 6f 6e 74 45 64  24 44 69 72 3e 2e 4e 65  |BCFontEd$Dir>.Ne|
000005d0  77 46 6f 6e 74 22 0d 02  9e 08 d9 23 66 25 0d 02  |wFont".....#f%..|
000005e0  a8 0d e7 20 66 25 3c 3e  30 20 8c 0d 02 b2 27 20  |... f%<>0 ....' |
000005f0  20 ff 20 22 50 72 69 6e  74 20 3c 42 42 43 46 6f  | . "Print <BBCFo|
00000600  6e 74 45 64 24 44 69 72  3e 2e 4e 65 77 46 6f 6e  |ntEd$Dir>.NewFon|
00000610  74 22 0d 02 bc 14 20 20  f2 72 65 64 72 61 77 5f  |t"....  .redraw_|
00000620  73 63 72 65 65 6e 0d 02  c6 05 cd 0d 02 d0 15 c8  |screen..........|
00000630  99 20 22 48 6f 75 72 67  6c 61 73 73 5f 4f 6e 22  |. "Hourglass_On"|
00000640  0d 02 da 11 e3 20 69 25  3d 33 32 20 b8 20 32 35  |..... i%=32 . 25|
00000650  35 0d 02 e4 32 20 20 c8  99 20 22 48 6f 75 72 67  |5...2  .. "Hourg|
00000660  6c 61 73 73 5f 50 65 72  63 65 6e 74 61 67 65 22  |lass_Percentage"|
00000670  2c a8 28 28 69 25 2d 33  33 29 2f 32 32 33 2a 31  |,.((i%-33)/223*1|
00000680  30 30 29 0d 02 ee 15 20  20 f2 67 65 74 5f 62 69  |00)....  .get_bi|
00000690  74 6d 61 70 28 69 25 29  0d 02 f8 10 20 20 e3 20  |tmap(i%)....  . |
000006a0  6a 25 3d 31 20 b8 20 38  0d 03 02 22 20 20 20 20  |j%=1 . 8..."    |
000006b0  6f 72 5f 64 65 66 25 28  69 25 2d 33 32 2c 6a 25  |or_def%(i%-32,j%|
000006c0  29 3d 62 6d 6c 25 28 6a  25 29 0d 03 0c 0a 20 20  |)=bml%(j%)....  |
000006d0  ed 20 6a 25 0d 03 16 08  ed 20 69 25 0d 03 20 16  |. j%..... i%.. .|
000006e0  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 66  |.. "Hourglass_Of|
000006f0  66 22 0d 03 2a 05 e1 0d  03 34 05 3a 0d 03 3e 0e  |f"..*....4.:..>.|
00000700  dd f2 73 65 74 5f 74 65  78 74 0d 03 48 27 f2 75  |..set_text..H'.u|
00000710  70 64 61 74 65 5f 69 63  6f 6e 5f 74 65 78 74 28  |pdate_icon_text(|
00000720  31 2c 36 2c a4 6d 65 73  73 28 22 41 50 50 22 29  |1,6,.mess("APP")|
00000730  29 0d 03 52 28 f2 75 70  64 61 74 65 5f 69 63 6f  |)..R(.update_ico|
00000740  6e 5f 74 65 78 74 28 31  2c 31 32 2c a4 6d 65 73  |n_text(1,12,.mes|
00000750  73 28 22 50 55 52 22 29  29 0d 03 5c 28 f2 75 70  |s("PUR"))..\(.up|
00000760  64 61 74 65 5f 69 63 6f  6e 5f 74 65 78 74 28 31  |date_icon_text(1|
00000770  2c 31 35 2c a4 6d 65 73  73 28 22 41 55 54 22 29  |,15,.mess("AUT")|
00000780  29 0d 03 66 28 f2 75 70  64 61 74 65 5f 69 63 6f  |)..f(.update_ico|
00000790  6e 5f 74 65 78 74 28 31  2c 31 38 2c a4 6d 65 73  |n_text(1,18,.mes|
000007a0  73 28 22 56 45 52 22 29  29 0d 03 70 28 f2 75 70  |s("VER"))..p(.up|
000007b0  64 61 74 65 5f 69 63 6f  6e 5f 74 65 78 74 28 34  |date_icon_text(4|
000007c0  2c 38 37 2c a4 6d 65 73  73 28 22 50 41 47 22 29  |,87,.mess("PAG")|
000007d0  29 0d 03 7a 29 f2 75 70  64 61 74 65 5f 69 63 6f  |)..z).update_ico|
000007e0  6e 5f 74 65 78 74 28 34  2c 31 31 36 2c a4 6d 65  |n_text(4,116,.me|
000007f0  73 73 28 22 53 56 46 22  29 29 0d 03 84 29 f2 75  |ss("SVF"))...).u|
00000800  70 64 61 74 65 5f 69 63  6f 6e 5f 74 65 78 74 28  |pdate_icon_text(|
00000810  34 2c 31 32 31 2c a4 6d  65 73 73 28 22 53 56 54  |4,121,.mess("SVT|
00000820  22 29 29 0d 03 8e 29 f2  75 70 64 61 74 65 5f 69  |"))...).update_i|
00000830  63 6f 6e 5f 74 65 78 74  28 34 2c 31 30 35 2c a4  |con_text(4,105,.|
00000840  6d 65 73 73 28 22 47 52  44 22 29 29 0d 03 98 28  |mess("GRD"))...(|
00000850  f2 75 70 64 61 74 65 5f  69 63 6f 6e 5f 74 65 78  |.update_icon_tex|
00000860  74 28 35 2c 31 30 2c a4  6d 65 73 73 28 22 53 44  |t(5,10,.mess("SD|
00000870  49 22 29 29 0d 03 a2 05  e1 0d 03 ac 05 3a 0d 03  |I")).........:..|
00000880  b6 10 dd f2 64 69 6d 65  6e 73 69 6f 6e 73 0d 03  |....dimensions..|
00000890  c0 0e 77 69 6e 64 6f 77  73 25 3d 37 0d 03 ca 29  |..windows%=7...)|
000008a0  de 20 62 75 66 66 65 72  25 20 31 32 38 2c 20 62  |. buffer% 128, b|
000008b0  6c 6f 63 6b 25 20 34 30  39 36 2c 20 68 65 6c 70  |lock% 4096, help|
000008c0  25 20 35 31 32 0d 03 d4  2e de 20 68 61 6e 64 6c  |% 512..... handl|
000008d0  65 25 28 77 69 6e 64 6f  77 73 25 29 2c 20 77 69  |e%(windows%), wi|
000008e0  6e 64 6f 77 5f 68 6e 64  24 28 77 69 6e 64 6f 77  |ndow_hnd$(window|
000008f0  73 25 29 0d 03 de 3b de  20 62 6d 6c 25 28 38 29  |s%)...;. bml%(8)|
00000900  2c 20 62 6d 6c 32 25 28  38 29 2c 20 6c 69 6e 65  |, bml2%(8), line|
00000910  73 25 28 38 29 2c 20 6f  72 5f 64 65 66 25 28 32  |s%(8), or_def%(2|
00000920  32 33 2c 31 36 29 2c 20  72 70 24 28 34 29 0d 03  |23,16), rp$(4)..|
00000930  e8 12 de 20 69 63 6f 6e  6d 65 6e 75 20 32 35 36  |... iconmenu 256|
00000940  0d 03 f2 0e 6c 69 6e 65  73 25 28 29 3d 32 0d 03  |....lines%()=2..|
00000950  fc 05 e1 0d 04 06 05 3a  0d 04 10 0f dd f2 76 61  |.......:......va|
00000960  72 69 61 62 6c 65 73 0d  04 1a 2b 63 68 25 3d a3  |riables...+ch%=.|
00000970  3a 20 72 63 25 3d b9 3a  20 70 61 6e 65 25 3d b9  |: rc%=.: pane%=.|
00000980  3a 20 66 6c 70 25 3d a3  3a 20 61 75 74 75 70 25  |: flp%=.: autup%|
00000990  3d a3 0d 04 24 36 63 65  25 3d 30 3a 20 63 74 73  |=...$6ce%=0: cts|
000009a0  25 3d 30 3a 20 61 61 6e  25 3d 31 3a 20 65 63 25  |%=0: aan%=1: ec%|
000009b0  3d 30 3a 20 73 61 25 3d  32 3a 20 64 6f 25 3d 31  |=0: sa%=2: do%=1|
000009c0  3a 20 6f 69 25 3d 2d 31  0d 04 2e 19 77 69 6e 64  |: oi%=-1....wind|
000009d0  6f 77 5f 68 6e 64 24 28  31 29 3d 22 69 6e 66 6f  |ow_hnd$(1)="info|
000009e0  22 0d 04 38 1f 77 69 6e  64 6f 77 5f 68 6e 64 24  |"..8.window_hnd$|
000009f0  28 32 29 3d 22 63 68 61  72 61 63 74 65 72 73 22  |(2)="characters"|
00000a00  0d 04 42 19 77 69 6e 64  6f 77 5f 68 6e 64 24 28  |..B.window_hnd$(|
00000a10  33 29 3d 22 65 64 69 74  22 0d 04 4c 1a 77 69 6e  |3)="edit"..L.win|
00000a20  64 6f 77 5f 68 6e 64 24  28 34 29 3d 22 74 6f 6f  |dow_hnd$(4)="too|
00000a30  6c 73 22 0d 04 56 1f 77  69 6e 64 6f 77 5f 68 6e  |ls"..V.window_hn|
00000a40  64 24 28 35 29 3d 22 73  61 76 65 66 6f 6e 74 61  |d$(5)="savefonta|
00000a50  73 22 0d 04 60 1a 77 69  6e 64 6f 77 5f 68 6e 64  |s"..`.window_hnd|
00000a60  24 28 36 29 3d 22 61 73  63 69 69 22 0d 04 6a 1b  |$(6)="ascii"..j.|
00000a70  77 69 6e 64 6f 77 5f 68  6e 64 24 28 37 29 3d 22  |window_hnd$(7)="|
00000a80  73 63 72 6f 6c 6c 22 0d  04 74 05 e1 0d 04 7e 05  |scroll"..t....~.|
00000a90  3a 0d 04 88 1c dd f2 6c  6f 61 64 5f 64 65 66 61  |:......load_defa|
00000aa0  75 6c 74 28 64 65 66 61  75 6c 74 24 29 0d 04 92  |ult(default$)...|
00000ab0  0e ea 20 6c 25 2c 69 25  2c 62 25 0d 04 9c 11 6c  |.. l%,i%,b%....l|
00000ac0  25 3d 8e 20 64 65 66 61  75 6c 74 24 0d 04 a6 11  |%=. default$....|
00000ad0  e3 20 69 25 3d 33 32 20  b8 20 32 35 35 0d 04 b0  |. i%=32 . 255...|
00000ae0  10 20 20 e3 20 62 25 3d  31 20 b8 20 38 0d 04 ba  |.  . b%=1 . 8...|
00000af0  20 20 20 20 20 6f 72 5f  64 65 66 25 28 69 25 2d  |     or_def%(i%-|
00000b00  33 32 2c 62 25 2b 38 29  3d 9a 23 6c 25 0d 04 c4  |32,b%+8)=.#l%...|
00000b10  0a 20 20 ed 20 62 25 0d  04 ce 08 ed 20 69 25 0d  |.  . b%..... i%.|
00000b20  04 d8 08 d9 23 6c 25 0d  04 e2 05 e1 0d 04 ec 05  |....#l%.........|
00000b30  3a 0d 04 f6 17 dd f2 6c  6f 61 64 5f 6d 65 6e 75  |:......load_menu|
00000b40  73 28 66 69 6c 65 24 29  0d 05 00 12 ea 20 6c 6d  |s(file$)..... lm|
00000b50  66 25 2c 6c 6d 24 2c 63  6d 25 0d 05 0a 10 6c 6d  |f%,lm$,cm%....lm|
00000b60  66 25 3d 8e 20 66 69 6c  65 24 0d 05 14 2f e7 20  |f%=. file$.../. |
00000b70  6c 6d 66 25 3d 30 20 85  20 30 2c 22 43 61 6e 6e  |lmf%=0 . 0,"Cann|
00000b80  6f 74 20 66 69 6e 64 20  6d 65 6e 75 20 64 65 66  |ot find menu def|
00000b90  69 6e 69 74 69 6f 6e 73  22 0d 05 1e 0c 6d 65 6e  |initions"....men|
00000ba0  75 73 25 3d 30 0d 05 28  15 c8 99 20 22 48 6f 75  |us%=0..(... "Hou|
00000bb0  72 67 6c 61 73 73 5f 4f  6e 22 0d 05 32 11 c8 95  |rglass_On"..2...|
00000bc0  20 ac 20 28 c5 23 6c 6d  66 25 29 0d 05 3c 10 20  | . (.#lmf%)..<. |
00000bd0  20 6c 6d 24 3d be 23 6c  6d 66 25 0d 05 46 1d 20  | lm$=.#lmf%..F. |
00000be0  20 e7 20 c0 6c 6d 24 2c  31 29 3d 22 3e 22 20 6d  | . .lm$,1)=">" m|
00000bf0  65 6e 75 73 25 2b 3d 31  0d 05 50 05 ce 0d 05 5a  |enus%+=1..P....Z|
00000c00  11 e7 20 6d 65 6e 75 73  25 3c 3e 30 20 8c 0d 05  |.. menus%<>0 ...|
00000c10  64 57 20 20 de 20 6d 65  6e 75 73 24 28 6d 65 6e  |dW  . menus$(men|
00000c20  75 73 25 2d 31 29 2c 69  74 65 6d 73 24 28 6d 65  |us%-1),items$(me|
00000c30  6e 75 73 25 2d 31 2c 32  30 29 2c 6d 65 6e 75 5f  |nus%-1,20),menu_|
00000c40  68 6e 64 24 28 6d 65 6e  75 73 25 2d 31 29 2c 6d  |hnd$(menus%-1),m|
00000c50  65 6e 75 5f 68 61 6e 64  6c 65 25 28 6d 65 6e 75  |enu_handle%(menu|
00000c60  73 25 2d 31 29 0d 05 6e  0e 20 20 cf 23 6c 6d 66  |s%-1)..n.  .#lmf|
00000c70  25 3d 30 0d 05 78 0c 20  20 63 6d 25 3d 2d 31 0d  |%=0..x.  cm%=-1.|
00000c80  05 82 0b 20 20 63 69 25  3d 30 0d 05 8c 11 20 20  |...  ci%=0....  |
00000c90  c8 95 20 ac 20 c5 23 6c  6d 66 25 0d 05 96 12 20  |.. . .#lmf%.... |
00000ca0  20 20 20 6c 6d 24 3d be  23 6c 6d 66 25 0d 05 a0  |   lm$=.#lmf%...|
00000cb0  13 20 20 20 20 e7 20 6c  6d 24 3c 3e 22 22 20 8c  |.    . lm$<>"" .|
00000cc0  0d 05 aa 1a 20 20 20 20  20 20 e7 20 c0 6c 6d 24  |....      . .lm$|
00000cd0  2c 31 29 3c 3e 22 3b 22  20 8c 0d 05 b4 1b 20 20  |,1)<>";" .....  |
00000ce0  20 20 20 20 20 20 e7 20  c0 6c 6d 24 2c 31 29 3d  |      . .lm$,1)=|
00000cf0  22 3e 22 20 8c 0d 05 be  14 20 20 20 20 20 20 20  |">" .....       |
00000d00  20 20 20 63 6d 25 2b 3d  31 0d 05 c8 21 20 20 20  |   cm%+=1...!   |
00000d10  20 20 20 20 20 20 20 6d  65 6e 75 73 24 28 63 6d  |       menus$(cm|
00000d20  25 29 3d c1 6c 6d 24 2c  32 29 0d 05 d2 44 20 20  |%)=.lm$,2)...D  |
00000d30  20 20 20 20 20 20 20 20  6d 65 6e 75 5f 68 6e 64  |        menu_hnd|
00000d40  24 28 63 6d 25 29 3d c1  6c 6d 24 2c a7 6c 6d 24  |$(cm%)=.lm$,.lm$|
00000d50  2c 22 3e 22 29 2b 31 2c  a7 6c 6d 24 2c 22 3a 22  |,">")+1,.lm$,":"|
00000d60  29 2d a7 6c 6d 24 2c 22  3e 22 29 2d 31 29 0d 05  |)-.lm$,">")-1)..|
00000d70  dc 13 20 20 20 20 20 20  20 20 20 20 63 69 25 3d  |..          ci%=|
00000d80  30 0d 05 e6 0d 20 20 20  20 20 20 20 20 cc 0d 05  |0....        ...|
00000d90  f0 21 20 20 20 20 20 20  20 20 20 20 69 74 65 6d  |.!          item|
00000da0  73 24 28 63 6d 25 2c 63  69 25 29 3d 6c 6d 24 0d  |s$(cm%,ci%)=lm$.|
00000db0  05 fa 14 20 20 20 20 20  20 20 20 20 20 63 69 25  |...          ci%|
00000dc0  2b 3d 31 0d 06 04 0d 20  20 20 20 20 20 20 20 cd  |+=1....        .|
00000dd0  0d 06 0e 0b 20 20 20 20  20 20 cd 0d 06 18 09 20  |....      ..... |
00000de0  20 20 20 cd 0d 06 22 07  20 20 ce 0d 06 2c 05 cd  |   ...".  ...,..|
00000df0  0d 06 36 0a d9 23 6c 6d  66 25 0d 06 40 16 de 20  |..6..#lmf%..@.. |
00000e00  6d 65 6d 25 20 31 30 32  34 2a 6d 65 6e 75 73 25  |mem% 1024*menus%|
00000e10  0d 06 4a 15 f2 6d 61 6b  65 5f 6d 65 6e 75 73 28  |..J..make_menus(|
00000e20  6d 65 6d 25 29 0d 06 54  16 c8 99 20 22 48 6f 75  |mem%)..T... "Hou|
00000e30  72 67 6c 61 73 73 5f 4f  66 66 22 0d 06 5e 05 e1  |rglass_Off"..^..|
00000e40  0d 06 68 05 3a 0d 06 72  17 dd f2 6d 61 6b 65 5f  |..h.:..r...make_|
00000e50  6d 65 6e 75 73 28 78 6d  65 6d 25 29 0d 06 7c 18  |menus(xmem%)..|.|
00000e60  e3 20 6d 65 6e 75 25 3d  30 20 b8 20 6d 65 6e 75  |. menu%=0 . menu|
00000e70  73 25 2d 31 0d 06 86 39  20 20 6d 65 6e 75 5f 68  |s%-1...9  menu_h|
00000e80  61 6e 64 6c 65 25 28 6d  65 6e 75 25 29 3d a4 6d  |andle%(menu%)=.m|
00000e90  65 6e 75 28 6d 65 6e 75  25 2c 78 6d 65 6d 25 2b  |enu(menu%,xmem%+|
00000ea0  28 6d 65 6e 75 25 2a 31  30 32 34 29 29 0d 06 90  |(menu%*1024))...|
00000eb0  0b ed 20 6d 65 6e 75 25  0d 06 9a 05 e1 0d 06 a4  |.. menu%........|
00000ec0  05 3a 0d 06 ae 17 dd a4  6d 65 6e 75 28 6d 65 6e  |.:......menu(men|
00000ed0  75 25 2c 78 6d 65 6d 25  29 0d 06 b8 24 f2 6d 65  |u%,xmem%)...$.me|
00000ee0  6e 75 5f 66 6c 61 67 73  28 6d 65 6e 75 73 24 28  |nu_flags(menus$(|
00000ef0  6d 65 6e 75 25 29 2c 78  6d 65 6d 25 29 0d 06 c2  |menu%),xmem%)...|
00000f00  1d e3 20 69 74 65 6d 25  3d 30 20 b8 20 a4 69 74  |.. item%=0 . .it|
00000f10  65 6d 73 28 6d 65 6e 75  25 29 0d 06 cc 31 20 20  |ems(menu%)...1  |
00000f20  f2 6d 65 6e 75 5f 69 74  65 6d 28 6d 65 6e 75 25  |.menu_item(menu%|
00000f30  2c 69 74 65 6d 73 24 28  6d 65 6e 75 25 2c 69 74  |,items$(menu%,it|
00000f40  65 6d 25 29 2c 78 6d 65  6d 25 29 0d 06 d6 0b ed  |em%),xmem%).....|
00000f50  20 69 74 65 6d 25 0d 06  e0 0a 3d 78 6d 65 6d 25  | item%....=xmem%|
00000f60  0d 06 ea 05 3a 0d 06 f4  1e dd f2 6d 65 6e 75 5f  |....:......menu_|
00000f70  66 6c 61 67 73 28 74 69  74 6c 65 24 2c 78 6d 65  |flags(title$,xme|
00000f80  6d 25 29 0d 06 fe 45 24  78 6d 65 6d 25 3d a4 6d  |m%)...E$xmem%=.m|
00000f90  65 73 73 28 c1 74 69 74  6c 65 24 2c a7 74 69 74  |ess(.title$,.tit|
00000fa0  6c 65 24 2c 22 3a 22 29  2b 31 2c a7 74 69 74 6c  |le$,":")+1,.titl|
00000fb0  65 24 2c 22 2c 22 29 2d  a7 74 69 74 6c 65 24 2c  |e$,",")-.title$,|
00000fc0  22 3a 22 29 2d 31 29 29  0d 07 08 0e 78 6d 65 6d  |":")-1))....xmem|
00000fd0  25 3f 31 32 3d 37 0d 07  12 0e 78 6d 65 6d 25 3f  |%?12=7....xmem%?|
00000fe0  31 33 3d 32 0d 07 1c 0e  78 6d 65 6d 25 3f 31 34  |13=2....xmem%?14|
00000ff0  3d 37 0d 07 26 0e 78 6d  65 6d 25 3f 31 35 3d 30  |=7..&.xmem%?15=0|
00001000  0d 07 30 27 78 6d 65 6d  25 21 31 36 3d bb 28 c1  |..0'xmem%!16=.(.|
00001010  74 69 74 6c 65 24 2c a7  74 69 74 6c 65 24 2c 22  |title$,.title$,"|
00001020  2c 22 29 2b 31 29 29 0d  07 3a 0f 78 6d 65 6d 25  |,")+1))..:.xmem%|
00001030  21 32 30 3d 34 30 0d 07  44 0e 78 6d 65 6d 25 21  |!20=40..D.xmem%!|
00001040  32 34 3d 34 0d 07 4e 05  e1 0d 07 58 05 3a 0d 07  |24=4..N....X.:..|
00001050  62 22 dd f2 6d 65 6e 75  5f 69 74 65 6d 28 6d 65  |b"..menu_item(me|
00001060  6e 75 25 2c 69 74 65 6d  24 2c 78 6d 65 6d 25 29  |nu%,item$,xmem%)|
00001070  0d 07 6c 23 6d 65 6e 75  5f 69 74 65 6d 25 3d 78  |..l#menu_item%=x|
00001080  6d 65 6d 25 2b 32 34 2a  28 69 74 65 6d 25 2b 31  |mem%+24*(item%+1|
00001090  29 2b 34 0d 07 76 11 21  6d 65 6e 75 5f 69 74 65  |)+4..v.!menu_ite|
000010a0  6d 25 3d 30 0d 07 80 30  e7 20 a7 69 74 65 6d 24  |m%=0...0. .item$|
000010b0  2c 22 7e 22 29 3e 30 20  21 6d 65 6e 75 5f 69 74  |,"~")>0 !menu_it|
000010c0  65 6d 25 3d 21 6d 65 6e  75 5f 69 74 65 6d 25 20  |em%=!menu_item% |
000010d0  84 20 26 31 0d 07 8a 30  e7 20 a7 69 74 65 6d 24  |. &1...0. .item$|
000010e0  2c 22 7c 22 29 3e 30 20  21 6d 65 6e 75 5f 69 74  |,"|")>0 !menu_it|
000010f0  65 6d 25 3d 21 6d 65 6e  75 5f 69 74 65 6d 25 20  |em%=!menu_item% |
00001100  84 20 26 32 0d 07 94 37  e7 20 69 74 65 6d 25 3d  |. &2...7. item%=|
00001110  a4 69 74 65 6d 73 28 6d  65 6e 75 25 29 20 21 6d  |.items(menu%) !m|
00001120  65 6e 75 5f 69 74 65 6d  25 3d 21 6d 65 6e 75 5f  |enu_item%=!menu_|
00001130  69 74 65 6d 25 20 84 20  26 38 30 0d 07 9e 23 21  |item% . &80...#!|
00001140  28 6d 65 6e 75 5f 69 74  65 6d 25 2b 34 29 3d a4  |(menu_item%+4)=.|
00001150  73 75 62 6d 65 6e 75 28  69 74 65 6d 24 29 0d 07  |submenu(item$)..|
00001160  a8 1d 21 28 6d 65 6e 75  5f 69 74 65 6d 25 2b 38  |..!(menu_item%+8|
00001170  29 3d 26 30 37 30 30 30  30 30 31 0d 07 b2 26 74  |)=&07000001...&t|
00001180  65 78 74 24 3d a4 6d 65  73 73 28 c0 69 74 65 6d  |ext$=.mess(.item|
00001190  24 2c a7 69 74 65 6d 24  2c 22 3a 22 29 2d 31 29  |$,.item$,":")-1)|
000011a0  29 0d 07 bc 11 e7 20 a9  74 65 78 74 24 3c 31 33  |)..... .text$<13|
000011b0  20 8c 0d 07 c6 1c 20 20  24 28 6d 65 6e 75 5f 69  | .....  $(menu_i|
000011c0  74 65 6d 25 2b 31 32 29  3d 74 65 78 74 24 0d 07  |tem%+12)=text$..|
000011d0  d0 05 cc 0d 07 da 15 20  20 de 20 69 6e 64 69 72  |.......  . indir|
000011e0  25 20 a9 74 65 78 74 24  0d 07 e4 13 20 20 24 69  |% .text$....  $i|
000011f0  6e 64 69 72 25 3d 74 65  78 74 24 0d 07 ee 2c 20  |ndir%=text$..., |
00001200  20 21 28 6d 65 6e 75 5f  69 74 65 6d 25 2b 38 29  | !(menu_item%+8)|
00001210  3d 21 28 6d 65 6e 75 5f  69 74 65 6d 25 2b 38 29  |=!(menu_item%+8)|
00001220  20 84 20 26 31 30 30 0d  07 f8 1d 20 20 21 28 6d  | . &100....  !(m|
00001230  65 6e 75 5f 69 74 65 6d  25 2b 31 32 29 3d 69 6e  |enu_item%+12)=in|
00001240  64 69 72 25 0d 08 02 19  20 20 21 28 6d 65 6e 75  |dir%....  !(menu|
00001250  5f 69 74 65 6d 25 2b 31  36 29 3d 2d 31 0d 08 0c  |_item%+16)=-1...|
00001260  1d 20 20 21 28 6d 65 6e  75 5f 69 74 65 6d 25 2b  |.  !(menu_item%+|
00001270  32 30 29 3d a9 74 65 78  74 24 0d 08 16 05 cd 0d  |20)=.text$......|
00001280  08 20 1f e1 20 20 20 20  20 20 20 20 20 20 20 20  |. ..            |
00001290  20 20 20 20 20 20 20 20  20 20 20 20 20 20 0d 08  |              ..|
000012a0  2a 05 3a 0d 08 34 14 dd  a4 73 75 62 6d 65 6e 75  |*.:..4...submenu|
000012b0  28 69 74 65 6d 24 29 0d  08 3e 15 e7 20 a7 69 74  |(item$)..>.. .it|
000012c0  65 6d 24 2c 22 2d 22 29  3e 30 20 8c 0d 08 48 21  |em$,"-")>0 ...H!|
000012d0  20 20 69 74 65 6d 24 3d  c1 69 74 65 6d 24 2c a7  |  item$=.item$,.|
000012e0  69 74 65 6d 24 2c 22 2d  22 29 2b 31 29 0d 08 52  |item$,"-")+1)..R|
000012f0  19 20 20 e3 20 68 6e 64  25 3d 31 20 b8 20 77 69  |.  . hnd%=1 . wi|
00001300  6e 64 6f 77 73 25 0d 08  5c 23 20 20 20 20 e7 20  |ndows%..\#    . |
00001310  69 74 65 6d 24 3d 77 69  6e 64 6f 77 5f 68 6e 64  |item$=window_hnd|
00001320  24 28 68 6e 64 25 29 20  8c 0d 08 66 27 20 20 20  |$(hnd%) ...f'   |
00001330  20 20 20 3d 68 61 6e 64  6c 65 25 28 68 6e 64 25  |   =handle%(hnd%|
00001340  29 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |)               |
00001350  0d 08 70 09 20 20 20 20  cd 0d 08 7a 07 20 20 ed  |..p.    ...z.  .|
00001360  0d 08 84 05 cd 0d 08 8e  15 e7 20 a7 69 74 65 6d  |.......... .item|
00001370  24 2c 22 2b 22 29 3e 30  20 8c 0d 08 98 21 20 20  |$,"+")>0 ....!  |
00001380  69 74 65 6d 24 3d c1 69  74 65 6d 24 2c a7 69 74  |item$=.item$,.it|
00001390  65 6d 24 2c 22 2b 22 29  2b 31 29 0d 08 a2 19 20  |em$,"+")+1).... |
000013a0  20 e3 20 68 6e 64 25 3d  30 20 b8 20 6d 65 6e 75  | . hnd%=0 . menu|
000013b0  73 25 2d 31 0d 08 ac 21  20 20 20 20 e7 20 69 74  |s%-1...!    . it|
000013c0  65 6d 24 3d 6d 65 6e 75  5f 68 6e 64 24 28 68 6e  |em$=menu_hnd$(hn|
000013d0  64 25 29 20 8c 0d 08 b6  1b 20 20 20 20 20 20 3d  |d%) .....      =|
000013e0  6d 65 6d 25 2b 28 68 6e  64 25 2a 31 30 32 34 29  |mem%+(hnd%*1024)|
000013f0  0d 08 c0 09 20 20 20 20  cd 0d 08 ca 07 20 20 ed  |....    .....  .|
00001400  0d 08 d4 05 cd 0d 08 de  07 3d 2d 31 0d 08 e8 05  |.........=-1....|
00001410  3a 0d 08 f2 12 dd a4 69  74 65 6d 73 28 6d 65 6e  |:......items(men|
00001420  75 25 29 0d 08 fc 08 69  25 3d 30 0d 09 06 1b c8  |u%)....i%=0.....|
00001430  95 20 69 74 65 6d 73 24  28 6d 65 6e 75 25 2c 69  |. items$(menu%,i|
00001440  25 29 3c 3e 22 22 0d 09  10 0b 20 20 69 25 2b 3d  |%)<>""....  i%+=|
00001450  31 0d 09 1a 05 ce 0d 09  24 09 3d 69 25 2d 31 0d  |1.......$.=i%-1.|
00001460  09 2e 05 3a 0d 09 38 1a  dd f2 6c 6f 61 64 5f 6d  |...:..8...load_m|
00001470  65 73 73 61 67 65 73 28  66 69 6c 65 24 29 0d 09  |essages(file$)..|
00001480  42 12 ea 20 6c 6d 66 25  2c 6c 6d 24 2c 63 6d 25  |B.. lmf%,lm$,cm%|
00001490  0d 09 4c 10 6c 6d 66 25  3d 8e 20 66 69 6c 65 24  |..L.lmf%=. file$|
000014a0  0d 09 56 2d e7 20 6c 6d  66 25 3d 30 20 85 20 30  |..V-. lmf%=0 . 0|
000014b0  2c 22 43 61 6e 6e 6f 74  20 66 69 6e 64 20 74 65  |,"Cannot find te|
000014c0  78 74 20 72 65 73 6f 75  72 63 65 73 22 0d 09 60  |xt resources"..`|
000014d0  0f 6d 65 73 73 61 67 65  73 25 3d 30 0d 09 6a 15  |.messages%=0..j.|
000014e0  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 6e  |.. "Hourglass_On|
000014f0  22 0d 09 74 11 c8 95 20  ac 20 28 c5 23 6c 6d 66  |"..t... . (.#lmf|
00001500  25 29 0d 09 7e 10 20 20  6c 6d 24 3d be 23 6c 6d  |%)..~.  lm$=.#lm|
00001510  66 25 0d 09 88 11 20 20  e7 20 6c 6d 24 3c 3e 22  |f%....  . lm$<>"|
00001520  22 20 8c 0d 09 92 18 20  20 20 20 e7 20 c0 6c 6d  |" .....    . .lm|
00001530  24 2c 31 29 3c 3e 22 3b  22 20 8c 0d 09 9c 25 20  |$,1)<>";" ....% |
00001540  20 20 20 20 20 e7 20 a7  6c 6d 24 2c 22 3a 22 29  |     . .lm$,":")|
00001550  3c 3e 30 20 6d 65 73 73  61 67 65 73 25 2b 3d 31  |<>0 messages%+=1|
00001560  0d 09 a6 09 20 20 20 20  cd 0d 09 b0 07 20 20 cd  |....    .....  .|
00001570  0d 09 ba 05 ce 0d 09 c4  14 e7 20 6d 65 73 73 61  |.......... messa|
00001580  67 65 73 25 3c 3e 30 20  8c 0d 09 ce 32 20 20 de  |ges%<>0 ....2  .|
00001590  20 6d 65 73 73 61 67 65  73 24 28 6d 65 73 73 61  | messages$(messa|
000015a0  67 65 73 25 2d 31 29 2c  63 6f 64 65 73 24 28 6d  |ges%-1),codes$(m|
000015b0  65 73 73 61 67 65 73 25  2d 31 29 0d 09 d8 0e 20  |essages%-1).... |
000015c0  20 cf 23 6c 6d 66 25 3d  30 0d 09 e2 0b 20 20 63  | .#lmf%=0....  c|
000015d0  6d 25 3d 30 0d 09 ec 11  20 20 c8 95 20 ac 20 c5  |m%=0....  .. . .|
000015e0  23 6c 6d 66 25 0d 09 f6  12 20 20 20 20 6c 6d 24  |#lmf%....    lm$|
000015f0  3d be 23 6c 6d 66 25 0d  0a 00 13 20 20 20 20 e7  |=.#lmf%....    .|
00001600  20 6c 6d 24 3c 3e 22 22  20 8c 0d 0a 0a 1a 20 20  | lm$<>"" .....  |
00001610  20 20 20 20 e7 20 c0 6c  6d 24 2c 31 29 3c 3e 22  |    . .lm$,1)<>"|
00001620  3b 22 20 8c 0d 0a 14 29  20 20 20 20 20 20 20 20  |;" ....)        |
00001630  63 6f 64 65 73 24 28 63  6d 25 29 3d c0 6c 6d 24  |codes$(cm%)=.lm$|
00001640  2c a7 6c 6d 24 2c 22 3a  22 29 2d 31 29 0d 0a 1e  |,.lm$,":")-1)...|
00001650  2c 20 20 20 20 20 20 20  20 6d 65 73 73 61 67 65  |,        message|
00001660  73 24 28 63 6d 25 29 3d  c1 6c 6d 24 2c a7 6c 6d  |s$(cm%)=.lm$,.lm|
00001670  24 2c 22 3a 22 29 2b 31  29 0d 0a 28 12 20 20 20  |$,":")+1)..(.   |
00001680  20 20 20 20 20 63 6d 25  2b 3d 31 0d 0a 32 0b 20  |     cm%+=1..2. |
00001690  20 20 20 20 20 cd 0d 0a  3c 09 20 20 20 20 cd 0d  |     ...<.    ..|
000016a0  0a 46 07 20 20 ce 0d 0a  50 05 cd 0d 0a 5a 0a d9  |.F.  ...P....Z..|
000016b0  23 6c 6d 66 25 0d 0a 64  16 c8 99 20 22 48 6f 75  |#lmf%..d... "Hou|
000016c0  72 67 6c 61 73 73 5f 4f  66 66 22 0d 0a 6e 05 e1  |rglass_Off"..n..|
000016d0  0d 0a 78 05 3a 0d 0a 82  11 dd a4 6d 65 73 73 28  |..x.:......mess(|
000016e0  63 6f 64 65 24 29 0d 0a  8c 20 3d a4 6d 65 73 73  |code$)... =.mess|
000016f0  61 67 65 28 63 6f 64 65  24 2c 22 22 2c 22 22 2c  |age(code$,"","",|
00001700  22 22 2c 22 22 29 0d 0a  96 05 3a 0d 0a a0 30 dd  |"","")....:...0.|
00001710  a4 6d 65 73 73 61 67 65  28 63 6f 64 65 24 2c 72  |.message(code$,r|
00001720  70 24 28 31 29 2c 72 70  24 28 32 29 2c 72 70 24  |p$(1),rp$(2),rp$|
00001730  28 33 29 2c 72 70 24 28  34 29 29 0d 0a aa 0b ea  |(3),rp$(4)).....|
00001740  20 69 25 2c 66 25 0d 0a  b4 13 e7 20 6d 65 73 73  | i%,f%..... mess|
00001750  61 67 65 73 25 3d 30 20  8c 0d 0a be 0c 20 20 3d  |ages%=0 .....  =|
00001760  63 6f 64 65 24 0d 0a c8  05 cc 0d 0a d2 1b 20 20  |code$.........  |
00001770  e3 20 6d 73 25 3d 30 20  b8 20 6d 65 73 73 61 67  |. ms%=0 . messag|
00001780  65 73 25 2d 31 0d 0a dc  1d 20 20 20 20 e7 20 63  |es%-1....    . c|
00001790  6f 64 65 24 3d 63 6f 64  65 73 24 28 6d 73 25 29  |ode$=codes$(ms%)|
000017a0  20 8c 0d 0a e6 21 20 20  20 20 20 20 6d 65 73 73  | ....!      mess|
000017b0  61 67 65 24 3d 6d 65 73  73 61 67 65 73 24 28 6d  |age$=messages$(m|
000017c0  73 25 29 0d 0a f0 14 20  20 20 20 20 20 e3 20 72  |s%)....      . r|
000017d0  25 3d 31 20 b8 20 34 0d  0a fa 26 20 20 20 20 20  |%=1 . 4...&     |
000017e0  20 20 20 72 70 25 3d a7  6d 65 73 73 61 67 65 24  |   rp%=.message$|
000017f0  2c 22 25 22 2b c3 28 72  25 2d 31 29 29 0d 0b 04  |,"%"+.(r%-1))...|
00001800  47 20 20 20 20 20 20 20  20 e7 20 72 70 25 3c 3e  |G        . rp%<>|
00001810  30 20 6d 65 73 73 61 67  65 24 3d c0 6d 65 73 73  |0 message$=.mess|
00001820  61 67 65 24 2c 72 70 25  2d 31 29 2b 72 70 24 28  |age$,rp%-1)+rp$(|
00001830  72 25 29 2b c1 6d 65 73  73 61 67 65 24 2c 72 70  |r%)+.message$,rp|
00001840  25 2b 32 29 0d 0b 0e 0e  20 20 20 20 20 20 ed 20  |%+2)....      . |
00001850  72 25 0d 0b 18 17 20 20  20 20 20 20 6d 73 25 3d  |r%....      ms%=|
00001860  6d 65 73 73 61 67 65 73  25 0d 0b 22 09 20 20 20  |messages%..".   |
00001870  20 cd 0d 0b 2c 0b 20 20  ed 20 6d 73 25 0d 0b 36  | ...,.  . ms%..6|
00001880  05 cd 0d 0b 40 0d 3d 6d  65 73 73 61 67 65 24 0d  |....@.=message$.|
00001890  0b 4a 05 3a 0d 0b 54 10  dd f2 73 74 61 72 74 5f  |.J.:..T...start_|
000018a0  74 61 73 6b 0d 0b 5e 3e  c8 99 20 22 57 69 6d 70  |task..^>.. "Wimp|
000018b0  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 32 30 30  |_Initialise",200|
000018c0  2c 26 34 42 35 33 34 31  35 34 2c a4 6d 65 73 73  |,&4B534154,.mess|
000018d0  28 22 54 53 4b 22 29 20  b8 20 2c 74 61 73 6b 69  |("TSK") . ,taski|
000018e0  64 25 0d 0b 68 31 69 63  6f 6e 62 61 72 25 3d a4  |d%..h1iconbar%=.|
000018f0  69 63 6f 6e 62 61 72 28  2d 31 2c 30 2c 30 2c 36  |iconbar(-1,0,0,6|
00001900  38 2c 36 38 2c a4 6d 65  73 73 28 22 49 43 4f 4e  |8,68,.mess("ICON|
00001910  22 29 29 0d 0b 72 05 e1  0d 0b 7c 05 3a 0d 0b 86  |"))..r....|.:...|
00001920  1b dd f2 6c 6f 61 64 5f  74 65 6d 70 6c 61 74 65  |...load_template|
00001930  73 28 66 69 6c 65 24 29  0d 0b 90 5d de 20 6c 77  |s(file$)...]. lw|
00001940  25 20 35 31 32 30 2c 69  6e 66 77 25 20 35 31 32  |% 5120,infw% 512|
00001950  2c 63 68 61 72 77 25 20  35 31 32 2c 65 64 69 74  |,charw% 512,edit|
00001960  77 25 20 35 31 32 2c 74  6f 6f 6c 73 77 25 20 31  |w% 512,toolsw% 1|
00001970  35 33 36 2c 73 61 76 65  77 25 20 35 31 32 2c 61  |536,savew% 512,a|
00001980  73 63 69 69 77 25 20 35  31 32 2c 70 61 6e 65 77  |sciiw% 512,panew|
00001990  25 20 35 31 32 0d 0b 9a  21 c8 99 20 22 57 69 6d  |% 512...!.. "Wim|
000019a0  70 5f 4f 70 65 6e 54 65  6d 70 6c 61 74 65 22 2c  |p_OpenTemplate",|
000019b0  2c 66 69 6c 65 24 0d 0b  a4 2f 68 61 6e 64 6c 65  |,file$.../handle|
000019c0  25 28 31 29 3d a4 6c 6f  61 64 5f 74 65 6d 70 6c  |%(1)=.load_templ|
000019d0  61 74 65 28 22 69 6e 66  6f 22 2c 69 6e 66 77 25  |ate("info",infw%|
000019e0  2c 35 31 32 29 0d 0b ae  36 68 61 6e 64 6c 65 25  |,512)...6handle%|
000019f0  28 32 29 3d a4 6c 6f 61  64 5f 74 65 6d 70 6c 61  |(2)=.load_templa|
00001a00  74 65 28 22 63 68 61 72  61 63 74 65 72 73 22 2c  |te("characters",|
00001a10  63 68 61 72 77 25 2c 35  31 32 29 0d 0b b8 30 68  |charw%,512)...0h|
00001a20  61 6e 64 6c 65 25 28 33  29 3d a4 6c 6f 61 64 5f  |andle%(3)=.load_|
00001a30  74 65 6d 70 6c 61 74 65  28 22 65 64 69 74 22 2c  |template("edit",|
00001a40  65 64 69 74 77 25 2c 35  31 32 29 0d 0b c2 33 68  |editw%,512)...3h|
00001a50  61 6e 64 6c 65 25 28 34  29 3d a4 6c 6f 61 64 5f  |andle%(4)=.load_|
00001a60  74 65 6d 70 6c 61 74 65  28 22 74 6f 6f 6c 73 22  |template("tools"|
00001a70  2c 74 6f 6f 6c 73 77 25  2c 31 35 33 36 29 0d 0b  |,toolsw%,1536)..|
00001a80  cc 36 68 61 6e 64 6c 65  25 28 35 29 3d a4 6c 6f  |.6handle%(5)=.lo|
00001a90  61 64 5f 74 65 6d 70 6c  61 74 65 28 22 73 61 76  |ad_template("sav|
00001aa0  65 66 6f 6e 74 61 73 22  2c 73 61 76 65 77 25 2c  |efontas",savew%,|
00001ab0  35 31 32 29 0d 0b d6 32  68 61 6e 64 6c 65 25 28  |512)...2handle%(|
00001ac0  36 29 3d a4 6c 6f 61 64  5f 74 65 6d 70 6c 61 74  |6)=.load_templat|
00001ad0  65 28 22 61 73 63 69 69  22 2c 61 73 63 69 69 77  |e("ascii",asciiw|
00001ae0  25 2c 35 31 32 29 0d 0b  e0 32 68 61 6e 64 6c 65  |%,512)...2handle|
00001af0  25 28 37 29 3d a4 6c 6f  61 64 5f 74 65 6d 70 6c  |%(7)=.load_templ|
00001b00  61 74 65 28 22 73 63 72  6f 6c 6c 22 2c 70 61 6e  |ate("scroll",pan|
00001b10  65 77 25 2c 35 31 32 29  0d 0b ea 1b c8 99 20 22  |ew%,512)...... "|
00001b20  57 69 6d 70 5f 43 6c 6f  73 65 54 65 6d 70 6c 61  |Wimp_CloseTempla|
00001b30  74 65 22 0d 0b f4 05 e1  0d 0b fe 05 3a 0d 0c 08  |te".........:...|
00001b40  2a dd a4 6c 6f 61 64 5f  74 65 6d 70 6c 61 74 65  |*..load_template|
00001b50  28 74 65 6d 70 6c 61 74  65 24 2c 77 61 25 2c 62  |(template$,wa%,b|
00001b60  6c 6b 6c 65 6e 25 29 0d  0c 12 3e c8 99 20 22 57  |lklen%)...>.. "W|
00001b70  69 6d 70 5f 4c 6f 61 64  54 65 6d 70 6c 61 74 65  |imp_LoadTemplate|
00001b80  22 2c 2c 6c 77 25 2c 77  61 25 2c 77 61 25 2b 62  |",,lw%,wa%,wa%+b|
00001b90  6c 6b 6c 65 6e 25 2c 2d  31 2c 74 65 6d 70 6c 61  |lklen%,-1,templa|
00001ba0  74 65 24 2c 30 0d 0c 1c  30 c8 99 20 22 57 69 6d  |te$,0...0.. "Wim|
00001bb0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00001bc0  2c 6c 77 25 20 b8 20 77  69 6e 64 6f 77 5f 68 61  |,lw% . window_ha|
00001bd0  6e 64 6c 65 25 0d 0c 26  13 3d 77 69 6e 64 6f 77  |ndle%..&.=window|
00001be0  5f 68 61 6e 64 6c 65 25  0d 0c 30 05 3a 0d 0c 3a  |_handle%..0.:..:|
00001bf0  2e dd a4 72 65 61 64 5f  69 6e 64 69 72 65 63 74  |...read_indirect|
00001c00  65 64 5f 69 63 6f 6e 5f  74 65 78 74 28 77 69 6e  |ed_icon_text(win|
00001c10  64 6f 77 25 2c 69 63 6f  6e 25 29 0d 0c 44 14 21  |dow%,icon%)..D.!|
00001c20  62 75 66 66 65 72 25 3d  77 69 6e 64 6f 77 25 0d  |buffer%=window%.|
00001c30  0c 4e 13 62 75 66 66 65  72 25 21 34 3d 69 63 6f  |.N.buffer%!4=ico|
00001c40  6e 25 0d 0c 58 23 c8 99  20 22 57 69 6d 70 5f 47  |n%..X#.. "Wimp_G|
00001c50  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 75  |etIconState",,bu|
00001c60  66 66 65 72 25 0d 0c 62  12 3d 24 28 62 75 66 66  |ffer%..b.=$(buff|
00001c70  65 72 25 21 32 38 29 0d  0c 6c 05 3a 0d 0c 76 1a  |er%!28)..l.:..v.|
00001c80  dd f2 6d 6f 75 73 65 5f  63 6c 69 63 6b 28 68 61  |..mouse_click(ha|
00001c90  6e 64 6c 65 25 29 0d 0c  80 10 c8 8e 20 68 61 6e  |ndle%)...... han|
00001ca0  64 6c 65 25 20 ca 0d 0c  8a 19 20 20 c9 20 2d 32  |dle% .....  . -2|
00001cb0  3a 20 c8 8e 20 62 6c 6f  63 6b 25 21 38 20 ca 0d  |: .. block%!8 ..|
00001cc0  0c 94 44 20 20 20 20 c9  20 32 3a 20 c8 99 20 22  |..D    . 2: .. "|
00001cd0  57 69 6d 70 5f 43 72 65  61 74 65 4d 65 6e 75 22  |Wimp_CreateMenu"|
00001ce0  2c 30 2c 6d 65 6e 75 5f  68 61 6e 64 6c 65 25 28  |,0,menu_handle%(|
00001cf0  30 29 2c 62 6c 6f 63 6b  25 21 30 2d 31 30 30 2c  |0),block%!0-100,|
00001d00  34 30 38 0d 0c 9e 19 20  20 20 20 20 20 63 75 72  |408....      cur|
00001d10  72 65 6e 74 5f 6d 65 6e  75 25 3d 30 0d 0c a8 20  |rent_menu%=0... |
00001d20  20 20 20 20 c9 20 34 3a  20 62 6c 6f 63 6b 25 21  |    . 4: block%!|
00001d30  30 3d 68 61 6e 64 6c 65  25 28 32 29 0d 0c b2 27  |0=handle%(2)...'|
00001d40  20 20 20 20 20 20 c8 99  20 22 57 69 6d 70 5f 43  |      .. "Wimp_C|
00001d50  6c 6f 73 65 57 69 6e 64  6f 77 22 2c 2c 62 6c 6f  |loseWindow",,blo|
00001d60  63 6b 25 0d 0c bc 1d 20  20 20 20 20 20 f2 6f 70  |ck%....      .op|
00001d70  65 6e 28 68 61 6e 64 6c  65 25 28 32 29 2c 30 29  |en(handle%(2),0)|
00001d80  0d 0c c6 07 20 20 cb 0d  0c d0 21 20 20 c9 20 68  |....  ....!  . h|
00001d90  61 6e 64 6c 65 25 28 32  29 3a 20 c8 8e 20 62 6c  |andle%(2): .. bl|
00001da0  6f 63 6b 25 21 38 20 ca  0d 0c da 22 20 20 20 20  |ock%!8 ...."    |
00001db0  c9 20 31 3a 20 e7 20 bb  28 c3 a4 67 65 74 5f 62  |. 1: . .(..get_b|
00001dc0  6c 6f 62 29 3c 32 35 36  20 8c 0d 0c e4 15 20 20  |lob)<256 .....  |
00001dd0  20 20 20 20 20 20 73 61  25 3d 33 2d 73 61 25 0d  |      sa%=3-sa%.|
00001de0  0c ee 5b 20 20 20 20 20  20 20 20 e7 20 73 61 25  |..[        . sa%|
00001df0  3d 31 20 f2 75 70 64 61  74 65 5f 69 63 6f 6e 5f  |=1 .update_icon_|
00001e00  74 65 78 74 28 34 2c 33  32 2c c3 a4 67 65 74 5f  |text(4,32,..get_|
00001e10  62 6c 6f 62 29 20 8b 20  f2 75 70 64 61 74 65 5f  |blob) . .update_|
00001e20  69 63 6f 6e 5f 74 65 78  74 28 34 2c 33 37 2c c3  |icon_text(4,37,.|
00001e30  a4 67 65 74 5f 62 6c 6f  62 29 0d 0c f8 0b 20 20  |.get_blob)....  |
00001e40  20 20 20 20 cd 0d 0d 02  4c 20 20 20 20 c9 20 32  |    ....L    . 2|
00001e50  3a 20 c8 99 20 22 57 69  6d 70 5f 43 72 65 61 74  |: .. "Wimp_Creat|
00001e60  65 4d 65 6e 75 22 2c 30  2c 6d 65 6e 75 5f 68 61  |eMenu",0,menu_ha|
00001e70  6e 64 6c 65 25 28 31 29  2c 62 6c 6f 63 6b 25 21  |ndle%(1),block%!|
00001e80  30 2d 31 39 30 2c 62 6c  6f 63 6b 25 21 34 2b 32  |0-190,block%!4+2|
00001e90  30 0d 0d 0c 19 20 20 20  20 20 20 63 75 72 72 65  |0....      curre|
00001ea0  6e 74 5f 6d 65 6e 75 25  3d 31 0d 0d 16 21 20 20  |nt_menu%=1...!  |
00001eb0  20 20 c9 20 34 3a 20 f2  6e 65 77 5f 63 68 61 72  |  . 4: .new_char|
00001ec0  28 a4 67 65 74 5f 62 6c  6f 62 29 0d 0d 20 07 20  |(.get_blob).. . |
00001ed0  20 cb 0d 0d 2a 28 20 20  c9 20 68 61 6e 64 6c 65  | ...*(  . handle|
00001ee0  25 28 33 29 3a 20 f2 73  65 74 5f 62 6c 6f 62 28  |%(3): .set_blob(|
00001ef0  62 6c 6f 63 6b 25 21 31  36 29 0d 0d 34 21 20 20  |block%!16)..4!  |
00001f00  c9 20 68 61 6e 64 6c 65  25 28 34 29 3a 20 c8 8e  |. handle%(4): ..|
00001f10  20 62 6c 6f 63 6b 25 21  38 20 ca 0d 0d 3e 29 20  | block%!8 ...>) |
00001f20  20 20 20 c9 20 31 2c 34  3a 20 f2 74 6f 6f 6c 73  |   . 1,4: .tools|
00001f30  28 62 6c 6f 63 6b 25 21  31 36 2c 62 6c 6f 63 6b  |(block%!16,block|
00001f40  25 21 38 29 0d 0d 48 4c  20 20 20 20 c9 20 32 3a  |%!8)..HL    . 2:|
00001f50  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00001f60  4d 65 6e 75 22 2c 30 2c  6d 65 6e 75 5f 68 61 6e  |Menu",0,menu_han|
00001f70  64 6c 65 25 28 31 29 2c  62 6c 6f 63 6b 25 21 30  |dle%(1),block%!0|
00001f80  2d 31 39 30 2c 62 6c 6f  63 6b 25 21 34 2b 32 30  |-190,block%!4+20|
00001f90  0d 0d 52 19 20 20 20 20  20 20 63 75 72 72 65 6e  |..R.      curren|
00001fa0  74 5f 6d 65 6e 75 25 3d  31 0d 0d 5c 07 20 20 cb  |t_menu%=1..\.  .|
00001fb0  0d 0d 66 22 20 20 c9 20  68 61 6e 64 6c 65 25 28  |..f"  . handle%(|
00001fc0  35 29 3a 20 c8 8e 20 62  6c 6f 63 6b 25 21 31 36  |5): .. block%!16|
00001fd0  20 ca 0d 0d 70 1d 20 20  20 20 c9 20 30 3a 20 f2  | ...p.    . 0: .|
00001fe0  73 74 61 72 74 5f 64 72  61 67 28 35 2c 30 29 0d  |start_drag(5,0).|
00001ff0  0d 7a 26 20 20 20 20 c9  20 36 3a 20 e7 20 62 6c  |.z&    . 6: . bl|
00002000  6f 63 6b 25 21 38 3d 34  20 f2 6f 6b 5f 63 6c 69  |ock%!8=4 .ok_cli|
00002010  63 6b 28 b9 29 0d 0d 84  07 20 20 cb 0d 0d 8e 22  |ck(.)....  ...."|
00002020  20 20 c9 20 68 61 6e 64  6c 65 25 28 36 29 3a 20  |  . handle%(6): |
00002030  c8 8e 20 62 6c 6f 63 6b  25 21 31 36 20 ca 0d 0d  |.. block%!16 ...|
00002040  98 0c 20 20 20 20 c9 20  39 3a 0d 0d a2 15 20 20  |..    . 9:....  |
00002050  20 20 20 20 62 25 3d 62  6c 6f 63 6b 25 21 38 0d  |    b%=block%!8.|
00002060  0d ac 19 20 20 20 20 20  20 e7 20 62 25 3d 31 20  |...      . b%=1 |
00002070  84 20 62 25 3d 34 20 8c  0d 0d b6 2b 20 20 20 20  |. b%=4 ....+    |
00002080  20 20 20 20 f2 72 65 76  65 72 73 65 5f 69 63 6f  |    .reverse_ico|
00002090  6e 28 68 61 6e 64 6c 65  25 28 36 29 2c 37 2c 38  |n(handle%(6),7,8|
000020a0  2c 39 29 0d 0d c0 40 20  20 20 20 20 20 20 20 f2  |,9)...@        .|
000020b0  6e 65 77 5f 63 68 61 72  28 bb a4 72 65 61 64 5f  |new_char(..read_|
000020c0  69 6e 64 69 72 65 63 74  65 64 5f 69 63 6f 6e 5f  |indirected_icon_|
000020d0  74 65 78 74 28 68 61 6e  64 6c 65 25 28 36 29 2c  |text(handle%(6),|
000020e0  33 29 29 0d 0d ca 2b 20  20 20 20 20 20 20 20 f2  |3))...+        .|
000020f0  72 65 76 65 72 73 65 5f  69 63 6f 6e 28 68 61 6e  |reverse_icon(han|
00002100  64 6c 65 25 28 36 29 2c  37 2c 38 2c 39 29 0d 0d  |dle%(6),7,8,9)..|
00002110  d4 2a 20 20 20 20 20 20  20 20 e7 20 62 25 3d 34  |.*        . b%=4|
00002120  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00002130  4d 65 6e 75 22 2c 2d 31  0d 0d de 0b 20 20 20 20  |Menu",-1....    |
00002140  20 20 cd 0d 0d e8 09 20  20 20 20 cb 0d 0d f2 13  |  .....    .....|
00002150  20 20 c9 20 68 61 6e 64  6c 65 25 28 37 29 3a 0d  |  . handle%(7):.|
00002160  0d fc 25 20 20 20 20 e7  20 62 6c 6f 63 6b 25 21  |..%    . block%!|
00002170  38 3d 34 20 80 20 62 6c  6f 63 6b 25 21 31 36 3e  |8=4 . block%!16>|
00002180  2d 31 20 8c 0d 0e 06 1d  20 20 20 20 20 20 62 6c  |-1 .....      bl|
00002190  6f 63 6b 25 21 30 3d 68  61 6e 64 6c 65 25 28 33  |ock%!0=handle%(3|
000021a0  29 0d 0e 10 27 20 20 20  20 20 20 c8 99 20 22 57  |)...'      .. "W|
000021b0  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
000021c0  2c 2c 62 6c 6f 63 6b 25  0d 0e 1a 1c 20 20 20 20  |,,block%....    |
000021d0  20 20 f2 73 63 72 6f 6c  6c 28 62 6c 6f 63 6b 25  |  .scroll(block%|
000021e0  21 31 36 29 0d 0e 24 1d  20 20 20 20 20 20 f2 6f  |!16)..$.      .o|
000021f0  70 65 6e 28 68 61 6e 64  6c 65 25 28 33 29 2c 30  |pen(handle%(3),0|
00002200  29 0d 0e 2e 0f 20 20 20  20 20 20 63 68 25 3d b9  |)....      ch%=.|
00002210  0d 0e 38 09 20 20 20 20  cd 0d 0e 42 05 cb 0d 0e  |..8.    ...B....|
00002220  4c 05 e1 0d 0e 56 05 3a  0d 0e 60 25 dd f2 70 72  |L....V.:..`%..pr|
00002230  6f 63 65 73 73 5f 6b 65  79 28 77 69 6e 64 6f 77  |ocess_key(window|
00002240  25 2c 69 63 6f 6e 25 2c  6b 65 79 25 29 0d 0e 6a  |%,icon%,key%)..j|
00002250  1d c8 99 20 22 57 69 6d  70 5f 50 72 6f 63 65 73  |... "Wimp_Proces|
00002260  73 4b 65 79 22 2c 6b 65  79 25 0d 0e 74 10 c8 8e  |sKey",key%..t...|
00002270  20 77 69 6e 64 6f 77 25  20 ca 0d 0e 7e 1d 20 20  | window% ...~.  |
00002280  c9 20 68 61 6e 64 6c 65  25 28 35 29 3a 20 c8 8e  |. handle%(5): ..|
00002290  20 6b 65 79 25 20 ca 0d  0e 88 1a 20 20 20 20 c9  | key% .....    .|
000022a0  20 31 33 3a 20 f2 6f 6b  5f 63 6c 69 63 6b 28 a3  | 13: .ok_click(.|
000022b0  29 0d 0e 92 07 20 20 cb  0d 0e 9c 1d 20 20 c9 20  |)....  .....  . |
000022c0  68 61 6e 64 6c 65 25 28  36 29 3a 20 c8 8e 20 6b  |handle%(6): .. k|
000022d0  65 79 25 20 ca 0d 0e a6  42 20 20 20 20 c9 20 31  |ey% ....B    . 1|
000022e0  33 3a 20 f2 6e 65 77 5f  63 68 61 72 28 bb a4 72  |3: .new_char(..r|
000022f0  65 61 64 5f 69 6e 64 69  72 65 63 74 65 64 5f 69  |ead_indirected_i|
00002300  63 6f 6e 5f 74 65 78 74  28 68 61 6e 64 6c 65 25  |con_text(handle%|
00002310  28 36 29 2c 33 29 29 0d  0e b0 1f 20 20 20 20 c8  |(6),3))....    .|
00002320  99 20 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |. "Wimp_CreateMe|
00002330  6e 75 22 2c 2d 31 0d 0e  ba 07 20 20 cb 0d 0e c4  |nu",-1....  ....|
00002340  1e 20 20 c9 20 68 61 6e  64 6c 65 25 28 34 29 3a  |.  . handle%(4):|
00002350  20 c8 8e 20 69 63 6f 6e  25 20 ca 0d 0e ce 17 20  | .. icon% ..... |
00002360  20 20 20 c9 20 33 32 3a  20 c8 8e 20 6b 65 79 25  |   . 32: .. key%|
00002370  20 ca 0d 0e d8 33 20 20  20 20 20 20 c9 20 31 33  | ....3      . 13|
00002380  2c 26 31 38 45 2c 26 31  38 46 3a 20 f2 73 65 74  |,&18E,&18F: .set|
00002390  5f 63 61 72 65 74 28 68  61 6e 64 6c 65 25 28 34  |_caret(handle%(4|
000023a0  29 2c 33 37 29 0d 0e e2  09 20 20 20 20 cb 0d 0e  |),37)....    ...|
000023b0  ec 17 20 20 20 20 c9 20  33 37 3a 20 c8 8e 20 6b  |..    . 37: .. k|
000023c0  65 79 25 20 ca 0d 0e f6  18 20 20 20 20 20 20 c9  |ey% .....      .|
000023d0  20 31 33 3a 20 f2 74 6f  6f 6c 5f 67 6f 0d 0f 00  | 13: .tool_go...|
000023e0  30 20 20 20 20 20 20 c9  20 26 31 38 45 2c 26 31  |0      . &18E,&1|
000023f0  38 46 3a 20 f2 73 65 74  5f 63 61 72 65 74 28 68  |8F: .set_caret(h|
00002400  61 6e 64 6c 65 25 28 34  29 2c 33 32 29 0d 0f 0a  |andle%(4),32)...|
00002410  09 20 20 20 20 cb 0d 0f  14 18 20 20 20 20 c9 20  |.    .....    . |
00002420  31 31 36 3a 20 c8 8e 20  6b 65 79 25 20 ca 0d 0f  |116: .. key% ...|
00002430  1e 34 20 20 20 20 20 20  c9 20 31 33 2c 26 31 38  |.4      . 13,&18|
00002440  45 2c 26 31 38 46 3a 20  f2 73 65 74 5f 63 61 72  |E,&18F: .set_car|
00002450  65 74 28 68 61 6e 64 6c  65 25 28 34 29 2c 31 32  |et(handle%(4),12|
00002460  31 29 0d 0f 28 09 20 20  20 20 cb 0d 0f 32 18 20  |1)..(.    ...2. |
00002470  20 20 20 c9 20 31 32 31  3a 20 c8 8e 20 6b 65 79  |   . 121: .. key|
00002480  25 20 ca 0d 0f 3c 0f 20  20 20 20 20 20 c9 20 31  |% ...<.      . 1|
00002490  33 3a 0d 0f 46 2c 20 20  20 20 20 20 20 20 c8 99  |3:..F,        ..|
000024a0  20 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  | "Wimp_GetPointe|
000024b0  72 49 6e 66 6f 22 2c 2c  62 6c 6f 63 6b 25 0d 0f  |rInfo",,block%..|
000024c0  50 46 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |PF        .. "Wi|
000024d0  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 30  |mp_CreateMenu",0|
000024e0  2c 68 61 6e 64 6c 65 25  28 35 29 2c 62 6c 6f 63  |,handle%(5),bloc|
000024f0  6b 25 21 30 2d 31 37 30  2c 62 6c 6f 63 6b 25 21  |k%!0-170,block%!|
00002500  34 2b 35 30 0d 0f 5a 25  20 20 20 20 20 20 20 20  |4+50..Z%        |
00002510  f2 73 65 74 5f 63 61 72  65 74 28 68 61 6e 64 6c  |.set_caret(handl|
00002520  65 25 28 35 29 2c 31 30  29 0d 0f 64 31 20 20 20  |e%(5),10)..d1   |
00002530  20 20 20 c9 20 26 31 38  45 2c 26 31 38 46 3a 20  |   . &18E,&18F: |
00002540  f2 73 65 74 5f 63 61 72  65 74 28 68 61 6e 64 6c  |.set_caret(handl|
00002550  65 25 28 34 29 2c 31 31  36 29 0d 0f 6e 09 20 20  |e%(4),116)..n.  |
00002560  20 20 cb 0d 0f 78 18 20  20 20 20 c9 20 31 30 35  |  ...x.    . 105|
00002570  3a 20 c8 8e 20 6b 65 79  25 20 ca 0d 0f 82 0f 20  |: .. key% ..... |
00002580  20 20 20 20 20 c9 20 31  33 3a 0d 0f 8c 41 20 20  |     . 13:...A  |
00002590  20 20 20 20 20 20 63 75  72 5f 67 72 69 64 25 3d  |      cur_grid%=|
000025a0  bb a4 72 65 61 64 5f 69  6e 64 69 72 65 63 74 65  |..read_indirecte|
000025b0  64 5f 69 63 6f 6e 5f 74  65 78 74 28 68 61 6e 64  |d_icon_text(hand|
000025c0  6c 65 25 28 34 29 2c 31  30 35 29 0d 0f 96 23 20  |le%(4),105)...# |
000025d0  20 20 20 20 20 20 20 f2  63 68 61 6e 67 65 5f 67  |       .change_g|
000025e0  72 69 64 28 63 75 72 5f  67 72 69 64 25 29 0d 0f  |rid(cur_grid%)..|
000025f0  a0 1f 20 20 20 20 20 20  20 20 f2 6f 70 65 6e 28  |..        .open(|
00002600  68 61 6e 64 6c 65 25 28  33 29 2c 30 29 0d 0f aa  |handle%(3),0)...|
00002610  09 20 20 20 20 cb 0d 0f  b4 07 20 20 cb 0d 0f be  |.    .....  ....|
00002620  05 cb 0d 0f c8 05 e1 0d  0f d2 05 3a 0d 0f dc 1e  |...........:....|
00002630  dd f2 73 65 74 5f 63 61  72 65 74 28 77 69 6e 64  |..set_caret(wind|
00002640  6f 77 25 2c 69 63 6f 6e  25 29 0d 0f e6 33 c8 99  |ow%,icon%)...3..|
00002650  20 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  | "Wimp_SetCaretP|
00002660  6f 73 69 74 69 6f 6e 22  2c 77 69 6e 64 6f 77 25  |osition",window%|
00002670  2c 69 63 6f 6e 25 2c 2c  2c 2d 31 2c 30 0d 0f f0  |,icon%,,,-1,0...|
00002680  05 e1 0d 0f fa 05 3a 0d  10 04 14 dd f2 6d 65 6e  |......:......men|
00002690  75 5f 73 65 6c 65 63 74  69 6f 6e 0d 10 0e 25 c8  |u_selection...%.|
000026a0  99 20 22 57 69 6d 70 5f  47 65 74 50 6f 69 6e 74  |. "Wimp_GetPoint|
000026b0  65 72 49 6e 66 6f 22 2c  2c 62 75 66 66 65 72 25  |erInfo",,buffer%|
000026c0  0d 10 18 19 61 64 6a 75  73 74 25 3d 28 62 75 66  |....adjust%=(buf|
000026d0  66 65 72 25 21 38 3d 31  29 0d 10 22 16 c8 8e 20  |fer%!8=1).."... |
000026e0  63 75 72 72 65 6e 74 5f  6d 65 6e 75 25 20 ca 0d  |current_menu% ..|
000026f0  10 2c 0a 20 20 c9 20 30  3a 0d 10 36 15 20 20 20  |.,.  . 0:..6.   |
00002700  20 c8 8e 20 62 6c 6f 63  6b 25 21 30 20 ca 0d 10  | .. block%!0 ...|
00002710  40 1b 20 20 20 20 20 20  c9 20 31 3a 20 f2 64 65  |@.      . 1: .de|
00002720  66 61 75 6c 74 5f 73 65  74 0d 10 4a 1c 20 20 20  |fault_set..J.   |
00002730  20 20 20 c9 20 32 3a 20  f2 6f 72 69 67 69 6e 61  |   . 2: .origina|
00002740  6c 5f 73 65 74 0d 10 54  1a 20 20 20 20 20 20 c9  |l_set..T.      .|
00002750  20 33 3a 20 f2 73 68 6f  77 5f 74 6f 6f 6c 73 0d  | 3: .show_tools.|
00002760  10 5e 1b 20 20 20 20 20  20 c9 20 34 3a 20 f2 6f  |.^.      . 4: .o|
00002770  6b 5f 63 6c 69 63 6b 28  a3 29 0d 10 68 28 20 20  |k_click(.)..h(  |
00002780  20 20 20 20 c9 20 35 3a  20 e7 20 63 68 25 3d a3  |    . 5: . ch%=.|
00002790  20 f2 66 69 6e 69 73 68  20 8b 20 f2 76 65 72 69  | .finish . .veri|
000027a0  66 79 0d 10 72 09 20 20  20 20 cb 0d 10 7c 0a 20  |fy..r.    ...|. |
000027b0  20 c9 20 31 3a 0d 10 86  15 20 20 20 20 c8 8e 20  | . 1:....    .. |
000027c0  62 6c 6f 63 6b 25 21 30  20 ca 0d 10 90 1b 20 20  |block%!0 .....  |
000027d0  20 20 20 20 c9 20 31 3a  20 f2 64 65 66 61 75 6c  |    . 1: .defaul|
000027e0  74 5f 73 65 74 0d 10 9a  1c 20 20 20 20 20 20 c9  |t_set....      .|
000027f0  20 32 3a 20 f2 6f 72 69  67 69 6e 61 6c 5f 73 65  | 2: .original_se|
00002800  74 0d 10 a4 1a 20 20 20  20 20 20 c9 20 33 3a 20  |t....      . 3: |
00002810  f2 73 68 6f 77 5f 74 6f  6f 6c 73 0d 10 ae 1c 20  |.show_tools.... |
00002820  20 20 20 20 20 c9 20 34  3a 20 c8 8e 20 62 6c 6f  |     . 4: .. blo|
00002830  63 6b 25 21 34 20 ca 0d  10 b8 12 20 20 20 20 20  |ck%!4 .....     |
00002840  20 20 20 20 20 c9 20 30  3a 0d 10 c2 1c 20 20 20  |     . 0:....   |
00002850  20 20 20 20 20 20 20 20  20 66 6c 70 25 3d 2d 31  |         flp%=-1|
00002860  2d 66 6c 70 25 0d 10 cc  23 20 20 20 20 20 20 20  |-flp%...#       |
00002870  20 20 20 20 20 f2 6f 70  65 6e 28 68 61 6e 64 6c  |     .open(handl|
00002880  65 25 28 33 29 2c 30 29  0d 10 d6 12 20 20 20 20  |e%(3),0)....    |
00002890  20 20 20 20 20 20 c9 20  31 3a 0d 10 e0 1e 20 20  |      . 1:....  |
000028a0  20 20 20 20 20 20 20 20  20 20 70 61 6e 65 25 3d  |          pane%=|
000028b0  2d 31 2d 70 61 6e 65 25  0d 10 ea 32 20 20 20 20  |-1-pane%...2    |
000028c0  20 20 20 20 20 20 20 20  f2 63 68 61 6e 67 65 5f  |        .change_|
000028d0  66 6c 61 67 28 6d 65 6e  75 5f 68 61 6e 64 6c 65  |flag(menu_handle|
000028e0  25 28 32 29 2c 31 2c 26  31 29 0d 10 f4 37 20 20  |%(2),1,&1)...7  |
000028f0  20 20 20 20 20 20 20 20  20 20 f2 63 68 61 6e 67  |          .chang|
00002900  65 5f 66 6c 61 67 28 6d  65 6e 75 5f 68 61 6e 64  |e_flag(menu_hand|
00002910  6c 65 25 28 32 29 2c 30  2c 26 34 30 30 30 30 30  |le%(2),0,&400000|
00002920  29 0d 10 fe 42 20 20 20  20 20 20 20 20 20 20 20  |)...B           |
00002930  20 e7 20 70 61 6e 65 25  3d a3 20 f2 63 6c 6f 73  | . pane%=. .clos|
00002940  65 28 68 61 6e 64 6c 65  25 28 37 29 29 20 8b 20  |e(handle%(7)) . |
00002950  f2 6f 70 65 6e 28 68 61  6e 64 6c 65 25 28 33 29  |.open(handle%(3)|
00002960  2c 30 29 0d 11 08 12 20  20 20 20 20 20 20 20 20  |,0)....         |
00002970  20 c9 20 32 3a 0d 11 12  20 20 20 20 20 20 20 20  | . 2:...        |
00002980  20 20 20 20 20 61 75 74  75 70 25 3d 2d 31 2d 61  |     autup%=-1-a|
00002990  75 74 75 70 25 0d 11 1c  32 20 20 20 20 20 20 20  |utup%...2       |
000029a0  20 20 20 20 20 f2 63 68  61 6e 67 65 5f 66 6c 61  |     .change_fla|
000029b0  67 28 6d 65 6e 75 5f 68  61 6e 64 6c 65 25 28 32  |g(menu_handle%(2|
000029c0  29 2c 32 2c 26 31 29 0d  11 26 0d 20 20 20 20 20  |),2,&1)..&.     |
000029d0  20 20 20 cb 0d 11 30 1b  20 20 20 20 20 20 c9 20  |   ...0.      . |
000029e0  35 3a 20 f2 6f 6b 5f 63  6c 69 63 6b 28 a3 29 0d  |5: .ok_click(.).|
000029f0  11 3a 09 20 20 20 20 cb  0d 11 44 05 cb 0d 11 4e  |.:.    ...D....N|
00002a00  40 e7 20 61 64 6a 75 73  74 25 20 c8 99 20 22 57  |@. adjust% .. "W|
00002a10  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 22 2c  |imp_CreateMenu",|
00002a20  30 2c 6d 65 6e 75 5f 68  61 6e 64 6c 65 25 28 63  |0,menu_handle%(c|
00002a30  75 72 72 65 6e 74 5f 6d  65 6e 75 25 29 0d 11 58  |urrent_menu%)..X|
00002a40  15 e1 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00002a50  20 20 0d 11 62 05 3a 0d  11 6c 24 dd f2 63 68 61  |  ..b.:..l$..cha|
00002a60  6e 67 65 5f 66 6c 61 67  28 6d 65 6e 75 25 2c 69  |nge_flag(menu%,i|
00002a70  74 65 6d 25 2c 66 6c 61  67 25 29 0d 11 76 0e ea  |tem%,flag%)..v..|
00002a80  20 61 64 64 72 65 73 73  25 0d 11 80 20 61 64 64  | address%... add|
00002a90  72 65 73 73 25 3d 6d 65  6e 75 25 2b 32 38 2b 28  |ress%=menu%+28+(|
00002aa0  32 34 2a 69 74 65 6d 25  29 0d 11 8a 15 e7 20 66  |24*item%)..... f|
00002ab0  6c 61 67 25 3d 26 34 30  30 30 30 30 20 8c 0d 11  |lag%=&400000 ...|
00002ac0  94 23 20 20 61 64 64 72  65 73 73 25 21 38 3d 61  |.#  address%!8=a|
00002ad0  64 64 72 65 73 73 25 21  38 20 82 20 66 6c 61 67  |ddress%!8 . flag|
00002ae0  25 0d 11 9e 05 cc 0d 11  a8 23 20 20 61 64 64 72  |%........#  addr|
00002af0  65 73 73 25 21 30 3d 61  64 64 72 65 73 73 25 21  |ess%!0=address%!|
00002b00  30 20 82 20 66 6c 61 67  25 0d 11 b2 05 cd 0d 11  |0 . flag%.......|
00002b10  bc 05 e1 0d 11 c6 05 3a  0d 11 d0 11 dd f2 64 65  |.......:......de|
00002b20  66 61 75 6c 74 5f 73 65  74 0d 11 da 09 63 68 25  |fault_set....ch%|
00002b30  3d a3 0d 11 e4 15 c8 99  20 22 48 6f 75 72 67 6c  |=....... "Hourgl|
00002b40  61 73 73 5f 4f 6e 22 0d  11 ee 11 e3 20 63 25 3d  |ass_On"..... c%=|
00002b50  33 32 20 b8 20 32 35 35  0d 11 f8 32 20 20 c8 99  |32 . 255...2  ..|
00002b60  20 22 48 6f 75 72 67 6c  61 73 73 5f 50 65 72 63  | "Hourglass_Perc|
00002b70  65 6e 74 61 67 65 22 2c  a8 28 28 63 25 2d 33 33  |entage",.((c%-33|
00002b80  29 2f 32 32 33 2a 31 30  30 29 0d 12 02 1e 20 20  |)/223*100)....  |
00002b90  f2 64 65 66 61 75 6c 74  5f 63 68 61 72 61 63 74  |.default_charact|
00002ba0  65 72 28 63 25 2c 31 29  0d 12 0c 08 ed 20 63 25  |er(c%,1)..... c%|
00002bb0  0d 12 16 16 c8 99 20 22  48 6f 75 72 67 6c 61 73  |...... "Hourglas|
00002bc0  73 5f 4f 66 66 22 0d 12  20 12 f2 70 75 74 5f 63  |s_Off".. ..put_c|
00002bd0  68 61 72 28 63 65 25 29  0d 12 2a 12 f2 72 65 64  |har(ce%)..*..red|
00002be0  72 61 77 5f 73 63 72 65  65 6e 0d 12 34 05 e1 0d  |raw_screen..4...|
00002bf0  12 3e 05 3a 0d 12 48 12  dd f2 6f 72 69 67 69 6e  |.>.:..H...origin|
00002c00  61 6c 5f 73 65 74 0d 12  52 09 63 68 25 3d a3 0d  |al_set..R.ch%=..|
00002c10  12 5c 15 c8 99 20 22 48  6f 75 72 67 6c 61 73 73  |.\... "Hourglass|
00002c20  5f 4f 6e 22 0d 12 66 11  e3 20 63 25 3d 33 32 20  |_On"..f.. c%=32 |
00002c30  b8 20 32 35 35 0d 12 70  32 20 20 c8 99 20 22 48  |. 255..p2  .. "H|
00002c40  6f 75 72 67 6c 61 73 73  5f 50 65 72 63 65 6e 74  |ourglass_Percent|
00002c50  61 67 65 22 2c a8 28 28  63 25 2d 33 33 29 2f 32  |age",.((c%-33)/2|
00002c60  32 33 2a 31 30 30 29 0d  12 7a 1e 20 20 f2 64 65  |23*100)..z.  .de|
00002c70  66 61 75 6c 74 5f 63 68  61 72 61 63 74 65 72 28  |fault_character(|
00002c80  63 25 2c 32 29 0d 12 84  08 ed 20 63 25 0d 12 8e  |c%,2)..... c%...|
00002c90  16 c8 99 20 22 48 6f 75  72 67 6c 61 73 73 5f 4f  |... "Hourglass_O|
00002ca0  66 66 22 0d 12 98 12 f2  70 75 74 5f 63 68 61 72  |ff".....put_char|
00002cb0  28 63 65 25 29 0d 12 a2  12 f2 72 65 64 72 61 77  |(ce%).....redraw|
00002cc0  5f 73 63 72 65 65 6e 0d  12 ac 05 e1 0d 12 b6 05  |_screen.........|
00002cd0  3a 0d 12 c0 10 dd f2 73  68 6f 77 5f 74 6f 6f 6c  |:......show_tool|
00002ce0  73 0d 12 ca 2b f2 63 68  61 6e 67 65 5f 66 6c 61  |s...+.change_fla|
00002cf0  67 28 6d 65 6e 75 5f 68  61 6e 64 6c 65 25 28 30  |g(menu_handle%(0|
00002d00  29 2c 33 2c 26 34 30 30  30 30 30 29 0d 12 d4 2b  |),3,&400000)...+|
00002d10  f2 63 68 61 6e 67 65 5f  66 6c 61 67 28 6d 65 6e  |.change_flag(men|
00002d20  75 5f 68 61 6e 64 6c 65  25 28 31 29 2c 33 2c 26  |u_handle%(1),3,&|
00002d30  34 30 30 30 30 30 29 0d  12 de 17 62 6c 6f 63 6b  |400000)....block|
00002d40  25 21 30 3d 68 61 6e 64  6c 65 25 28 34 29 0d 12  |%!0=handle%(4)..|
00002d50  e8 21 c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |.!.. "Wimp_Close|
00002d60  57 69 6e 64 6f 77 22 2c  2c 62 6c 6f 63 6b 25 0d  |Window",,block%.|
00002d70  12 f2 17 f2 6f 70 65 6e  28 68 61 6e 64 6c 65 25  |....open(handle%|
00002d80  28 34 29 2c 30 29 0d 12  fc 05 e1 0d 13 06 05 3a  |(4),0).........:|
00002d90  0d 13 10 28 dd a4 69 63  6f 6e 62 61 72 28 68 61  |...(..iconbar(ha|
00002da0  6e 64 6c 65 25 2c 78 25  2c 79 25 2c 77 25 2c 68  |ndle%,x%,y%,w%,h|
00002db0  25 2c 69 63 6f 6e 24 29  0d 13 1a 14 62 6c 6f 63  |%,icon$)....bloc|
00002dc0  6b 25 21 30 3d 68 61 6e  64 6c 65 25 0d 13 24 0f  |k%!0=handle%..$.|
00002dd0  62 6c 6f 63 6b 25 21 34  3d 78 25 0d 13 2e 0f 62  |block%!4=x%....b|
00002de0  6c 6f 63 6b 25 21 38 3d  79 25 0d 13 38 13 62 6c  |lock%!8=y%..8.bl|
00002df0  6f 63 6b 25 21 31 32 3d  78 25 2b 77 25 0d 13 42  |ock%!12=x%+w%..B|
00002e00  13 62 6c 6f 63 6b 25 21  31 36 3d 79 25 2b 68 25  |.block%!16=y%+h%|
00002e10  0d 13 4c 13 62 6c 6f 63  6b 25 21 32 30 3d 26 33  |..L.block%!20=&3|
00002e20  31 30 32 0d 13 56 18 de  20 62 6c 6f 63 6b 25 21  |102..V.. block%!|
00002e30  32 34 20 a9 69 63 6f 6e  24 2b 31 0d 13 60 16 24  |24 .icon$+1..`.$|
00002e40  28 62 6c 6f 63 6b 25 21  32 34 29 3d 69 63 6f 6e  |(block%!24)=icon|
00002e50  24 0d 13 6a 0f 62 6c 6f  63 6b 25 21 32 38 3d 31  |$..j.block%!28=1|
00002e60  0d 13 74 16 62 6c 6f 63  6b 25 21 33 32 3d a9 69  |..t.block%!32=.i|
00002e70  63 6f 6e 24 2b 31 0d 13  7e 2f c8 99 20 22 57 69  |con$+1..~/.. "Wi|
00002e80  6d 70 5f 43 72 65 61 74  65 49 63 6f 6e 22 2c 2c  |mp_CreateIcon",,|
00002e90  62 6c 6f 63 6b 25 20 b8  20 69 63 6f 6e 5f 68 61  |block% . icon_ha|
00002ea0  6e 64 6c 65 25 0d 13 88  11 3d 69 63 6f 6e 5f 68  |ndle%....=icon_h|
00002eb0  61 6e 64 6c 65 25 0d 13  92 05 3a 0d 13 9c 13 dd  |andle%....:.....|
00002ec0  f2 72 65 64 72 61 77 5f  73 63 72 65 65 6e 0d 13  |.redraw_screen..|
00002ed0  a6 2e c8 99 20 22 57 69  6d 70 5f 46 6f 72 63 65  |.... "Wimp_Force|
00002ee0  52 65 64 72 61 77 22 2c  2d 31 2c 2d 31 45 39 2c  |Redraw",-1,-1E9,|
00002ef0  2d 31 45 39 2c 31 45 39  2c 31 45 39 0d 13 b0 05  |-1E9,1E9,1E9....|
00002f00  e1 0d 13 ba 05 3a 0d 13  c4 15 dd f2 72 65 64 72  |.....:......redr|
00002f10  61 77 28 68 61 6e 64 6c  65 25 29 0d 13 ce 14 62  |aw(handle%)....b|
00002f20  6c 6f 63 6b 25 21 30 3d  68 61 6e 64 6c 65 25 0d  |lock%!0=handle%.|
00002f30  13 d8 2b c8 99 20 22 57  69 6d 70 5f 52 65 64 72  |..+.. "Wimp_Redr|
00002f40  61 77 57 69 6e 64 6f 77  22 2c 30 2c 62 6c 6f 63  |awWindow",0,bloc|
00002f50  6b 25 20 b8 20 6d 6f 72  65 25 0d 13 e2 0c c8 95  |k% . more%......|
00002f60  20 6d 6f 72 65 25 0d 13  ec 2d 20 20 c8 99 20 22  | more%...-  .. "|
00002f70  57 69 6d 70 5f 47 65 74  52 65 63 74 61 6e 67 6c  |Wimp_GetRectangl|
00002f80  65 22 2c 30 2c 62 6c 6f  63 6b 25 20 b8 20 6d 6f  |e",0,block% . mo|
00002f90  72 65 25 0d 13 f6 05 ce  0d 14 00 05 e1 0d 14 0a  |re%.............|
00002fa0  05 3a 0d 14 14 14 dd f2  63 6c 6f 73 65 28 68 61  |.:......close(ha|
00002fb0  6e 64 6c 65 25 29 0d 14  1e 14 62 6c 6f 63 6b 25  |ndle%)....block%|
00002fc0  21 30 3d 68 61 6e 64 6c  65 25 0d 14 28 22 c8 99  |!0=handle%..("..|
00002fd0  20 22 57 69 6d 70 5f 43  6c 6f 73 65 57 69 6e 64  | "Wimp_CloseWind|
00002fe0  6f 77 22 2c 30 2c 62 6c  6f 63 6b 25 0d 14 32 2f  |ow",0,block%..2/|
00002ff0  e7 20 68 61 6e 64 6c 65  25 3d 68 61 6e 64 6c 65  |. handle%=handle|
00003000  25 28 32 29 20 84 20 68  61 6e 64 6c 65 25 3d 68  |%(2) . handle%=h|
00003010  61 6e 64 6c 65 25 28 33  29 20 8c 0d 14 3c 0f 20  |andle%(3) ...<. |
00003020  20 e7 20 64 6f 25 3d 31  20 8c 0d 14 46 34 20 20  | . do%=1 ...F4  |
00003030  20 20 f2 75 70 64 61 74  65 5f 69 63 6f 6e 5f 74  |  .update_icon_t|
00003040  65 78 74 28 34 2c 31 30  30 2c 22 44 65 66 61 75  |ext(4,100,"Defau|
00003050  6c 74 20 43 68 61 72 61  63 74 65 72 22 29 0d 14  |lt Character")..|
00003060  50 07 20 20 cc 0d 14 5a  30 20 20 20 20 f2 75 70  |P.  ...Z0    .up|
00003070  64 61 74 65 5f 69 63 6f  6e 5f 74 65 78 74 28 34  |date_icon_text(4|
00003080  2c 31 30 30 2c 22 4f 72  69 67 69 6e 61 6c 20 43  |,100,"Original C|
00003090  68 61 72 22 29 0d 14 64  07 20 20 cd 0d 14 6e 30  |har")..d.  ...n0|
000030a0  20 20 f2 75 70 64 61 74  65 5f 69 63 6f 6e 5f 74  |  .update_icon_t|
000030b0  65 78 74 28 34 2c 35 30  2c 22 41 70 70 6c 79 20  |ext(4,50,"Apply |
000030c0  74 6f 20 43 75 72 72 65  6e 74 22 29 0d 14 78 1c  |to Current")..x.|
000030d0  20 20 e7 20 68 61 6e 64  6c 65 25 3d 68 61 6e 64  |  . handle%=hand|
000030e0  6c 65 25 28 32 29 20 8c  0d 14 82 1a 20 20 20 20  |le%(2) .....    |
000030f0  f2 63 6c 6f 73 65 28 68  61 6e 64 6c 65 25 28 33  |.close(handle%(3|
00003100  29 29 0d 14 8c 07 20 20  cd 0d 14 96 1c 20 20 e7  |))....  .....  .|
00003110  20 68 61 6e 64 6c 65 25  3d 68 61 6e 64 6c 65 25  | handle%=handle%|
00003120  28 33 29 20 8c 0d 14 a0  1a 20 20 20 20 f2 63 6c  |(3) .....    .cl|
00003130  6f 73 65 28 68 61 6e 64  6c 65 25 28 37 29 29 0d  |ose(handle%(7)).|
00003140  14 aa 0d 20 20 20 20 63  65 25 3d 30 0d 14 b4 11  |...    ce%=0....|
00003150  20 20 20 20 e7 20 65 63  25 3d 31 20 8c 0d 14 be  |    . ec%=1 ....|
00003160  21 20 20 20 20 20 20 e7  20 61 75 74 75 70 25 20  |!      . autup% |
00003170  f2 72 65 64 72 61 77 5f  73 63 72 65 65 6e 0d 14  |.redraw_screen..|
00003180  c8 0f 20 20 20 20 20 20  65 63 25 3d 30 0d 14 d2  |..      ec%=0...|
00003190  09 20 20 20 20 cd 0d 14  dc 07 20 20 cd 0d 14 e6  |.    .....  ....|
000031a0  05 cd 0d 14 f0 05 3a 0d  14 fa 1a e7 20 68 61 6e  |......:..... han|
000031b0  64 6c 65 25 3d 68 61 6e  64 6c 65 25 28 34 29 20  |dle%=handle%(4) |
000031c0  8c 0d 15 04 2d 20 20 f2  63 68 61 6e 67 65 5f 66  |....-  .change_f|
000031d0  6c 61 67 28 6d 65 6e 75  5f 68 61 6e 64 6c 65 25  |lag(menu_handle%|
000031e0  28 30 29 2c 33 2c 26 34  30 30 30 30 30 29 0d 15  |(0),3,&400000)..|
000031f0  0e 2d 20 20 f2 63 68 61  6e 67 65 5f 66 6c 61 67  |.-  .change_flag|
00003200  28 6d 65 6e 75 5f 68 61  6e 64 6c 65 25 28 31 29  |(menu_handle%(1)|
00003210  2c 33 2c 26 34 30 30 30  30 30 29 0d 15 18 05 cd  |,3,&400000).....|
00003220  0d 15 22 05 e1 0d 15 2c  05 3a 0d 15 36 16 dd f2  |.."....,.:..6...|
00003230  6f 70 65 6e 28 68 61 6e  64 6c 65 25 2c 61 25 29  |open(handle%,a%)|
00003240  0d 15 40 22 e7 20 68 61  6e 64 6c 65 25 3d 68 61  |..@". handle%=ha|
00003250  6e 64 6c 65 25 28 33 29  20 80 20 63 65 25 3d 30  |ndle%(3) . ce%=0|
00003260  20 e1 0d 15 4a 14 62 6c  6f 63 6b 25 21 30 3d 68  | ...J.block%!0=h|
00003270  61 6e 64 6c 65 25 0d 15  54 2c e7 20 ac 20 61 25  |andle%..T,. . a%|
00003280  20 c8 99 20 22 57 69 6d  70 5f 47 65 74 57 69 6e  | .. "Wimp_GetWin|
00003290  64 6f 77 53 74 61 74 65  22 2c 30 2c 62 6c 6f 63  |dowState",0,bloc|
000032a0  6b 25 0d 15 5e 21 c8 99  20 22 57 69 6d 70 5f 4f  |k%..^!.. "Wimp_O|
000032b0  70 65 6e 57 69 6e 64 6f  77 22 2c 30 2c 62 6c 6f  |penWindow",0,blo|
000032c0  63 6b 25 0d 15 68 10 c8  8e 20 68 61 6e 64 6c 65  |ck%..h... handle|
000032d0  25 20 ca 0d 15 72 28 20  20 c9 20 68 61 6e 64 6c  |% ...r(  . handl|
000032e0  65 25 28 33 29 3a 20 e7  20 70 61 6e 65 25 20 f2  |e%(3): . pane% .|
000032f0  72 65 64 72 61 77 5f 70  61 6e 65 0d 15 7c 05 cb  |redraw_pane..|..|
00003300  0d 15 86 05 e1 0d 15 90  05 3a 0d 15 9a 11 dd f2  |.........:......|
00003310  72 65 64 72 61 77 5f 70  61 6e 65 0d 15 a4 26 c8  |redraw_pane...&.|
00003320  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
00003330  77 4f 75 74 6c 69 6e 65  22 2c 2c 62 6c 6f 63 6b  |wOutline",,block|
00003340  25 0d 15 ae 0d c8 8e 20  66 6c 70 25 20 ca 0d 15  |%...... flp% ...|
00003350  b8 0a 20 20 c9 20 a3 3a  0d 15 c2 14 20 20 20 20  |..  . .:....    |
00003360  62 6c 6f 63 6b 25 21 34  2d 3d 36 32 0d 15 cc 15  |block%!4-=62....|
00003370  20 20 20 20 62 6c 6f 63  6b 25 21 38 2b 3d 31 30  |    block%!8+=10|
00003380  38 0d 15 d6 1d 20 20 20  20 62 6c 6f 63 6b 25 21  |8....    block%!|
00003390  31 32 3d 62 6c 6f 63 6b  25 21 34 2b 36 32 0d 15  |12=block%!4+62..|
000033a0  e0 1e 20 20 20 20 62 6c  6f 63 6b 25 21 31 36 3d  |..    block%!16=|
000033b0  62 6c 6f 63 6b 25 21 38  2b 32 31 32 0d 15 ea 0a  |block%!8+212....|
000033c0  20 20 c9 20 b9 3a 0d 15  f4 15 20 20 20 20 62 6c  |  . .:....    bl|
000033d0  6f 63 6b 25 21 34 2b 3d  32 34 32 0d 15 fe 15 20  |ock%!4+=242.... |
000033e0  20 20 20 62 6c 6f 63 6b  25 21 38 2b 3d 31 30 38  |   block%!8+=108|
000033f0  0d 16 08 1d 20 20 20 20  62 6c 6f 63 6b 25 21 31  |....    block%!1|
00003400  32 3d 62 6c 6f 63 6b 25  21 34 2b 36 32 0d 16 12  |2=block%!4+62...|
00003410  1e 20 20 20 20 62 6c 6f  63 6b 25 21 31 36 3d 62  |.    block%!16=b|
00003420  6c 6f 63 6b 25 21 38 2b  32 31 32 0d 16 1c 05 cb  |lock%!8+212.....|
00003430  0d 16 26 17 62 6c 6f 63  6b 25 21 30 3d 68 61 6e  |..&.block%!0=han|
00003440  64 6c 65 25 28 37 29 0d  16 30 21 c8 99 20 22 57  |dle%(7)..0!.. "W|
00003450  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
00003460  30 2c 62 6c 6f 63 6b 25  0d 16 3a 05 e1 0d 16 44  |0,block%..:....D|
00003470  05 3a 0d 16 4e 07 dd a4  78 0d 16 58 17 3d 62 6c  |.:..N...x..X.=bl|
00003480  6f 63 6b 25 21 34 2d 62  6c 6f 63 6b 25 21 32 30  |ock%!4-block%!20|
00003490  0d 16 62 05 3a 0d 16 6c  07 dd a4 79 0d 16 76 18  |..b.:..l...y..v.|
000034a0  3d 62 6c 6f 63 6b 25 21  31 36 2d 62 6c 6f 63 6b  |=block%!16-block|
000034b0  25 21 32 34 0d 16 80 05  3a 0d 16 8a 2b dd f2 75  |%!24....:...+..u|
000034c0  70 64 61 74 65 5f 69 63  6f 6e 5f 74 65 78 74 28  |pdate_icon_text(|
000034d0  77 69 6e 64 6f 77 25 2c  69 63 6f 6e 25 2c 74 65  |window%,icon%,te|
000034e0  78 74 24 29 0d 16 94 1d  62 6c 6f 63 6b 25 21 30  |xt$)....block%!0|
000034f0  3d 68 61 6e 64 6c 65 25  28 77 69 6e 64 6f 77 25  |=handle%(window%|
00003500  29 0d 16 9e 12 62 6c 6f  63 6b 25 21 34 3d 69 63  |)....block%!4=ic|
00003510  6f 6e 25 0d 16 a8 22 c8  99 20 22 57 69 6d 70 5f  |on%...".. "Wimp_|
00003520  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |GetIconState",,b|
00003530  6c 6f 63 6b 25 0d 16 b2  14 24 62 6c 6f 63 6b 25  |lock%....$block%|
00003540  21 32 38 3d 74 65 78 74  24 0d 16 bc 0e 62 6c 6f  |!28=text$....blo|
00003550  63 6b 25 21 38 3d 30 0d  16 c6 0f 62 6c 6f 63 6b  |ck%!8=0....block|
00003560  25 21 31 32 3d 30 0d 16  d0 22 c8 99 20 22 57 69  |%!12=0...".. "Wi|
00003570  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00003580  2c 2c 62 6c 6f 63 6b 25  0d 16 da 05 e1 0d 16 e4  |,,block%........|
00003590  05 3a 0d 16 ee 0d dd f2  72 65 63 65 69 76 65 0d  |.:......receive.|
000035a0  16 f8 13 c8 8e 20 62 6c  6f 63 6b 25 21 20 31 36  |..... block%! 16|
000035b0  20 ca 0d 17 02 17 20 20  c9 20 30 20 20 20 20 20  | .....  . 0     |
000035c0  3a 20 f2 66 69 6e 69 73  68 0d 17 0c 18 20 20 c9  |: .finish....  .|
000035d0  20 32 20 20 20 20 20 3a  20 f2 73 61 76 65 61 63  | 2     : .saveac|
000035e0  6b 0d 17 16 2e 20 20 c9  20 33 20 20 20 20 20 3a  |k....  . 3     :|
000035f0  20 f2 6c 6f 61 64 5f 66  6f 6e 74 28 a4 73 74 72  | .load_font(.str|
00003600  69 6e 67 28 62 6c 6f 63  6b 25 2b 34 34 29 29 0d  |ing(block%+44)).|
00003610  17 20 2a 20 20 c9 20 26  35 30 32 20 20 3a 20 f2  |. *  . &502  : .|
00003620  68 65 6c 70 28 62 6c 6f  63 6b 25 21 33 32 2c 62  |help(block%!32,b|
00003630  6c 6f 63 6b 25 21 33 36  29 0d 17 2a 46 20 20 c9  |lock%!36)..*F  .|
00003640  20 26 34 30 30 43 32 3a  20 f2 74 61 73 6b 69 6e  | &400C2: .taskin|
00003650  69 74 69 61 6c 69 73 65  28 c0 24 28 62 6c 6f 63  |itialise(.$(bloc|
00003660  6b 25 2b 32 38 29 2c a9  a4 6d 65 73 73 28 22 54  |k%+28),..mess("T|
00003670  53 4b 22 29 29 2c 62 6c  6f 63 6b 25 21 34 29 0d  |SK")),block%!4).|
00003680  17 34 05 cb 0d 17 3e 05  e1 0d 17 48 05 3a 0d 17  |.4....>....H.:..|
00003690  52 19 dd f2 68 65 6c 70  28 68 61 6e 64 6c 65 25  |R...help(handle%|
000036a0  2c 69 63 6f 6e 25 29 0d  17 5c 0b ea 20 68 65 6c  |,icon%)..\.. hel|
000036b0  70 24 0d 17 66 10 c8 8e  20 68 61 6e 64 6c 65 25  |p$..f... handle%|
000036c0  20 ca 0d 17 70 1f 20 20  c9 20 2d 32 3a 20 68 65  | ...p.  . -2: he|
000036d0  6c 70 24 3d a4 6d 65 73  73 28 22 48 69 63 6e 22  |lp$=.mess("Hicn"|
000036e0  29 0d 17 7a 27 20 20 c9  20 68 61 6e 64 6c 65 25  |)..z'  . handle%|
000036f0  28 32 29 3a 20 68 65 6c  70 24 3d a4 6d 65 73 73  |(2): help$=.mess|
00003700  28 22 48 63 73 77 22 29  0d 17 84 27 20 20 c9 20  |("Hcsw")...'  . |
00003710  68 61 6e 64 6c 65 25 28  33 29 3a 20 68 65 6c 70  |handle%(3): help|
00003720  24 3d a4 6d 65 73 73 28  22 48 63 65 77 22 29 0d  |$=.mess("Hcew").|
00003730  17 8e 27 20 20 c9 20 68  61 6e 64 6c 65 25 28 34  |..'  . handle%(4|
00003740  29 3a 20 68 65 6c 70 24  3d a4 6d 65 73 73 28 22  |): help$=.mess("|
00003750  48 74 6c 77 22 29 0d 17  98 12 20 20 20 20 c8 8e  |Htlw")....    ..|
00003760  20 69 63 6f 6e 25 20 ca  0d 17 a2 44 20 20 20 20  | icon% ....D    |
00003770  20 20 c9 20 39 2c 31 30  2c 31 31 2c 31 32 2c 31  |  . 9,10,11,12,1|
00003780  33 2c 31 34 2c 31 35 2c  31 36 2c 31 37 2c 31 38  |3,14,15,16,17,18|
00003790  2c 31 39 2c 32 30 3a 20  68 65 6c 70 24 2b 3d a4  |,19,20: help$+=.|
000037a0  6d 65 73 73 28 22 48 74  6c 73 22 29 0d 17 ac 27  |mess("Htls")...'|
000037b0  20 20 20 20 20 20 c9 20  33 32 2c 33 37 3a 20 68  |      . 32,37: h|
000037c0  65 6c 70 24 2b 3d a4 6d  65 73 73 28 22 48 74 63  |elp$+=.mess("Htc|
000037d0  72 22 29 0d 17 b6 24 20  20 20 20 20 20 c9 20 34  |r")...$      . 4|
000037e0  33 3a 20 68 65 6c 70 24  2b 3d a4 6d 65 73 73 28  |3: help$+=.mess(|
000037f0  22 48 74 6f 6b 22 29 0d  17 c0 24 20 20 20 20 20  |"Htok")...$     |
00003800  20 c9 20 34 34 3a 20 68  65 6c 70 24 2b 3d a4 6d  | . 44: help$+=.m|
00003810  65 73 73 28 22 48 61 61  6e 22 29 0d 17 ca 24 20  |ess("Haan")...$ |
00003820  20 20 20 20 20 c9 20 35  30 3a 20 68 65 6c 70 24  |     . 50: help$|
00003830  2b 3d a4 6d 65 73 73 28  22 48 74 63 63 22 29 0d  |+=.mess("Htcc").|
00003840  17 d4 39 20 20 20 20 20  20 c9 20 37 35 2c 37 36  |..9      . 75,76|
00003850  2c 37 37 2c 37 38 2c 37  39 2c 38 30 2c 38 31 2c  |,77,78,79,80,81,|
00003860  38 32 3a 20 68 65 6c 70  24 2b 3d a4 6d 65 73 73  |82: help$+=.mess|
00003870  28 22 48 6c 6e 73 22 29  0d 17 de 2e 20 20 20 20  |("Hlns")....    |
00003880  20 20 c9 20 38 34 2c 38  38 3a 20 68 65 6c 70 24  |  . 84,88: help$|
00003890  2b 3d a4 6d 65 73 73 28  22 48 63 70 61 22 29 20  |+=.mess("Hcpa") |
000038a0  20 20 20 20 20 20 0d 17  e8 24 20 20 20 20 20 20  |      ...$      |
000038b0  c9 20 38 37 3a 20 68 65  6c 70 24 2b 3d a4 6d 65  |. 87: help$+=.me|
000038c0  73 73 28 22 48 63 70 65  22 29 0d 17 f2 24 20 20  |ss("Hcpe")...$  |
000038d0  20 20 20 20 c9 20 39 34  3a 20 68 65 6c 70 24 2b  |    . 94: help$+|
000038e0  3d a4 6d 65 73 73 28 22  48 73 68 70 22 29 0d 17  |=.mess("Hshp")..|
000038f0  fc 25 20 20 20 20 20 20  c9 20 31 30 30 3a 20 68  |.%      . 100: h|
00003900  65 6c 70 24 2b 3d a4 6d  65 73 73 28 22 48 63 64  |elp$+=.mess("Hcd|
00003910  6f 22 29 0d 18 06 25 20  20 20 20 20 20 c9 20 31  |o")...%      . 1|
00003920  30 35 3a 20 68 65 6c 70  24 2b 3d a4 6d 65 73 73  |05: help$+=.mess|
00003930  28 22 48 67 70 63 22 29  0d 18 10 25 20 20 20 20  |("Hgpc")...%    |
00003940  20 20 c9 20 31 31 31 3a  20 68 65 6c 70 24 2b 3d  |  . 111: help$+=|
00003950  a4 6d 65 73 73 28 22 48  67 6f 6b 22 29 0d 18 1a  |.mess("Hgok")...|
00003960  29 20 20 20 20 20 20 c9  20 31 31 36 2c 31 32 31  |)      . 116,121|
00003970  3a 20 68 65 6c 70 24 2b  3d a4 6d 65 73 73 28 22  |: help$+=.mess("|
00003980  48 73 63 72 22 29 0d 18  24 09 20 20 20 20 cb 0d  |Hscr")..$.    ..|
00003990  18 2e 27 20 20 c9 20 68  61 6e 64 6c 65 25 28 35  |..'  . handle%(5|
000039a0  29 3a 20 68 65 6c 70 24  3d a4 6d 65 73 73 28 22  |): help$=.mess("|
000039b0  48 73 64 77 22 29 0d 18  38 27 20 20 c9 20 68 61  |Hsdw")..8'  . ha|
000039c0  6e 64 6c 65 25 28 36 29  3a 20 68 65 6c 70 24 3d  |ndle%(6): help$=|
000039d0  a4 6d 65 73 73 28 22 48  61 73 77 22 29 0d 18 42  |.mess("Hasw")..B|
000039e0  27 20 20 c9 20 68 61 6e  64 6c 65 25 28 37 29 3a  |'  . handle%(7):|
000039f0  20 68 65 6c 70 24 3d a4  6d 65 73 73 28 22 48 73  | help$=.mess("Hs|
00003a00  63 77 22 29 0d 18 4c 05  cb 0d 18 56 11 e7 20 68  |cw")..L....V.. h|
00003a10  65 6c 70 24 3c 3e 22 22  20 8c 0d 18 60 1e 20 20  |elp$<>"" ...`.  |
00003a20  21 68 65 6c 70 25 3d 28  32 35 2b a9 68 65 6c 70  |!help%=(25+.help|
00003a30  24 29 20 80 20 ac 20 33  0d 18 6a 17 20 20 68 65  |$) . . 3..j.  he|
00003a40  6c 70 25 21 31 32 3d 62  6c 6f 63 6b 25 21 38 0d  |lp%!12=block%!8.|
00003a50  18 74 13 20 20 68 65 6c  70 25 21 31 36 3d 26 35  |.t.  help%!16=&5|
00003a60  30 33 0d 18 7e 1a 20 20  24 28 68 65 6c 70 25 2b  |03..~.  $(help%+|
00003a70  32 30 29 3d 68 65 6c 70  24 2b bd 30 0d 18 88 2d  |20)=help$+.0...-|
00003a80  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |  .. "Wimp_SendM|
00003a90  65 73 73 61 67 65 22 2c  31 37 2c 68 65 6c 70 25  |essage",17,help%|
00003aa0  2c 62 6c 6f 63 6b 25 21  34 0d 18 92 05 cd 0d 18  |,block%!4.......|
00003ab0  9c 0b e1 20 20 20 20 20  20 0d 18 a6 05 3a 0d 18  |...      ....:..|
00003ac0  b0 21 dd f2 74 61 73 6b  69 6e 69 74 69 61 6c 69  |.!..taskinitiali|
00003ad0  73 65 28 74 61 73 6b 24  2c 74 61 73 6b 25 29 0d  |se(task$,task%).|
00003ae0  18 ba 2b e7 20 74 61 73  6b 24 3d a4 6d 65 73 73  |..+. task$=.mess|
00003af0  28 22 54 53 4b 22 29 20  80 20 74 61 73 6b 25 3c  |("TSK") . task%<|
00003b00  3e 74 61 73 6b 69 64 25  20 8c 0d 18 c4 11 20 20  |>taskid% .....  |
00003b10  62 6c 6f 63 6b 25 21 31  36 3d 30 0d 18 ce 2e 20  |block%!16=0.... |
00003b20  20 c8 99 20 22 57 69 6d  70 5f 53 65 6e 64 4d 65  | .. "Wimp_SendMe|
00003b30  73 73 61 67 65 22 2c 31  37 2c 62 6c 6f 63 6b 25  |ssage",17,block%|
00003b40  2c 62 6c 6f 63 6b 25 21  34 0d 18 d8 2c 20 20 f2  |,block%!4...,  .|
00003b50  65 72 72 6f 72 28 31 2c  22 54 61 73 6b 20 61 6c  |error(1,"Task al|
00003b60  72 65 61 64 79 20 69 6e  69 74 69 61 6c 69 73 65  |ready initialise|
00003b70  64 22 2c 31 29 0d 18 e2  05 cd 0d 18 ec 05 e1 0d  |d",1)...........|
00003b80  18 f6 05 3a 0d 19 00 10  dd a4 73 74 72 69 6e 67  |...:......string|
00003b90  28 61 25 29 0d 19 0a 08  ea 20 62 24 0d 19 14 09  |(a%)..... b$....|
00003ba0  62 24 3d 22 22 0d 19 1e  0d c8 95 20 3f 61 25 3c  |b$=""...... ?a%<|
00003bb0  3e 30 0d 19 28 0e 20 20  62 24 2b 3d bd 3f 61 25  |>0..(.  b$+=.?a%|
00003bc0  0d 19 32 0b 20 20 61 25  2b 3d 31 0d 19 3c 05 ce  |..2.  a%+=1..<..|
00003bd0  0d 19 46 07 3d 62 24 0d  19 50 05 3a 0d 19 5a 1b  |..F.=b$..P.:..Z.|
00003be0  dd f2 6f 6b 5f 63 6c 69  63 6b 28 69 63 6f 6e 5f  |..ok_click(icon_|
00003bf0  63 6c 69 63 6b 25 29 0d  19 64 13 e7 20 69 63 6f  |click%)..d.. ico|
00003c00  6e 5f 63 6c 69 63 6b 25  20 8c 0d 19 6e 25 20 20  |n_click% ...n%  |
00003c10  f2 72 65 76 65 72 73 65  5f 69 63 6f 6e 28 68 61  |.reverse_icon(ha|
00003c20  6e 64 6c 65 25 28 35 29  2c 34 2c 35 2c 36 29 0d  |ndle%(5),4,5,6).|
00003c30  19 78 25 20 20 f2 72 65  76 65 72 73 65 5f 69 63  |.x%  .reverse_ic|
00003c40  6f 6e 28 68 61 6e 64 6c  65 25 28 35 29 2c 34 2c  |on(handle%(5),4,|
00003c50  35 2c 36 29 0d 19 82 05  cd 0d 19 8c 33 6e 61 6d  |5,6)........3nam|
00003c60  65 24 3d a4 72 65 61 64  5f 69 6e 64 69 72 65 63  |e$=.read_indirec|
00003c70  74 65 64 5f 69 63 6f 6e  5f 74 65 78 74 28 68 61  |ted_icon_text(ha|
00003c80  6e 64 6c 65 25 28 35 29  2c 31 30 29 0d 19 96 2a  |ndle%(5),10)...*|
00003c90  e7 20 6e 61 6d 65 24 3d  22 22 20 f2 65 72 72 6f  |. name$="" .erro|
00003ca0  72 28 31 2c a4 6d 65 73  73 28 22 4f 4b 32 22 29  |r(1,.mess("OK2")|
00003cb0  2c 31 29 3a 20 e1 0d 19  a0 2f e7 20 a7 6e 61 6d  |,1): ..../. .nam|
00003cc0  65 24 2c 22 2e 22 29 3d  30 20 f2 65 72 72 6f 72  |e$,".")=0 .error|
00003cd0  28 31 2c a4 6d 65 73 73  28 22 4f 4b 33 22 29 2c  |(1,.mess("OK3"),|
00003ce0  31 29 3a 20 e1 0d 19 aa  10 f2 73 61 76 65 28 6e  |1): ......save(n|
00003cf0  61 6d 65 24 29 0d 19 b4  05 e1 0d 19 be 05 3a 0d  |ame$).........:.|
00003d00  19 c8 1f dd f2 73 74 61  72 74 5f 64 72 61 67 28  |.....start_drag(|
00003d10  77 69 6e 64 6f 77 25 2c  69 63 6f 6e 25 29 0d 19  |window%,icon%)..|
00003d20  d2 1d 62 6c 6f 63 6b 25  21 30 3d 68 61 6e 64 6c  |..block%!0=handl|
00003d30  65 25 28 77 69 6e 64 6f  77 25 29 0d 19 dc 24 c8  |e%(window%)...$.|
00003d40  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
00003d50  77 53 74 61 74 65 22 2c  2c 62 6c 6f 63 6b 25 0d  |wState",,block%.|
00003d60  19 e6 1a 77 78 25 3d 62  6c 6f 63 6b 25 21 34 2d  |...wx%=block%!4-|
00003d70  62 6c 6f 63 6b 25 21 32  30 0d 19 f0 1b 77 79 25  |block%!20....wy%|
00003d80  3d 62 6c 6f 63 6b 25 21  31 36 2d 62 6c 6f 63 6b  |=block%!16-block|
00003d90  25 21 32 34 0d 19 fa 12  62 6c 6f 63 6b 25 21 34  |%!24....block%!4|
00003da0  3d 69 63 6f 6e 25 0d 1a  04 22 c8 99 20 22 57 69  |=icon%...".. "Wi|
00003db0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00003dc0  2c 2c 62 6c 6f 63 6b 25  0d 1a 0e 1d 62 6c 6f 63  |,,block%....bloc|
00003dd0  6b 25 21 30 3d 68 61 6e  64 6c 65 25 28 77 69 6e  |k%!0=handle%(win|
00003de0  64 6f 77 25 29 0d 1a 18  0e 62 6c 6f 63 6b 25 21  |dow%)....block%!|
00003df0  34 3d 35 0d 1a 22 11 62  6c 6f 63 6b 25 21 38 2b  |4=5..".block%!8+|
00003e00  3d 77 78 25 0d 1a 2c 12  62 6c 6f 63 6b 25 21 31  |=wx%..,.block%!1|
00003e10  32 2b 3d 77 79 25 0d 1a  36 12 62 6c 6f 63 6b 25  |2+=wy%..6.block%|
00003e20  21 31 36 2b 3d 77 78 25  0d 1a 40 14 62 6c 6f 63  |!16+=wx%..@.bloc|
00003e30  6b 25 21 32 30 2b 3d 77  79 25 2d 32 0d 1a 4a 0f  |k%!20+=wy%-2..J.|
00003e40  62 6c 6f 63 6b 25 21 32  34 3d 30 0d 1a 54 0f 62  |block%!24=0..T.b|
00003e50  6c 6f 63 6b 25 21 32 38  3d 30 0d 1a 5e 36 62 6c  |lock%!28=0..^6bl|
00003e60  6f 63 6b 25 21 33 32 3d  28 a4 72 65 61 64 5f 6d  |ock%!32=(.read_m|
00003e70  6f 64 65 28 2d 31 2c 31  31 29 2b 31 29 2a 32 5e  |ode(-1,11)+1)*2^|
00003e80  a4 72 65 61 64 5f 6d 6f  64 65 28 2d 31 2c 34 29  |.read_mode(-1,4)|
00003e90  0d 1a 68 36 62 6c 6f 63  6b 25 21 33 36 3d 28 a4  |..h6block%!36=(.|
00003ea0  72 65 61 64 5f 6d 6f 64  65 28 2d 31 2c 31 32 29  |read_mode(-1,12)|
00003eb0  2b 31 29 2a 32 5e a4 72  65 61 64 5f 6d 6f 64 65  |+1)*2^.read_mode|
00003ec0  28 2d 31 2c 35 29 0d 1a  72 1d c8 99 20 22 57 69  |(-1,5)..r... "Wi|
00003ed0  6d 70 5f 44 72 61 67 42  6f 78 22 2c 2c 62 6c 6f  |mp_DragBox",,blo|
00003ee0  63 6b 25 0d 1a 7c 05 e1  0d 1a 86 05 3a 0d 1a 90  |ck%..|......:...|
00003ef0  1b dd a4 72 65 61 64 5f  6d 6f 64 65 28 6d 6f 64  |...read_mode(mod|
00003f00  65 25 2c 76 61 72 25 29  0d 1a 9a 32 c8 99 20 22  |e%,var%)...2.. "|
00003f10  4f 53 5f 52 65 61 64 4d  6f 64 65 56 61 72 69 61  |OS_ReadModeVaria|
00003f20  62 6c 65 22 2c 6d 6f 64  65 25 2c 76 61 72 25 20  |ble",mode%,var% |
00003f30  b8 20 2c 2c 76 61 6c 75  65 25 0d 1a a4 0b 3d 76  |. ,,value%....=v|
00003f40  61 6c 75 65 25 0d 1a ae  05 3a 0d 1a b8 0e dd f2  |alue%....:......|
00003f50  64 72 61 67 5f 65 6e 64  0d 1a c2 24 c8 99 20 22  |drag_end...$.. "|
00003f60  57 69 6d 70 5f 47 65 74  50 6f 69 6e 74 65 72 49  |Wimp_GetPointerI|
00003f70  6e 66 6f 22 2c 2c 62 6c  6f 63 6b 25 0d 1a cc 10  |nfo",,block%....|
00003f80  6d 78 25 3d 62 6c 6f 63  6b 25 21 30 0d 1a d6 10  |mx%=block%!0....|
00003f90  6d 79 25 3d 62 6c 6f 63  6b 25 21 34 0d 1a e0 15  |my%=block%!4....|
00003fa0  77 69 6e 64 6f 77 25 3d  62 6c 6f 63 6b 25 21 31  |window%=block%!1|
00003fb0  32 0d 1a ea 11 e7 20 77  69 6e 64 6f 77 25 3c 31  |2..... window%<1|
00003fc0  20 e1 0d 1a f4 3e 6e 61  6d 65 24 3d a4 66 69 6c  | ....>name$=.fil|
00003fd0  65 6e 61 6d 65 28 a4 72  65 61 64 5f 69 6e 64 69  |ename(.read_indi|
00003fe0  72 65 63 74 65 64 5f 69  63 6f 6e 5f 74 65 78 74  |rected_icon_text|
00003ff0  28 68 61 6e 64 6c 65 25  28 35 29 2c 31 30 29 29  |(handle%(5),10))|
00004000  0d 1a fe 22 62 6c 6f 63  6b 25 21 30 3d 34 34 2b  |..."block%!0=44+|
00004010  28 28 a9 6e 61 6d 65 24  20 81 20 34 29 2b 31 29  |((.name$ . 4)+1)|
00004020  2a 34 0d 1b 08 0f 62 6c  6f 63 6b 25 21 31 36 3d  |*4....block%!16=|
00004030  31 0d 1b 12 15 62 6c 6f  63 6b 25 21 32 30 3d 77  |1....block%!20=w|
00004040  69 6e 64 6f 77 25 0d 1b  1c 10 62 6c 6f 63 6b 25  |indow%....block%|
00004050  21 32 34 3d 2d 31 0d 1b  26 11 62 6c 6f 63 6b 25  |!24=-1..&.block%|
00004060  21 32 38 3d 6d 78 25 0d  1b 30 11 62 6c 6f 63 6b  |!28=mx%..0.block|
00004070  25 21 33 32 3d 6d 79 25  0d 1b 3a 11 62 6c 6f 63  |%!32=my%..:.bloc|
00004080  6b 25 21 33 36 3d 39 31  30 0d 1b 44 12 62 6c 6f  |k%!36=910..D.blo|
00004090  63 6b 25 21 34 30 3d 26  46 46 37 0d 1b 4e 19 24  |ck%!40=&FF7..N.$|
000040a0  28 62 6c 6f 63 6b 25 2b  34 34 29 3d 6e 61 6d 65  |(block%+44)=name|
000040b0  24 2b bd 30 0d 1b 58 2b  c8 99 20 22 57 69 6d 70  |$+.0..X+.. "Wimp|
000040c0  5f 53 65 6e 64 4d 65 73  73 61 67 65 22 2c 31 37  |_SendMessage",17|
000040d0  2c 62 6c 6f 63 6b 25 2c  77 69 6e 64 6f 77 25 0d  |,block%,window%.|
000040e0  1b 62 05 e1 0d 1b 6c 05  3a 0d 1b 76 0d dd f2 73  |.b....l.:..v...s|
000040f0  61 76 65 61 63 6b 0d 1b  80 1c 6e 61 6d 65 24 3d  |aveack....name$=|
00004100  a4 73 74 72 69 6e 67 28  62 6c 6f 63 6b 25 2b 34  |.string(block%+4|
00004110  34 29 0d 1b 8a 35 e7 20  a4 66 69 6c 65 6e 61 6d  |4)...5. .filenam|
00004120  65 28 6e 61 6d 65 24 29  3d 22 22 20 f2 65 72 72  |e(name$)="" .err|
00004130  6f 72 28 31 2c a4 6d 65  73 73 28 22 4f 4b 32 22  |or(1,.mess("OK2"|
00004140  29 2c 31 29 3a 20 e1 0d  1b 94 10 f2 73 61 76 65  |),1): ......save|
00004150  28 6e 61 6d 65 24 29 0d  1b 9e 05 e1 0d 1b a8 05  |(name$).........|
00004160  3a 0d 1b b2 13 dd f2 6c  6f 61 64 5f 66 6f 6e 74  |:......load_font|
00004170  28 6c 24 29 0d 1b bc 31  e7 20 62 6c 6f 63 6b 25  |(l$)...1. block%|
00004180  21 34 30 3c 3e 26 46 46  37 20 f2 65 72 72 6f 72  |!40<>&FF7 .error|
00004190  28 31 2c a4 6d 65 73 73  28 22 4f 4b 34 22 29 2c  |(1,.mess("OK4"),|
000041a0  31 29 3a 20 e1 0d 1b c6  10 ff 22 50 52 49 4e 54  |1): ......"PRINT|
000041b0  20 22 2b 6c 24 0d 1b d0  12 f2 72 65 64 72 61 77  | "+l$.....redraw|
000041c0  5f 73 63 72 65 65 6e 0d  1b da 1e f2 75 70 64 61  |_screen.....upda|
000041d0  74 65 5f 69 63 6f 6e 5f  74 65 78 74 28 35 2c 31  |te_icon_text(5,1|
000041e0  30 2c 6c 24 29 0d 1b e4  05 e1 0d 1b ee 05 3a 0d  |0,l$).........:.|
000041f0  1b f8 12 dd a4 66 69 6c  65 6e 61 6d 65 28 66 24  |.....filename(f$|
00004200  29 0d 1c 02 11 c8 95 20  a7 66 24 2c 22 2e 22 29  |)...... .f$,".")|
00004210  3e 30 0d 1c 0c 18 20 20  66 24 3d c1 66 24 2c a7  |>0....  f$=.f$,.|
00004220  66 24 2c 22 2e 22 29 2b  31 29 0d 1c 16 05 ce 0d  |f$,".")+1)......|
00004230  1c 20 07 3d 66 24 0d 1c  2a 05 3a 0d 1c 34 16 dd  |. .=f$..*.:..4..|
00004240  f2 65 64 69 74 5f 63 68  61 72 28 63 68 61 72 25  |.edit_char(char%|
00004250  29 0d 1c 3e 17 62 6c 6f  63 6b 25 21 30 3d 68 61  |)..>.block%!0=ha|
00004260  6e 64 6c 65 25 28 33 29  0d 1c 48 22 c8 99 20 22  |ndle%(3)..H".. "|
00004270  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00004280  22 2c 30 2c 62 6c 6f 63  6b 25 0d 1c 52 2c f2 72  |",0,block%..R,.r|
00004290  65 74 69 74 6c 65 28 68  61 6e 64 6c 65 25 28 33  |etitle(handle%(3|
000042a0  29 2c c3 63 68 61 72 25  2b 22 20 3a 20 22 2b bd  |),.char%+" : "+.|
000042b0  63 68 61 72 25 29 0d 1c  5c 0d e7 20 64 6f 25 3d  |char%)..\.. do%=|
000042c0  31 20 8c 0d 1c 66 37 20  20 f2 75 70 64 61 74 65  |1 ...f7  .update|
000042d0  5f 69 63 6f 6e 5f 74 65  78 74 28 34 2c 31 30 30  |_icon_text(4,100|
000042e0  2c 22 44 65 66 61 75 6c  74 20 27 20 22 2b bd 63  |,"Default ' "+.c|
000042f0  68 61 72 25 2b 22 20 27  22 29 0d 1c 70 05 cc 0d  |har%+" '")..p...|
00004300  1c 7a 38 20 20 f2 75 70  64 61 74 65 5f 69 63 6f  |.z8  .update_ico|
00004310  6e 5f 74 65 78 74 28 34  2c 31 30 30 2c 22 4f 72  |n_text(4,100,"Or|
00004320  69 67 69 6e 61 6c 20 27  20 22 2b bd 63 68 61 72  |iginal ' "+.char|
00004330  25 2b 22 20 27 22 29 0d  1c 84 05 cd 0d 1c 8e 36  |%+" '")........6|
00004340  f2 75 70 64 61 74 65 5f  69 63 6f 6e 5f 74 65 78  |.update_icon_tex|
00004350  74 28 34 2c 35 30 2c 22  41 70 70 6c 79 20 74 6f  |t(4,50,"Apply to|
00004360  20 20 27 20 22 2b bd 63  68 61 72 25 2b 22 20 27  |  ' "+.char%+" '|
00004370  22 29 0d 1c 98 14 f2 70  75 74 5f 63 68 61 72 28  |").....put_char(|
00004380  63 68 61 72 25 29 0d 1c  a2 17 f2 6f 70 65 6e 28  |char%).....open(|
00004390  68 61 6e 64 6c 65 25 28  33 29 2c 30 29 0d 1c ac  |handle%(3),0)...|
000043a0  24 e7 20 65 63 25 3c 3e  30 20 80 20 61 75 74 75  |$. ec%<>0 . autu|
000043b0  70 25 20 f2 72 65 64 72  61 77 5f 73 63 72 65 65  |p% .redraw_scree|
000043c0  6e 0d 1c b6 09 65 63 25  3d 30 0d 1c c0 0f e1 20  |n....ec%=0..... |
000043d0  20 20 20 20 20 20 20 20  20 0d 1c ca 05 3a 0d 1c  |         ....:..|
000043e0  d4 15 dd f2 6e 65 77 5f  63 68 61 72 28 63 68 61  |....new_char(cha|
000043f0  72 25 29 0d 1c de 28 e7  20 63 68 61 72 25 3c 33  |r%)...(. char%<3|
00004400  32 20 84 20 63 68 61 72  25 3e 32 35 35 20 84 20  |2 . char%>255 . |
00004410  63 68 61 72 25 3d 31 32  37 20 e1 0d 1c e8 0d 63  |char%=127 .....c|
00004420  65 25 3d 63 68 61 72 25  0d 1c f2 15 f2 65 64 69  |e%=char%.....edi|
00004430  74 5f 63 68 61 72 28 63  68 61 72 25 29 0d 1c fc  |t_char(char%)...|
00004440  05 e1 0d 1d 06 05 3a 0d  1d 10 1d dd f2 72 65 74  |......:......ret|
00004450  69 74 6c 65 28 68 61 6e  64 6c 65 25 2c 74 69 74  |itle(handle%,tit|
00004460  6c 65 24 29 0d 1d 1a 14  62 6c 6f 63 6b 25 21 30  |le$)....block%!0|
00004470  3d 68 61 6e 64 6c 65 25  0d 1d 24 23 c8 99 20 22  |=handle%..$#.. "|
00004480  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 49 6e  |Wimp_GetWindowIn|
00004490  66 6f 22 2c 2c 62 6c 6f  63 6b 25 0d 1d 2e 15 24  |fo",,block%....$|
000044a0  62 6c 6f 63 6b 25 21 37  36 3d 74 69 74 6c 65 24  |block%!76=title$|
000044b0  0d 1d 38 15 62 6c 6f 63  6b 25 21 38 34 3d a9 74  |..8.block%!84=.t|
000044c0  69 74 6c 65 24 0d 1d 42  05 e1 0d 1d 4c 05 3a 0d  |itle$..B....L.:.|
000044d0  1d 56 15 dd f2 70 75 74  5f 63 68 61 72 28 63 68  |.V...put_char(ch|
000044e0  61 72 25 29 0d 1d 60 16  f2 67 65 74 5f 62 69 74  |ar%)..`..get_bit|
000044f0  6d 61 70 28 63 68 61 72  25 29 0d 1d 6a 17 62 6c  |map(char%)..j.bl|
00004500  6f 63 6b 25 21 30 3d 68  61 6e 64 6c 65 25 28 33  |ock%!0=handle%(3|
00004510  29 0d 1d 74 0e e3 20 79  25 3d 31 20 b8 20 38 0d  |)..t.. y%=1 . 8.|
00004520  1d 7e 15 20 20 e3 20 78  25 3d 37 20 b8 20 30 20  |.~.  . x%=7 . 0 |
00004530  88 20 2d 31 0d 1d 88 20  20 20 20 20 62 6c 6f 63  |. -1...     bloc|
00004540  6b 25 21 34 3d 28 79 25  2d 31 29 2a 38 2b 28 37  |k%!4=(y%-1)*8+(7|
00004550  2d 78 25 29 0d 1d 92 1c  20 20 20 20 e7 20 62 6d  |-x%)....    . bm|
00004560  6c 25 28 79 25 29 2d 32  5e 78 25 3e 2d 31 20 8c  |l%(y%)-2^x%>-1 .|
00004570  0d 1d 9c 18 20 20 20 20  20 20 62 6d 6c 25 28 79  |....      bml%(y|
00004580  25 29 2d 3d 32 5e 78 25  0d 1d a6 1c 20 20 20 20  |%)-=2^x%....    |
00004590  20 20 62 6c 6f 63 6b 25  21 38 3d 26 37 30 30 30  |  block%!8=&7000|
000045a0  30 30 30 30 0d 1d b0 1d  20 20 20 20 20 20 62 6c  |0000....      bl|
000045b0  6f 63 6b 25 21 31 32 3d  26 46 30 30 30 30 30 30  |ock%!12=&F000000|
000045c0  30 0d 1d ba 09 20 20 20  20 cc 0d 1d c4 1c 20 20  |0....    .....  |
000045d0  20 20 20 20 62 6c 6f 63  6b 25 21 38 3d 26 31 30  |    block%!8=&10|
000045e0  30 30 30 30 30 30 0d 1d  ce 1d 20 20 20 20 20 20  |000000....      |
000045f0  62 6c 6f 63 6b 25 21 31  32 3d 26 46 30 30 30 30  |block%!12=&F0000|
00004600  30 30 30 0d 1d d8 09 20  20 20 20 cd 0d 1d e2 26  |000....    ....&|
00004610  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |    .. "Wimp_Set|
00004620  49 63 6f 6e 53 74 61 74  65 22 2c 2c 62 6c 6f 63  |IconState",,bloc|
00004630  6b 25 0d 1d ec 0a 20 20  ed 20 78 25 0d 1d f6 08  |k%....  . x%....|
00004640  ed 20 79 25 0d 1e 00 05  e1 0d 1e 0a 05 3a 0d 1e  |. y%.........:..|
00004650  14 30 dd f2 72 65 76 65  72 73 65 5f 69 63 6f 6e  |.0..reverse_icon|
00004660  28 68 61 6e 64 6c 65 25  2c 69 63 6f 6e 31 25 2c  |(handle%,icon1%,|
00004670  69 63 6f 6e 32 25 2c 69  63 6f 6e 33 25 29 0d 1e  |icon2%,icon3%)..|
00004680  1e 14 62 6c 6f 63 6b 25  21 30 3d 68 61 6e 64 6c  |..block%!0=handl|
00004690  65 25 0d 1e 28 13 62 6c  6f 63 6b 25 21 34 3d 69  |e%..(.block%!4=i|
000046a0  63 6f 6e 31 25 0d 1e 32  12 62 6c 6f 63 6b 25 21  |con1%..2.block%!|
000046b0  38 3d 31 3c 3c 33 30 0d  1e 3c 0f 62 6c 6f 63 6b  |8=1<<30..<.block|
000046c0  25 21 31 32 3d 30 0d 1e  46 22 c8 99 20 22 57 69  |%!12=0..F".. "Wi|
000046d0  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
000046e0  2c 2c 62 6c 6f 63 6b 25  0d 1e 50 13 62 6c 6f 63  |,,block%..P.bloc|
000046f0  6b 25 21 34 3d 69 63 6f  6e 32 25 0d 1e 5a 22 c8  |k%!4=icon2%..Z".|
00004700  99 20 22 57 69 6d 70 5f  53 65 74 49 63 6f 6e 53  |. "Wimp_SetIconS|
00004710  74 61 74 65 22 2c 2c 62  6c 6f 63 6b 25 0d 1e 64  |tate",,block%..d|
00004720  13 62 6c 6f 63 6b 25 21  34 3d 69 63 6f 6e 33 25  |.block%!4=icon3%|
00004730  0d 1e 6e 13 62 6c 6f 63  6b 25 21 38 3d 31 35 3c  |..n.block%!8=15<|
00004740  3c 32 38 0d 1e 78 22 c8  99 20 22 57 69 6d 70 5f  |<28..x".. "Wimp_|
00004750  53 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |SetIconState",,b|
00004760  6c 6f 63 6b 25 0d 1e 82  05 f5 0d 1e 8c 1c 20 20  |lock%.........  |
00004770  c8 99 20 22 4f 53 5f 4d  6f 75 73 65 22 20 b8 20  |.. "OS_Mouse" . |
00004780  2c 2c 62 75 74 25 0d 1e  96 0c fd 20 62 75 74 25  |,,but%..... but%|
00004790  3d 30 0d 1e a0 05 e1 0d  1e aa 05 3a 0d 1e b4 1c  |=0.........:....|
000047a0  dd f2 63 68 61 6e 67 65  5f 67 72 69 64 28 67 72  |..change_grid(gr|
000047b0  69 64 5f 63 6f 6c 25 29  0d 1e be 17 62 6c 6f 63  |id_col%)....bloc|
000047c0  6b 25 21 30 3d 68 61 6e  64 6c 65 25 28 33 29 0d  |k%!0=handle%(3).|
000047d0  1e c8 21 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |..!.. "Wimp_Clos|
000047e0  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 25  |eWindow",,block%|
000047f0  0d 1e d2 2c e7 20 67 72  69 64 5f 63 6f 6c 25 3c  |...,. grid_col%<|
00004800  30 20 84 20 67 72 69 64  5f 63 6f 6c 25 3e 31 35  |0 . grid_col%>15|
00004810  20 67 72 69 64 5f 63 6f  6c 25 3d 31 0d 1e dc 17  | grid_col%=1....|
00004820  62 6c 6f 63 6b 25 21 30  3d 68 61 6e 64 6c 65 25  |block%!0=handle%|
00004830  28 33 29 0d 1e e6 12 e3  20 69 63 6f 6e 25 3d 30  |(3)..... icon%=0|
00004840  20 b8 20 36 33 0d 1e f0  14 20 20 62 6c 6f 63 6b  | . 63....  block|
00004850  25 21 34 3d 69 63 6f 6e  25 0d 1e fa 1c 20 20 62  |%!4=icon%....  b|
00004860  6c 6f 63 6b 25 21 38 3d  67 72 69 64 5f 63 6f 6c  |lock%!8=grid_col|
00004870  25 3c 3c 32 34 0d 1f 04  18 20 20 62 6c 6f 63 6b  |%<<24....  block|
00004880  25 21 31 32 3d 26 46 30  30 30 30 30 30 0d 1f 0e  |%!12=&F000000...|
00004890  24 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 49  |$  .. "Wimp_SetI|
000048a0  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6f 63 6b  |conState",,block|
000048b0  25 0d 1f 18 0b ed 20 69  63 6f 6e 25 0d 1f 22 05  |%..... icon%..".|
000048c0  e1 0d 1f 2c 05 3a 0d 1f  36 14 dd f2 67 65 74 5f  |...,.:..6...get_|
000048d0  62 69 74 6d 61 70 28 63  25 29 0d 1f 40 10 62 75  |bitmap(c%)..@.bu|
000048e0  66 66 65 72 25 3f 30 3d  63 25 0d 1f 4a 1b c8 99  |ffer%?0=c%..J...|
000048f0  20 22 4f 53 5f 57 6f 72  64 22 2c 31 30 2c 62 75  | "OS_Word",10,bu|
00004900  66 66 65 72 25 0d 1f 54  10 e3 20 67 62 6d 25 3d  |ffer%..T.. gbm%=|
00004910  31 20 b8 20 38 0d 1f 5e  1d 20 20 62 6d 6c 25 28  |1 . 8..^.  bml%(|
00004920  67 62 6d 25 29 3d 62 75  66 66 65 72 25 3f 67 62  |gbm%)=buffer%?gb|
00004930  6d 25 0d 1f 68 0a ed 20  67 62 6d 25 0d 1f 72 05  |m%..h.. gbm%..r.|
00004940  e1 0d 1f 7c 05 3a 0d 1f  86 15 dd f2 73 65 74 5f  |...|.:......set_|
00004950  62 6c 6f 62 28 69 63 6f  6e 25 29 0d 1f 90 24 c8  |blob(icon%)...$.|
00004960  99 20 22 57 69 6d 70 5f  47 65 74 50 6f 69 6e 74  |. "Wimp_GetPoint|
00004970  65 72 49 6e 66 6f 22 2c  2c 62 6c 6f 63 6b 25 0d  |erInfo",,block%.|
00004980  1f 9a 13 6d 6f 75 73 65  25 3d 62 6c 6f 63 6b 25  |...mouse%=block%|
00004990  21 38 0d 1f a4 16 e7 20  6d 6f 75 73 65 25 3d 30  |!8..... mouse%=0|
000049a0  20 8c 20 72 63 25 3d b9  0d 1f ae 3d e7 20 6d 6f  | . rc%=....=. mo|
000049b0  75 73 65 25 3d 31 20 84  20 6d 6f 75 73 65 25 3d  |use%=1 . mouse%=|
000049c0  32 20 84 20 28 6d 6f 75  73 65 25 3d 34 20 80 20  |2 . (mouse%=4 . |
000049d0  28 69 63 6f 6e 25 3c 3e  6f 69 25 20 84 20 72 63  |(icon%<>oi% . rc|
000049e0  25 29 29 20 8c 0d 1f b8  0b 20 20 63 68 25 3d b9  |%)) .....  ch%=.|
000049f0  0d 1f c2 0b 20 20 72 63  25 3d a3 0d 1f cc 19 20  |....  rc%=..... |
00004a00  20 62 6c 6f 63 6b 25 21  30 3d 68 61 6e 64 6c 65  | block%!0=handle|
00004a10  25 28 33 29 0d 1f d6 14  20 20 62 6c 6f 63 6b 25  |%(3)....  block%|
00004a20  21 34 3d 69 63 6f 6e 25  0d 1f e0 12 20 20 e7 20  |!4=icon%....  . |
00004a30  6d 6f 75 73 65 25 3d 31  20 8c 0d 1f ea 1a 20 20  |mouse%=1 .....  |
00004a40  20 20 62 6c 6f 63 6b 25  21 38 3d 26 31 30 30 30  |  block%!8=&1000|
00004a50  30 30 30 30 0d 1f f4 1b  20 20 20 20 62 6c 6f 63  |0000....    bloc|
00004a60  6b 25 21 31 32 3d 26 46  30 30 30 30 30 30 30 0d  |k%!12=&F0000000.|
00004a70  1f fe 07 20 20 cd 0d 20  08 12 20 20 e7 20 6d 6f  |...  .. ..  . mo|
00004a80  75 73 65 25 3d 32 20 8c  0d 20 12 1a 20 20 20 20  |use%=2 .. ..    |
00004a90  62 6c 6f 63 6b 25 21 38  3d 26 37 30 30 30 30 30  |block%!8=&700000|
00004aa0  30 30 0d 20 1c 1b 20 20  20 20 62 6c 6f 63 6b 25  |00. ..    block%|
00004ab0  21 31 32 3d 26 46 30 30  30 30 30 30 30 0d 20 26  |!12=&F0000000. &|
00004ac0  07 20 20 cd 0d 20 30 12  20 20 e7 20 6d 6f 75 73  |.  .. 0.  . mous|
00004ad0  65 25 3d 34 20 8c 0d 20  3a 1a 20 20 20 20 62 6c  |e%=4 .. :.    bl|
00004ae0  6f 63 6b 25 21 38 3d 26  36 30 30 30 30 30 30 30  |ock%!8=&60000000|
00004af0  0d 20 44 13 20 20 20 20  62 6c 6f 63 6b 25 21 31  |. D.    block%!1|
00004b00  32 3d 30 0d 20 4e 07 20  20 cd 0d 20 58 24 20 20  |2=0. N.  .. X$  |
00004b10  c8 99 20 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |.. "Wimp_SetIcon|
00004b20  53 74 61 74 65 22 2c 2c  62 6c 6f 63 6b 25 0d 20  |State",,block%. |
00004b30  62 17 20 20 62 78 25 3d  38 2d 28 69 63 6f 6e 25  |b.  bx%=8-(icon%|
00004b40  20 83 20 38 29 0d 20 6c  17 20 20 62 79 25 3d 28  | . 8). l.  by%=(|
00004b50  69 63 6f 6e 25 20 81 20  38 29 2b 31 0d 20 76 16  |icon% . 8)+1. v.|
00004b60  20 20 f2 67 65 74 5f 62  69 74 6d 61 70 28 63 65  |  .get_bitmap(ce|
00004b70  25 29 0d 20 80 38 20 20  e7 20 6d 6f 75 73 65 25  |%). .8  . mouse%|
00004b80  3d 31 20 62 6d 6c 25 28  62 79 25 29 3d 62 6d 6c  |=1 bml%(by%)=bml|
00004b90  25 28 62 79 25 29 20 80  20 28 32 35 35 2d 28 32  |%(by%) . (255-(2|
00004ba0  5e 28 62 78 25 2d 31 29  29 29 0d 20 8a 30 20 20  |^(bx%-1))). .0  |
00004bb0  e7 20 6d 6f 75 73 65 25  3d 32 20 62 6d 6c 25 28  |. mouse%=2 bml%(|
00004bc0  62 79 25 29 3d 62 6d 6c  25 28 62 79 25 29 20 84  |by%)=bml%(by%) .|
00004bd0  20 32 5e 28 62 78 25 2d  31 29 0d 20 94 30 20 20  | 2^(bx%-1). .0  |
00004be0  e7 20 6d 6f 75 73 65 25  3d 34 20 62 6d 6c 25 28  |. mouse%=4 bml%(|
00004bf0  62 79 25 29 3d 62 6d 6c  25 28 62 79 25 29 20 82  |by%)=bml%(by%) .|
00004c00  20 32 5e 28 62 78 25 2d  31 29 0d 20 9e 4e 20 20  | 2^(bx%-1). .N  |
00004c10  ef 20 32 33 2c 63 65 25  2c 62 6d 6c 25 28 31 29  |. 23,ce%,bml%(1)|
00004c20  2c 62 6d 6c 25 28 32 29  2c 62 6d 6c 25 28 33 29  |,bml%(2),bml%(3)|
00004c30  2c 62 6d 6c 25 28 34 29  2c 62 6d 6c 25 28 35 29  |,bml%(4),bml%(5)|
00004c40  2c 62 6d 6c 25 28 36 29  2c 62 6d 6c 25 28 37 29  |,bml%(6),bml%(7)|
00004c50  2c 62 6d 6c 25 28 38 29  0d 20 a8 17 20 20 f2 75  |,bml%(8). ..  .u|
00004c60  70 64 61 74 65 5f 63 68  61 72 28 63 65 25 29 0d  |pdate_char(ce%).|
00004c70  20 b2 0b 20 20 65 63 25  3d 31 0d 20 bc 0f 20 20  | ..  ec%=1. ..  |
00004c80  6f 69 25 3d 69 63 6f 6e  25 0d 20 c6 05 cd 0d 20  |oi%=icon%. .... |
00004c90  d0 05 e1 0d 20 da 05 3a  0d 20 e4 18 dd f2 75 70  |.... ..:. ....up|
00004ca0  64 61 74 65 5f 63 68 61  72 28 63 68 61 72 25 29  |date_char(char%)|
00004cb0  0d 20 ee 24 63 68 61 72  73 25 3d 28 63 68 61 72  |. .$chars%=(char|
00004cc0  25 2d 33 32 29 2d 28 28  70 61 67 65 25 2d 31 29  |%-32)-((page%-1)|
00004cd0  2a 39 31 29 0d 20 f8 1a  63 68 61 72 73 25 2b 3d  |*91). ..chars%+=|
00004ce0  63 68 61 72 73 25 20 81  20 31 33 2b 31 35 0d 21  |chars% . 13+15.!|
00004cf0  02 17 62 6c 6f 63 6b 25  21 30 3d 68 61 6e 64 6c  |..block%!0=handl|
00004d00  65 25 28 32 29 0d 21 0c  13 62 6c 6f 63 6b 25 21  |e%(2).!..block%!|
00004d10  34 3d 63 68 61 72 73 25  0d 21 16 0e 62 6c 6f 63  |4=chars%.!..bloc|
00004d20  6b 25 21 38 3d 30 0d 21  20 0f 62 6c 6f 63 6b 25  |k%!8=0.! .block%|
00004d30  21 31 32 3d 30 0d 21 2a  22 c8 99 20 22 57 69 6d  |!12=0.!*".. "Wim|
00004d40  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00004d50  2c 62 6c 6f 63 6b 25 0d  21 34 05 e1 0d 21 3e 05  |,block%.!4...!>.|
00004d60  3a 0d 21 48 0e dd a4 67  65 74 5f 62 6c 6f 62 0d  |:.!H...get_blob.|
00004d70  21 52 25 c8 99 20 22 57  69 6d 70 5f 47 65 74 50  |!R%.. "Wimp_GetP|
00004d80  6f 69 6e 74 65 72 49 6e  66 6f 22 2c 2c 62 75 66  |ointerInfo",,buf|
00004d90  66 65 72 25 0d 21 5c 14  69 25 3d 62 75 66 66 65  |fer%.!\.i%=buffe|
00004da0  72 25 21 31 36 2b 31 37  0d 21 66 19 e7 20 28 69  |r%!16+17.!f.. (i|
00004db0  25 2d 31 37 29 20 83 20  31 34 3d 30 20 3d 32 35  |%-17) . 14=0 =25|
00004dc0  36 0d 21 70 10 e7 20 69  25 3c 33 32 20 3d 32 35  |6.!p.. i%<32 =25|
00004dd0  36 0d 21 7a 0f e3 20 63  64 25 3d 31 20 b8 20 38  |6.!z.. cd%=1 . 8|
00004de0  0d 21 84 1a 20 20 e7 20  69 25 3e 33 32 2b 63 64  |.!..  . i%>32+cd|
00004df0  25 2a 31 33 20 69 25 2d  3d 31 0d 21 8e 09 ed 20  |%*13 i%-=1.!... |
00004e00  63 64 25 0d 21 98 14 69  25 2b 3d 28 70 61 67 65  |cd%.!..i%+=(page|
00004e10  25 2d 31 29 2a 39 31 0d  21 a2 07 3d 69 25 0d 21  |%-1)*91.!..=i%.!|
00004e20  ac 05 3a 0d 21 b6 12 dd  f2 74 6f 6f 6c 73 28 69  |..:.!....tools(i|
00004e30  25 2c 62 25 29 0d 21 c0  0b c8 8e 20 69 25 20 ca  |%,b%).!.... i% .|
00004e40  0d 21 ca 1b 20 20 c9 20  63 74 73 25 3a 20 e7 20  |.!..  . cts%: . |
00004e50  62 25 3d 31 20 63 74 73  25 3d 30 0d 21 d4 33 20  |b%=1 cts%=0.!.3 |
00004e60  20 c9 20 39 2c 31 30 2c  31 31 2c 31 32 2c 31 33  | . 9,10,11,12,13|
00004e70  2c 31 34 2c 31 35 2c 31  36 2c 31 37 2c 31 38 2c  |,14,15,16,17,18,|
00004e80  31 39 2c 32 30 3a 20 63  74 73 25 3d 69 25 0d 21  |19,20: cts%=i%.!|
00004e90  de 3e 20 20 c9 20 37 35  2c 37 36 2c 37 37 2c 37  |.>  . 75,76,77,7|
00004ea0  38 2c 37 39 2c 38 30 2c  38 31 2c 38 32 3a 20 6c  |8,79,80,81,82: l|
00004eb0  69 6e 65 73 25 28 69 25  2d 37 34 29 3d 33 2d 6c  |ines%(i%-74)=3-l|
00004ec0  69 6e 65 73 25 28 69 25  2d 37 34 29 0d 21 e8 17  |ines%(i%-74).!..|
00004ed0  20 20 c9 20 34 34 3a 20  61 61 6e 25 3d 33 2d 61  |  . 44: aan%=3-a|
00004ee0  61 6e 25 0d 21 f2 14 20  20 c9 20 31 30 30 3a 20  |an%.!..  . 100: |
00004ef0  c8 8e 20 62 25 20 ca 0d  21 fc 18 20 20 20 20 c9  |.. b% ..!..    .|
00004f00  20 31 3a 20 f2 63 68 61  6e 67 65 5f 64 65 66 0d  | 1: .change_def.|
00004f10  22 06 30 20 20 20 20 c9  20 34 3a 20 f2 72 65 76  |".0    . 4: .rev|
00004f20  65 72 73 65 5f 69 63 6f  6e 28 68 61 6e 64 6c 65  |erse_icon(handle|
00004f30  25 28 34 29 2c 39 38 2c  39 39 2c 31 30 30 29 0d  |%(4),98,99,100).|
00004f40  22 10 1d 20 20 20 20 20  20 62 6c 6f 63 6b 25 21  |"..      block%!|
00004f50  30 3d 68 61 6e 64 6c 65  25 28 33 29 0d 22 1a 27  |0=handle%(3).".'|
00004f60  20 20 20 20 20 20 c8 99  20 22 57 69 6d 70 5f 43  |      .. "Wimp_C|
00004f70  6c 6f 73 65 57 69 6e 64  6f 77 22 2c 2c 62 6c 6f  |loseWindow",,blo|
00004f80  63 6b 25 0d 22 24 25 20  20 20 20 20 20 f2 64 65  |ck%."$%      .de|
00004f90  66 61 75 6c 74 5f 63 68  61 72 61 63 74 65 72 28  |fault_character(|
00004fa0  63 65 25 2c 64 6f 25 29  0d 22 2e 18 20 20 20 20  |ce%,do%)."..    |
00004fb0  20 20 f2 70 75 74 5f 63  68 61 72 28 63 65 25 29  |  .put_char(ce%)|
00004fc0  0d 22 38 1d 20 20 20 20  20 20 f2 6f 70 65 6e 28  |."8.      .open(|
00004fd0  68 61 6e 64 6c 65 25 28  33 29 2c 30 29 0d 22 42  |handle%(3),0)."B|
00004fe0  2d 20 20 20 20 20 20 f2  72 65 76 65 72 73 65 5f  |-      .reverse_|
00004ff0  69 63 6f 6e 28 68 61 6e  64 6c 65 25 28 34 29 2c  |icon(handle%(4),|
00005000  39 38 2c 39 39 2c 31 30  30 29 0d 22 4c 07 20 20  |98,99,100)."L.  |
00005010  cb 0d 22 56 1b 20 20 c9  20 38 34 2c 38 38 3a 20  |.."V.  . 84,88: |
00005020  e7 20 62 25 3d 34 20 f2  70 61 67 65 0d 22 60 14  |. b%=4 .page."`.|
00005030  20 20 c9 20 39 34 3a 20  e7 20 62 25 3d 34 20 8c  |  . 94: . b%=4 .|
00005040  0d 22 6a 2c 20 20 20 20  20 20 f2 72 65 76 65 72  |."j,      .rever|
00005050  73 65 5f 69 63 6f 6e 28  68 61 6e 64 6c 65 25 28  |se_icon(handle%(|
00005060  34 29 2c 39 32 2c 39 33  2c 39 34 29 0d 22 74 13  |4),92,93,94)."t.|
00005070  20 20 20 20 20 20 f2 6e  65 77 5f 70 61 67 65 0d  |      .new_page.|
00005080  22 7e 1d 20 20 20 20 20  20 f2 6f 70 65 6e 28 68  |"~.      .open(h|
00005090  61 6e 64 6c 65 25 28 32  29 2c 30 29 0d 22 88 2c  |andle%(2),0).".,|
000050a0  20 20 20 20 20 20 f2 72  65 76 65 72 73 65 5f 69  |      .reverse_i|
000050b0  63 6f 6e 28 68 61 6e 64  6c 65 25 28 34 29 2c 39  |con(handle%(4),9|
000050c0  32 2c 39 33 2c 39 34 29  0d 22 92 09 20 20 20 20  |2,93,94)."..    |
000050d0  cd 0d 22 9c 14 20 20 c9  20 34 33 3a 20 e7 20 62  |.."..  . 43: . b|
000050e0  25 3d 34 20 8c 0d 22 a6  2c 20 20 20 20 20 20 f2  |%=4 ..".,      .|
000050f0  72 65 76 65 72 73 65 5f  69 63 6f 6e 28 68 61 6e  |reverse_icon(han|
00005100  64 6c 65 25 28 34 29 2c  34 31 2c 34 32 2c 34 33  |dle%(4),41,42,43|
00005110  29 0d 22 b0 12 20 20 20  20 20 20 f2 74 6f 6f 6c  |)."..      .tool|
00005120  5f 67 6f 0d 22 ba 2c 20  20 20 20 20 20 f2 72 65  |_go.".,      .re|
00005130  76 65 72 73 65 5f 69 63  6f 6e 28 68 61 6e 64 6c  |verse_icon(handl|
00005140  65 25 28 34 29 2c 34 31  2c 34 32 2c 34 33 29 0d  |e%(4),41,42,43).|
00005150  22 c4 09 20 20 20 20 cd  0d 22 ce 14 20 20 c9 20  |"..    .."..  . |
00005160  35 30 3a 20 e7 20 62 25  3d 34 20 8c 0d 22 d8 2c  |50: . b%=4 ..".,|
00005170  20 20 20 20 20 20 f2 72  65 76 65 72 73 65 5f 69  |      .reverse_i|
00005180  63 6f 6e 28 68 61 6e 64  6c 65 25 28 34 29 2c 34  |con(handle%(4),4|
00005190  38 2c 34 39 2c 35 30 29  0d 22 e2 12 20 20 20 20  |8,49,50)."..    |
000051a0  20 20 f2 74 6f 6f 6c 5f  67 6f 0d 22 ec 2c 20 20  |  .tool_go.".,  |
000051b0  20 20 20 20 f2 72 65 76  65 72 73 65 5f 69 63 6f  |    .reverse_ico|
000051c0  6e 28 68 61 6e 64 6c 65  25 28 34 29 2c 34 38 2c  |n(handle%(4),48,|
000051d0  34 39 2c 35 30 29 0d 22  f6 09 20 20 20 20 cd 0d  |49,50)."..    ..|
000051e0  23 00 15 20 20 c9 20 31  31 31 3a 20 e7 20 62 25  |#..  . 111: . b%|
000051f0  3d 34 20 8c 0d 23 0a 2f  20 20 20 20 20 20 f2 72  |=4 ..#./      .r|
00005200  65 76 65 72 73 65 5f 69  63 6f 6e 28 68 61 6e 64  |everse_icon(hand|
00005210  6c 65 25 28 34 29 2c 31  30 39 2c 31 31 30 2c 31  |le%(4),109,110,1|
00005220  31 31 29 0d 23 14 3f 20  20 20 20 20 20 63 75 72  |11).#.?      cur|
00005230  5f 67 72 69 64 25 3d bb  a4 72 65 61 64 5f 69 6e  |_grid%=..read_in|
00005240  64 69 72 65 63 74 65 64  5f 69 63 6f 6e 5f 74 65  |directed_icon_te|
00005250  78 74 28 68 61 6e 64 6c  65 25 28 34 29 2c 31 30  |xt(handle%(4),10|
00005260  35 29 0d 23 1e 21 20 20  20 20 20 20 f2 63 68 61  |5).#.!      .cha|
00005270  6e 67 65 5f 67 72 69 64  28 63 75 72 5f 67 72 69  |nge_grid(cur_gri|
00005280  64 25 29 0d 23 28 1d 20  20 20 20 20 20 f2 6f 70  |d%).#(.      .op|
00005290  65 6e 28 68 61 6e 64 6c  65 25 28 33 29 2c 30 29  |en(handle%(3),0)|
000052a0  0d 23 32 2f 20 20 20 20  20 20 f2 72 65 76 65 72  |.#2/      .rever|
000052b0  73 65 5f 69 63 6f 6e 28  68 61 6e 64 6c 65 25 28  |se_icon(handle%(|
000052c0  34 29 2c 31 30 39 2c 31  31 30 2c 31 31 31 29 0d  |4),109,110,111).|
000052d0  23 3c 09 20 20 20 20 cd  0d 23 46 05 cb 0d 23 50  |#<.    ..#F...#P|
000052e0  05 e1 0d 23 5a 05 3a 0d  23 64 0d dd f2 74 6f 6f  |...#Z.:.#d...too|
000052f0  6c 5f 67 6f 0d 23 6e 2f  e7 20 69 25 3d 35 30 20  |l_go.#n/. i%=50 |
00005300  80 20 63 65 25 3d 30 20  f2 65 72 72 6f 72 28 31  |. ce%=0 .error(1|
00005310  2c a4 6d 65 73 73 28 22  4f 4b 35 22 29 2c 31 29  |,.mess("OK5"),1)|
00005320  3a 20 e1 0d 23 78 3d e7  20 69 25 3d 35 30 20 80  |: ..#x=. i%=50 .|
00005330  20 28 63 74 73 25 3d 31  34 20 84 20 63 74 73 25  | (cts%=14 . cts%|
00005340  3d 31 37 29 20 f2 65 72  72 6f 72 28 31 2c a4 6d  |=17) .error(1,.m|
00005350  65 73 73 28 22 4f 4b 36  22 29 2c 31 29 3a 20 e1  |ess("OK6"),1): .|
00005360  0d 23 82 28 e7 20 63 74  73 25 3d 30 20 f2 65 72  |.#.(. cts%=0 .er|
00005370  72 6f 72 28 31 2c a4 6d  65 73 73 28 22 4f 4b 37  |ror(1,.mess("OK7|
00005380  22 29 2c 31 29 3a 20 e1  0d 23 8c 60 e7 20 a4 6c  |"),1): ..#.`. .l|
00005390  69 6e 65 73 3d 30 20 80  20 63 74 73 25 3c 3e 39  |ines=0 . cts%<>9|
000053a0  20 80 20 63 74 73 25 3c  3e 31 30 20 80 20 63 74  | . cts%<>10 . ct|
000053b0  73 25 3c 3e 31 31 20 80  20 63 74 73 25 3c 3e 31  |s%<>11 . cts%<>1|
000053c0  32 20 80 20 63 74 73 25  3c 3e 32 30 20 f2 65 72  |2 . cts%<>20 .er|
000053d0  72 6f 72 28 31 2c a4 6d  65 73 73 28 22 4f 4b 38  |ror(1,.mess("OK8|
000053e0  22 29 2c 31 29 3a 20 e1  0d 23 96 17 62 6c 6f 63  |"),1): ..#..bloc|
000053f0  6b 25 21 30 3d 68 61 6e  64 6c 65 25 28 33 29 0d  |k%!0=handle%(3).|
00005400  23 a0 21 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |#.!.. "Wimp_Clos|
00005410  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 25  |eWindow",,block%|
00005420  0d 23 aa 6b ee 20 63 74  73 25 2d 38 20 f2 6f 62  |.#.k. cts%-8 .ob|
00005430  6c 69 71 75 65 28 31 29  2c f2 6f 62 6c 69 71 75  |lique(1),.obliqu|
00005440  65 28 32 29 2c f2 66 6c  69 70 28 31 29 2c f2 66  |e(2),.flip(1),.f|
00005450  6c 69 70 28 32 29 2c f2  63 6c 65 61 72 2c f2 63  |lip(2),.clear,.c|
00005460  6f 70 79 2c f2 74 68 69  6e 2c f2 73 65 74 2c f2  |opy,.thin,.set,.|
00005470  73 77 61 70 2c f2 62 6f  6c 64 2c f2 69 6e 76 65  |swap,.bold,.inve|
00005480  72 73 65 2c f2 72 6f 74  61 74 65 0d 23 b4 09 63  |rse,.rotate.#..c|
00005490  68 25 3d b9 0d 23 be 12  f2 70 75 74 5f 63 68 61  |h%=..#...put_cha|
000054a0  72 28 63 65 25 29 0d 23  c8 17 f2 6f 70 65 6e 28  |r(ce%).#...open(|
000054b0  68 61 6e 64 6c 65 25 28  33 29 2c 30 29 0d 23 d2  |handle%(3),0).#.|
000054c0  31 e7 20 61 75 74 75 70  25 20 f2 72 65 64 72 61  |1. autup% .redra|
000054d0  77 5f 73 63 72 65 65 6e  20 8b 20 f2 72 65 64 72  |w_screen . .redr|
000054e0  61 77 28 68 61 6e 64 6c  65 25 28 32 29 29 0d 23  |aw(handle%(2)).#|
000054f0  dc 05 e1 0d 23 e6 05 3a  0d 23 f0 10 dd f2 63 68  |....#..:.#....ch|
00005500  61 6e 67 65 5f 64 65 66  0d 23 fa 0d 64 6f 25 3d  |ange_def.#..do%=|
00005510  33 2d 64 6f 25 0d 24 04  0c c8 8e 20 64 6f 25 20  |3-do%.$.... do% |
00005520  ca 0d 24 0e 3f 20 20 c9  20 31 3a 20 e7 20 63 65  |..$.?  . 1: . ce|
00005530  25 3d 30 20 f2 75 70 64  61 74 65 5f 69 63 6f 6e  |%=0 .update_icon|
00005540  5f 74 65 78 74 28 34 2c  31 30 30 2c 22 44 65 66  |_text(4,100,"Def|
00005550  61 75 6c 74 20 43 68 61  72 61 63 74 65 72 22 29  |ault Character")|
00005560  0d 24 18 40 20 20 20 20  e7 20 63 65 25 3c 3e 30  |.$.@    . ce%<>0|
00005570  20 f2 75 70 64 61 74 65  5f 69 63 6f 6e 5f 74 65  | .update_icon_te|
00005580  78 74 28 34 2c 31 30 30  2c 22 44 65 66 61 75 6c  |xt(4,100,"Defaul|
00005590  74 20 27 20 22 2b bd 63  65 25 2b 22 20 27 22 29  |t ' "+.ce%+" '")|
000055a0  0d 24 22 3b 20 20 c9 20  32 3a 20 e7 20 63 65 25  |.$";  . 2: . ce%|
000055b0  3d 30 20 f2 75 70 64 61  74 65 5f 69 63 6f 6e 5f  |=0 .update_icon_|
000055c0  74 65 78 74 28 34 2c 31  30 30 2c 22 4f 72 69 67  |text(4,100,"Orig|
000055d0  69 6e 61 6c 20 43 68 61  72 22 29 0d 24 2c 41 20  |inal Char").$,A |
000055e0  20 20 20 e7 20 63 65 25  3c 3e 30 20 f2 75 70 64  |   . ce%<>0 .upd|
000055f0  61 74 65 5f 69 63 6f 6e  5f 74 65 78 74 28 34 2c  |ate_icon_text(4,|
00005600  31 30 30 2c 22 4f 72 69  67 69 6e 61 6c 20 27 20  |100,"Original ' |
00005610  22 2b bd 63 65 25 2b 22  20 27 22 29 0d 24 36 05  |"+.ce%+" '").$6.|
00005620  cb 0d 24 40 05 e1 0d 24  4a 05 3a 0d 24 54 0b dd  |..$@...$J.:.$T..|
00005630  a4 6c 69 6e 65 73 0d 24  5e 0f e3 20 63 6c 25 3d  |.lines.$^.. cl%=|
00005640  31 20 b8 20 38 0d 24 68  18 20 20 e7 20 6c 69 6e  |1 . 8.$h.  . lin|
00005650  65 73 25 28 63 6c 25 29  3d 32 20 3d 31 0d 24 72  |es%(cl%)=2 =1.$r|
00005660  09 ed 20 63 6c 25 0d 24  7c 06 3d 30 0d 24 86 05  |.. cl%.$|.=0.$..|
00005670  3a 0d 24 90 0f dd f2 67  65 74 5f 63 68 61 72 73  |:.$....get_chars|
00005680  0d 24 9a 33 66 25 3d bb  28 a4 72 65 61 64 5f 69  |.$.3f%=.(.read_i|
00005690  6e 64 69 72 65 63 74 65  64 5f 69 63 6f 6e 5f 74  |ndirected_icon_t|
000056a0  65 78 74 28 68 61 6e 64  6c 65 25 28 34 29 2c 33  |ext(handle%(4),3|
000056b0  32 29 29 0d 24 a4 30 74  24 3d a4 72 65 61 64 5f  |2)).$.0t$=.read_|
000056c0  69 6e 64 69 72 65 63 74  65 64 5f 69 63 6f 6e 5f  |indirected_icon_|
000056d0  74 65 78 74 28 68 61 6e  64 6c 65 25 28 34 29 2c  |text(handle%(4),|
000056e0  33 37 29 0d 24 ae 0c 74  25 3d bb 28 74 24 29 0d  |37).$..t%=.(t$).|
000056f0  24 b8 1a e7 20 69 25 3d  35 30 20 66 25 3d 63 65  |$... i%=50 f%=ce|
00005700  25 3a 20 74 25 3d 63 65  25 0d 24 c2 05 e1 0d 24  |%: t%=ce%.$....$|
00005710  cc 05 3a 0d 24 d6 13 dd  f2 61 6c 70 68 61 6e 75  |..:.$....alphanu|
00005720  6d 28 6e 63 25 29 0d 24  e0 19 e7 20 6e 63 25 3d  |m(nc%).$... nc%=|
00005730  35 38 20 66 25 3d 36 35  3a 20 74 25 3d 39 30 0d  |58 f%=65: t%=90.|
00005740  24 ea 1a e7 20 6e 63 25  3d 39 31 20 66 25 3d 39  |$... nc%=91 f%=9|
00005750  37 3a 20 74 25 3d 31 32  32 0d 24 f4 05 e1 0d 24  |7: t%=122.$....$|
00005760  fe 05 3a 0d 25 08 11 dd  a4 63 68 65 63 6b 5f 63  |..:.%....check_c|
00005770  68 61 72 73 0d 25 12 31  e7 20 66 25 3c 33 32 20  |hars.%.1. f%<32 |
00005780  84 20 66 25 3e 32 35 35  20 f2 65 72 72 6f 72 28  |. f%>255 .error(|
00005790  31 2c a4 6d 65 73 73 28  22 4f 4b 39 22 29 2c 31  |1,.mess("OK9"),1|
000057a0  29 3a 20 3d 31 0d 25 1c  3a e7 20 74 25 3c 33 32  |): =1.%.:. t%<32|
000057b0  20 80 20 74 24 3c 3e 22  22 20 84 20 74 25 3e 32  | . t$<>"" . t%>2|
000057c0  35 35 20 f2 65 72 72 6f  72 28 31 2c a4 6d 65 73  |55 .error(1,.mes|
000057d0  73 28 22 4f 4b 39 22 29  2c 31 29 3a 20 3d 31 0d  |s("OK9"),1): =1.|
000057e0  25 26 31 e7 20 74 25 3c  66 25 20 80 20 74 24 3c  |%&1. t%<f% . t$<|
000057f0  3e 22 22 20 f2 65 72 72  6f 72 28 31 2c a4 6d 65  |>"" .error(1,.me|
00005800  73 73 28 22 4f 4b 39 22  29 2c 31 29 3a 20 3d 31  |ss("OK9"),1): =1|
00005810  0d 25 30 06 3d 32 0d 25  3a 05 3a 0d 25 44 0b dd  |.%0.=2.%:.:.%D..|
00005820  f2 63 6c 65 61 72 0d 25  4e 0e f2 67 65 74 5f 63  |.clear.%N..get_c|
00005830  68 61 72 73 0d 25 58 19  e7 20 61 61 6e 25 3d 32  |hars.%X.. aan%=2|
00005840  20 66 25 3d 34 38 3a 20  74 25 3d 35 37 0d 25 62  | f%=48: t%=57.%b|
00005850  17 e7 20 a4 63 68 65 63  6b 5f 63 68 61 72 73 3c  |.. .check_chars<|
00005860  3e 32 20 e1 0d 25 6c 05  f5 0d 25 76 13 20 20 e3  |>2 ..%l...%v.  .|
00005870  20 78 78 25 3d 66 25 20  b8 20 74 25 0d 25 80 18  | xx%=f% . t%.%..|
00005880  20 20 20 20 f2 67 65 74  5f 62 69 74 6d 61 70 28  |    .get_bitmap(|
00005890  78 78 25 29 0d 25 8a 13  20 20 20 20 e3 20 6c 63  |xx%).%..    . lc|
000058a0  25 3d 31 20 b8 20 38 0d  25 94 25 20 20 20 20 20  |%=1 . 8.%.%     |
000058b0  20 e7 20 6c 69 6e 65 73  25 28 6c 63 25 29 3d 32  | . lines%(lc%)=2|
000058c0  20 62 6d 6c 25 28 6c 63  25 29 3d 30 0d 25 9e 0d  | bml%(lc%)=0.%..|
000058d0  20 20 20 20 ed 20 6c 63  25 0d 25 a8 50 20 20 20  |    . lc%.%.P   |
000058e0  20 ef 20 32 33 2c 78 78  25 2c 62 6d 6c 25 28 31  | . 23,xx%,bml%(1|
000058f0  29 2c 62 6d 6c 25 28 32  29 2c 62 6d 6c 25 28 33  |),bml%(2),bml%(3|
00005900  29 2c 62 6d 6c 25 28 34  29 2c 62 6d 6c 25 28 35  |),bml%(4),bml%(5|
00005910  29 2c 62 6d 6c 25 28 36  29 2c 62 6d 6c 25 28 37  |),bml%(6),bml%(7|
00005920  29 2c 62 6d 6c 25 28 38  29 0d 25 b2 0b 20 20 ed  |),bml%(8).%..  .|
00005930  20 78 78 25 0d 25 bc 27  20 20 e7 20 61 61 6e 25  | xx%.%.'  . aan%|
00005940  3d 32 20 80 20 78 78 25  3c 31 32 33 20 f2 61 6c  |=2 . xx%<123 .al|
00005950  70 68 61 6e 75 6d 28 78  78 25 29 0d 25 c6 2c fd  |phanum(xx%).%.,.|
00005960  20 28 78 78 25 3e 74 25  20 80 20 61 61 6e 25 3d  | (xx%>t% . aan%=|
00005970  31 29 20 84 20 28 78 78  25 3d 31 32 33 20 80 20  |1) . (xx%=123 . |
00005980  61 61 6e 25 3d 32 29 0d  25 d0 05 e1 0d 25 da 05  |aan%=2).%....%..|
00005990  3a 0d 25 e4 09 dd f2 73  65 74 0d 25 ee 0e f2 67  |:.%....set.%...g|
000059a0  65 74 5f 63 68 61 72 73  0d 25 f8 19 e7 20 61 61  |et_chars.%... aa|
000059b0  6e 25 3d 32 20 66 25 3d  34 38 3a 20 74 25 3d 35  |n%=2 f%=48: t%=5|
000059c0  37 0d 26 02 17 e7 20 a4  63 68 65 63 6b 5f 63 68  |7.&... .check_ch|
000059d0  61 72 73 3c 3e 32 20 e1  0d 26 0c 05 f5 0d 26 16  |ars<>2 ..&....&.|
000059e0  13 20 20 e3 20 78 78 25  3d 66 25 20 b8 20 74 25  |.  . xx%=f% . t%|
000059f0  0d 26 20 18 20 20 20 20  f2 67 65 74 5f 62 69 74  |.& .    .get_bit|
00005a00  6d 61 70 28 78 78 25 29  0d 26 2a 13 20 20 20 20  |map(xx%).&*.    |
00005a10  e3 20 6c 63 25 3d 31 20  b8 20 38 0d 26 34 27 20  |. lc%=1 . 8.&4' |
00005a20  20 20 20 20 20 e7 20 6c  69 6e 65 73 25 28 6c 63  |     . lines%(lc|
00005a30  25 29 3d 32 20 62 6d 6c  25 28 6c 63 25 29 3d 32  |%)=2 bml%(lc%)=2|
00005a40  35 35 0d 26 3e 0d 20 20  20 20 ed 20 6c 63 25 0d  |55.&>.    . lc%.|
00005a50  26 48 50 20 20 20 20 ef  20 32 33 2c 78 78 25 2c  |&HP    . 23,xx%,|
00005a60  62 6d 6c 25 28 31 29 2c  62 6d 6c 25 28 32 29 2c  |bml%(1),bml%(2),|
00005a70  62 6d 6c 25 28 33 29 2c  62 6d 6c 25 28 34 29 2c  |bml%(3),bml%(4),|
00005a80  62 6d 6c 25 28 35 29 2c  62 6d 6c 25 28 36 29 2c  |bml%(5),bml%(6),|
00005a90  62 6d 6c 25 28 37 29 2c  62 6d 6c 25 28 38 29 0d  |bml%(7),bml%(8).|
00005aa0  26 52 0b 20 20 ed 20 78  78 25 0d 26 5c 27 20 20  |&R.  . xx%.&\'  |
00005ab0  e7 20 61 61 6e 25 3d 32  20 80 20 78 78 25 3c 31  |. aan%=2 . xx%<1|
00005ac0  32 33 20 f2 61 6c 70 68  61 6e 75 6d 28 78 78 25  |23 .alphanum(xx%|
00005ad0  29 0d 26 66 2c fd 20 28  78 78 25 3e 74 25 20 80  |).&f,. (xx%>t% .|
00005ae0  20 61 61 6e 25 3d 31 29  20 84 20 28 78 78 25 3d  | aan%=1) . (xx%=|
00005af0  31 32 33 20 80 20 61 61  6e 25 3d 32 29 0d 26 70  |123 . aan%=2).&p|
00005b00  05 e1 0d 26 7a 05 3a 0d  26 84 0d dd f2 69 6e 76  |...&z.:.&....inv|
00005b10  65 72 73 65 0d 26 8e 0e  f2 67 65 74 5f 63 68 61  |erse.&...get_cha|
00005b20  72 73 0d 26 98 19 e7 20  61 61 6e 25 3d 32 20 66  |rs.&... aan%=2 f|
00005b30  25 3d 34 38 3a 20 74 25  3d 35 37 0d 26 a2 17 e7  |%=48: t%=57.&...|
00005b40  20 a4 63 68 65 63 6b 5f  63 68 61 72 73 3c 3e 32  | .check_chars<>2|
00005b50  20 e1 0d 26 ac 05 f5 0d  26 b6 13 20 20 e3 20 78  | ..&....&..  . x|
00005b60  78 25 3d 66 25 20 b8 20  74 25 0d 26 c0 18 20 20  |x%=f% . t%.&..  |
00005b70  20 20 f2 67 65 74 5f 62  69 74 6d 61 70 28 78 78  |  .get_bitmap(xx|
00005b80  25 29 0d 26 ca 13 20 20  20 20 e3 20 6c 63 25 3d  |%).&..    . lc%=|
00005b90  31 20 b8 20 38 0d 26 d4  2f 20 20 20 20 20 20 e7  |1 . 8.&./      .|
00005ba0  20 6c 69 6e 65 73 25 28  6c 63 25 29 3d 32 20 62  | lines%(lc%)=2 b|
00005bb0  6d 6c 25 28 6c 63 25 29  3d ac 20 62 6d 6c 25 28  |ml%(lc%)=. bml%(|
00005bc0  6c 63 25 29 0d 26 de 0d  20 20 20 20 ed 20 6c 63  |lc%).&..    . lc|
00005bd0  25 0d 26 e8 50 20 20 20  20 ef 20 32 33 2c 78 78  |%.&.P    . 23,xx|
00005be0  25 2c 62 6d 6c 25 28 31  29 2c 62 6d 6c 25 28 32  |%,bml%(1),bml%(2|
00005bf0  29 2c 62 6d 6c 25 28 33  29 2c 62 6d 6c 25 28 34  |),bml%(3),bml%(4|
00005c00  29 2c 62 6d 6c 25 28 35  29 2c 62 6d 6c 25 28 36  |),bml%(5),bml%(6|
00005c10  29 2c 62 6d 6c 25 28 37  29 2c 62 6d 6c 25 28 38  |),bml%(7),bml%(8|
00005c20  29 0d 26 f2 0b 20 20 ed  20 78 78 25 0d 26 fc 27  |).&..  . xx%.&.'|
00005c30  20 20 e7 20 61 61 6e 25  3d 32 20 80 20 78 78 25  |  . aan%=2 . xx%|
00005c40  3c 31 32 33 20 f2 61 6c  70 68 61 6e 75 6d 28 78  |<123 .alphanum(x|
00005c50  78 25 29 0d 27 06 2c fd  20 28 78 78 25 3e 74 25  |x%).'.,. (xx%>t%|
00005c60  20 80 20 61 61 6e 25 3d  31 29 20 84 20 28 78 78  | . aan%=1) . (xx|
00005c70  25 3d 31 32 33 20 80 20  61 61 6e 25 3d 32 29 0d  |%=123 . aan%=2).|
00005c80  27 10 05 e1 0d 27 1a 05  3a 0d 27 24 0a dd f2 63  |'....'..:.'$...c|
00005c90  6f 70 79 0d 27 2e 0e f2  67 65 74 5f 63 68 61 72  |opy.'...get_char|
00005ca0  73 0d 27 38 30 e7 20 66  25 3c 33 32 20 84 20 66  |s.'80. f%<32 . f|
00005cb0  25 3e 32 35 35 20 f2 65  72 72 6f 72 28 31 2c a4  |%>255 .error(1,.|
00005cc0  6d 65 73 73 28 22 4f 4b  39 22 29 2c 31 29 3a 20  |mess("OK9"),1): |
00005cd0  e1 0d 27 42 30 e7 20 74  25 3c 33 32 20 84 20 74  |..'B0. t%<32 . t|
00005ce0  25 3e 32 35 35 20 f2 65  72 72 6f 72 28 31 2c a4  |%>255 .error(1,.|
00005cf0  6d 65 73 73 28 22 4f 4b  39 22 29 2c 31 29 3a 20  |mess("OK9"),1): |
00005d00  e1 0d 27 4c 13 f2 67 65  74 5f 62 69 74 6d 61 70  |..'L..get_bitmap|
00005d10  28 66 25 29 0d 27 56 0e  e3 20 69 25 3d 31 20 b8  |(f%).'V.. i%=1 .|
00005d20  20 38 0d 27 60 18 20 20  62 6d 6c 32 25 28 69 25  | 8.'`.  bml2%(i%|
00005d30  29 3d 62 6d 6c 25 28 69  25 29 0d 27 6a 08 ed 20  |)=bml%(i%).'j.. |
00005d40  69 25 0d 27 74 13 f2 67  65 74 5f 62 69 74 6d 61  |i%.'t..get_bitma|
00005d50  70 28 74 25 29 0d 27 7e  0e e3 20 69 25 3d 31 20  |p(t%).'~.. i%=1 |
00005d60  b8 20 38 0d 27 88 27 20  20 e7 20 6c 69 6e 65 73  |. 8.'.'  . lines|
00005d70  25 28 69 25 29 3d 32 20  62 6d 6c 25 28 69 25 29  |%(i%)=2 bml%(i%)|
00005d80  3d 62 6d 6c 32 25 28 69  25 29 0d 27 92 08 ed 20  |=bml2%(i%).'... |
00005d90  69 25 0d 27 9c 4b ef 20  32 33 2c 74 25 2c 62 6d  |i%.'.K. 23,t%,bm|
00005da0  6c 25 28 31 29 2c 62 6d  6c 25 28 32 29 2c 62 6d  |l%(1),bml%(2),bm|
00005db0  6c 25 28 33 29 2c 62 6d  6c 25 28 34 29 2c 62 6d  |l%(3),bml%(4),bm|
00005dc0  6c 25 28 35 29 2c 62 6d  6c 25 28 36 29 2c 62 6d  |l%(5),bml%(6),bm|
00005dd0  6c 25 28 37 29 2c 62 6d  6c 25 28 38 29 0d 27 a6  |l%(7),bml%(8).'.|
00005de0  05 e1 0d 27 b0 05 3a 0d  27 ba 0a dd f2 73 77 61  |...'..:.'....swa|
00005df0  70 0d 27 c4 0e f2 67 65  74 5f 63 68 61 72 73 0d  |p.'...get_chars.|
00005e00  27 ce 30 e7 20 66 25 3c  33 32 20 84 20 66 25 3e  |'.0. f%<32 . f%>|
00005e10  32 35 35 20 f2 65 72 72  6f 72 28 31 2c a4 6d 65  |255 .error(1,.me|
00005e20  73 73 28 22 4f 4b 39 22  29 2c 31 29 3a 20 e1 0d  |ss("OK9"),1): ..|
00005e30  27 d8 30 e7 20 74 25 3c  33 32 20 84 20 74 25 3e  |'.0. t%<32 . t%>|
00005e40  32 35 35 20 f2 65 72 72  6f 72 28 31 2c a4 6d 65  |255 .error(1,.me|
00005e50  73 73 28 22 4f 4b 39 22  29 2c 31 29 3a 20 e1 0d  |ss("OK9"),1): ..|
00005e60  27 e2 13 f2 67 65 74 5f  62 69 74 6d 61 70 28 74  |'...get_bitmap(t|
00005e70  25 29 0d 27 ec 0e e3 20  69 25 3d 31 20 b8 20 38  |%).'... i%=1 . 8|
00005e80  0d 27 f6 18 20 20 62 6d  6c 32 25 28 69 25 29 3d  |.'..  bml2%(i%)=|
00005e90  62 6d 6c 25 28 69 25 29  0d 28 00 08 ed 20 69 25  |bml%(i%).(... i%|
00005ea0  0d 28 0a 13 f2 67 65 74  5f 62 69 74 6d 61 70 28  |.(...get_bitmap(|
00005eb0  66 25 29 0d 28 14 0f e3  20 6c 63 25 3d 31 20 b8  |f%).(... lc%=1 .|
00005ec0  20 38 0d 28 1e 47 20 20  e7 20 6c 69 6e 65 73 25  | 8.(.G  . lines%|
00005ed0  28 6c 63 25 29 3d 31 20  64 25 3d 62 6d 6c 25 28  |(lc%)=1 d%=bml%(|
00005ee0  6c 63 25 29 3a 20 62 6d  6c 25 28 6c 63 25 29 3d  |lc%): bml%(lc%)=|
00005ef0  62 6d 6c 32 25 28 6c 63  25 29 3a 20 62 6d 6c 32  |bml2%(lc%): bml2|
00005f00  25 28 6c 63 25 29 3d 64  25 0d 28 28 09 ed 20 6c  |%(lc%)=d%.((.. l|
00005f10  63 25 0d 28 32 53 ef 20  32 33 2c 66 25 2c 62 6d  |c%.(2S. 23,f%,bm|
00005f20  6c 32 25 28 31 29 2c 62  6d 6c 32 25 28 32 29 2c  |l2%(1),bml2%(2),|
00005f30  62 6d 6c 32 25 28 33 29  2c 62 6d 6c 32 25 28 34  |bml2%(3),bml2%(4|
00005f40  29 2c 62 6d 6c 32 25 28  35 29 2c 62 6d 6c 32 25  |),bml2%(5),bml2%|
00005f50  28 36 29 2c 62 6d 6c 32  25 28 37 29 2c 62 6d 6c  |(6),bml2%(7),bml|
00005f60  32 25 28 38 29 0d 28 3c  4b ef 20 32 33 2c 74 25  |2%(8).(<K. 23,t%|
00005f70  2c 62 6d 6c 25 28 31 29  2c 62 6d 6c 25 28 32 29  |,bml%(1),bml%(2)|
00005f80  2c 62 6d 6c 25 28 33 29  2c 62 6d 6c 25 28 34 29  |,bml%(3),bml%(4)|
00005f90  2c 62 6d 6c 25 28 35 29  2c 62 6d 6c 25 28 36 29  |,bml%(5),bml%(6)|
00005fa0  2c 62 6d 6c 25 28 37 29  2c 62 6d 6c 25 28 38 29  |,bml%(7),bml%(8)|
00005fb0  0d 28 46 05 e1 0d 28 50  05 3a 0d 28 5a 0a dd f2  |.(F...(P.:.(Z...|
00005fc0  62 6f 6c 64 0d 28 64 0e  f2 67 65 74 5f 63 68 61  |bold.(d..get_cha|
00005fd0  72 73 0d 28 6e 19 e7 20  61 61 6e 25 3d 32 20 66  |rs.(n.. aan%=2 f|
00005fe0  25 3d 34 38 3a 20 74 25  3d 35 37 0d 28 78 17 e7  |%=48: t%=57.(x..|
00005ff0  20 a4 63 68 65 63 6b 5f  63 68 61 72 73 3c 3e 32  | .check_chars<>2|
00006000  20 e1 0d 28 82 05 f5 0d  28 8c 13 20 20 e3 20 78  | ..(....(..  . x|
00006010  78 25 3d 66 25 20 b8 20  74 25 0d 28 96 18 20 20  |x%=f% . t%.(..  |
00006020  20 20 f2 67 65 74 5f 62  69 74 6d 61 70 28 78 78  |  .get_bitmap(xx|
00006030  25 29 0d 28 a0 13 20 20  20 20 e3 20 6c 63 25 3d  |%).(..    . lc%=|
00006040  31 20 b8 20 38 0d 28 aa  3b 20 20 20 20 20 20 e7  |1 . 8.(.;      .|
00006050  20 6c 69 6e 65 73 25 28  6c 63 25 29 3d 32 20 62  | lines%(lc%)=2 b|
00006060  6d 6c 25 28 6c 63 25 29  3d 62 6d 6c 25 28 6c 63  |ml%(lc%)=bml%(lc|
00006070  25 29 20 84 20 62 6d 6c  25 28 6c 63 25 29 2f 32  |%) . bml%(lc%)/2|
00006080  0d 28 b4 0d 20 20 20 20  ed 20 6c 63 25 0d 28 be  |.(..    . lc%.(.|
00006090  50 20 20 20 20 ef 20 32  33 2c 78 78 25 2c 62 6d  |P    . 23,xx%,bm|
000060a0  6c 25 28 31 29 2c 62 6d  6c 25 28 32 29 2c 62 6d  |l%(1),bml%(2),bm|
000060b0  6c 25 28 33 29 2c 62 6d  6c 25 28 34 29 2c 62 6d  |l%(3),bml%(4),bm|
000060c0  6c 25 28 35 29 2c 62 6d  6c 25 28 36 29 2c 62 6d  |l%(5),bml%(6),bm|
000060d0  6c 25 28 37 29 2c 62 6d  6c 25 28 38 29 0d 28 c8  |l%(7),bml%(8).(.|
000060e0  0b 20 20 ed 20 78 78 25  0d 28 d2 27 20 20 e7 20  |.  . xx%.(.'  . |
000060f0  61 61 6e 25 3d 32 20 80  20 78 78 25 3c 31 32 33  |aan%=2 . xx%<123|
00006100  20 f2 61 6c 70 68 61 6e  75 6d 28 78 78 25 29 0d  | .alphanum(xx%).|
00006110  28 dc 2c fd 20 28 78 78  25 3e 74 25 20 80 20 61  |(.,. (xx%>t% . a|
00006120  61 6e 25 3d 31 29 20 84  20 28 78 78 25 3d 31 32  |an%=1) . (xx%=12|
00006130  33 20 80 20 61 61 6e 25  3d 32 29 0d 28 e6 05 e1  |3 . aan%=2).(...|
00006140  0d 28 f0 05 3a 0d 28 fa  0a dd f2 74 68 69 6e 0d  |.(..:.(....thin.|
00006150  29 04 0e f2 67 65 74 5f  63 68 61 72 73 0d 29 0e  |)...get_chars.).|
00006160  19 e7 20 61 61 6e 25 3d  32 20 66 25 3d 34 38 3a  |.. aan%=2 f%=48:|
00006170  20 74 25 3d 35 37 0d 29  18 17 e7 20 a4 63 68 65  | t%=57.)... .che|
00006180  63 6b 5f 63 68 61 72 73  3c 3e 32 20 e1 0d 29 22  |ck_chars<>2 ..)"|
00006190  05 f5 0d 29 2c 13 20 20  e3 20 78 78 25 3d 66 25  |...),.  . xx%=f%|
000061a0  20 b8 20 74 25 0d 29 36  18 20 20 20 20 f2 67 65  | . t%.)6.    .ge|
000061b0  74 5f 62 69 74 6d 61 70  28 78 78 25 29 0d 29 40  |t_bitmap(xx%).)@|
000061c0  13 20 20 20 20 e3 20 6c  63 25 3d 31 20 b8 20 38  |.    . lc%=1 . 8|
000061d0  0d 29 4a 3b 20 20 20 20  20 20 e7 20 6c 69 6e 65  |.)J;      . line|
000061e0  73 25 28 6c 63 25 29 3d  32 20 62 6d 6c 25 28 6c  |s%(lc%)=2 bml%(l|
000061f0  63 25 29 3d 62 6d 6c 25  28 6c 63 25 29 20 80 20  |c%)=bml%(lc%) . |
00006200  62 6d 6c 25 28 6c 63 25  29 2f 32 0d 29 54 0d 20  |bml%(lc%)/2.)T. |
00006210  20 20 20 ed 20 6c 63 25  0d 29 5e 50 20 20 20 20  |   . lc%.)^P    |
00006220  ef 20 32 33 2c 78 78 25  2c 62 6d 6c 25 28 31 29  |. 23,xx%,bml%(1)|
00006230  2c 62 6d 6c 25 28 32 29  2c 62 6d 6c 25 28 33 29  |,bml%(2),bml%(3)|
00006240  2c 62 6d 6c 25 28 34 29  2c 62 6d 6c 25 28 35 29  |,bml%(4),bml%(5)|
00006250  2c 62 6d 6c 25 28 36 29  2c 62 6d 6c 25 28 37 29  |,bml%(6),bml%(7)|
00006260  2c 62 6d 6c 25 28 38 29  0d 29 68 0b 20 20 ed 20  |,bml%(8).)h.  . |
00006270  78 78 25 0d 29 72 27 20  20 e7 20 61 61 6e 25 3d  |xx%.)r'  . aan%=|
00006280  32 20 80 20 78 78 25 3c  31 32 33 20 f2 61 6c 70  |2 . xx%<123 .alp|
00006290  68 61 6e 75 6d 28 78 78  25 29 0d 29 7c 2c fd 20  |hanum(xx%).)|,. |
000062a0  28 78 78 25 3e 74 25 20  80 20 61 61 6e 25 3d 31  |(xx%>t% . aan%=1|
000062b0  29 20 84 20 28 78 78 25  3d 31 32 33 20 80 20 61  |) . (xx%=123 . a|
000062c0  61 6e 25 3d 32 29 0d 29  86 05 e1 0d 29 90 05 3a  |an%=2).)....)..:|
000062d0  0d 29 9a 12 dd f2 6f 62  6c 69 71 75 65 28 74 70  |.)....oblique(tp|
000062e0  25 29 0d 29 a4 0e f2 67  65 74 5f 63 68 61 72 73  |%).)...get_chars|
000062f0  0d 29 ae 19 e7 20 61 61  6e 25 3d 32 20 66 25 3d  |.)... aan%=2 f%=|
00006300  34 38 3a 20 74 25 3d 35  37 0d 29 b8 17 e7 20 a4  |48: t%=57.)... .|
00006310  63 68 65 63 6b 5f 63 68  61 72 73 3c 3e 32 20 e1  |check_chars<>2 .|
00006320  0d 29 c2 05 f5 0d 29 cc  13 20 20 e3 20 78 78 25  |.)....)..  . xx%|
00006330  3d 66 25 20 b8 20 74 25  0d 29 d6 18 20 20 20 20  |=f% . t%.)..    |
00006340  f2 67 65 74 5f 62 69 74  6d 61 70 28 78 78 25 29  |.get_bitmap(xx%)|
00006350  0d 29 e0 cd 20 20 20 20  e7 20 74 70 25 3d 31 20  |.)..    . tp%=1 |
00006360  62 6d 6c 25 28 35 29 3d  62 6d 6c 25 28 35 29 2a  |bml%(5)=bml%(5)*|
00006370  32 3a 20 62 6d 6c 25 28  36 29 3d 62 6d 6c 25 28  |2: bml%(6)=bml%(|
00006380  36 29 2a 32 3a 20 62 6d  6c 25 28 37 29 3d 62 6d  |6)*2: bml%(7)=bm|
00006390  6c 25 28 37 29 2a 32 3a  20 62 6d 6c 25 28 38 29  |l%(7)*2: bml%(8)|
000063a0  3d 62 6d 6c 25 28 38 29  2a 32 20 8b 20 62 6d 6c  |=bml%(8)*2 . bml|
000063b0  25 28 31 29 3d 62 6d 6c  25 28 31 29 2f 32 3a 20  |%(1)=bml%(1)/2: |
000063c0  62 6d 6c 25 28 32 29 3d  62 6d 6c 25 28 32 29 2f  |bml%(2)=bml%(2)/|
000063d0  32 3a 20 62 6d 6c 25 28  33 29 3d 62 6d 6c 25 28  |2: bml%(3)=bml%(|
000063e0  33 29 2f 32 3a 20 62 6d  6c 25 28 36 29 3d 62 6d  |3)/2: bml%(6)=bm|
000063f0  6c 25 28 36 29 2a 32 3a  20 62 6d 6c 25 28 37 29  |l%(6)*2: bml%(7)|
00006400  3d 62 6d 6c 25 28 37 29  2a 32 3a 20 62 6d 6c 25  |=bml%(7)*2: bml%|
00006410  28 38 29 3d 62 6d 6c 25  28 38 29 2a 34 0d 29 ea  |(8)=bml%(8)*4.).|
00006420  50 20 20 20 20 ef 20 32  33 2c 78 78 25 2c 62 6d  |P    . 23,xx%,bm|
00006430  6c 25 28 31 29 2c 62 6d  6c 25 28 32 29 2c 62 6d  |l%(1),bml%(2),bm|
00006440  6c 25 28 33 29 2c 62 6d  6c 25 28 34 29 2c 62 6d  |l%(3),bml%(4),bm|
00006450  6c 25 28 35 29 2c 62 6d  6c 25 28 36 29 2c 62 6d  |l%(5),bml%(6),bm|
00006460  6c 25 28 37 29 2c 62 6d  6c 25 28 38 29 0d 29 f4  |l%(7),bml%(8).).|
00006470  0b 20 20 ed 20 78 78 25  0d 29 fe 27 20 20 e7 20  |.  . xx%.).'  . |
00006480  61 61 6e 25 3d 32 20 80  20 78 78 25 3c 31 32 33  |aan%=2 . xx%<123|
00006490  20 f2 61 6c 70 68 61 6e  75 6d 28 78 78 25 29 0d  | .alphanum(xx%).|
000064a0  2a 08 2c fd 20 28 78 78  25 3e 74 25 20 80 20 61  |*.,. (xx%>t% . a|
000064b0  61 6e 25 3d 31 29 20 84  20 28 78 78 25 3d 31 32  |an%=1) . (xx%=12|
000064c0  33 20 80 20 61 61 6e 25  3d 32 29 0d 2a 12 05 e1  |3 . aan%=2).*...|
000064d0  0d 2a 1c 05 3a 0d 2a 26  0f dd f2 66 6c 69 70 28  |.*..:.*&...flip(|
000064e0  74 70 25 29 0d 2a 30 0e  f2 67 65 74 5f 63 68 61  |tp%).*0..get_cha|
000064f0  72 73 0d 2a 3a 19 e7 20  61 61 6e 25 3d 32 20 66  |rs.*:.. aan%=2 f|
00006500  25 3d 34 38 3a 20 74 25  3d 35 37 0d 2a 44 17 e7  |%=48: t%=57.*D..|
00006510  20 a4 63 68 65 63 6b 5f  63 68 61 72 73 3c 3e 32  | .check_chars<>2|
00006520  20 e1 0d 2a 4e 05 f5 0d  2a 58 13 20 20 e3 20 78  | ..*N...*X.  . x|
00006530  78 25 3d 66 25 20 b8 20  74 25 0d 2a 62 18 20 20  |x%=f% . t%.*b.  |
00006540  20 20 f2 67 65 74 5f 62  69 74 6d 61 70 28 78 78  |  .get_bitmap(xx|
00006550  25 29 0d 2a 6c 1f 20 20  20 20 e7 20 74 70 25 3d  |%).*l.    . tp%=|
00006560  31 20 f2 66 6c 69 70 78  20 8b 20 f2 66 6c 69 70  |1 .flipx . .flip|
00006570  79 0d 2a 76 50 20 20 20  20 ef 20 32 33 2c 78 78  |y.*vP    . 23,xx|
00006580  25 2c 62 6d 6c 25 28 31  29 2c 62 6d 6c 25 28 32  |%,bml%(1),bml%(2|
00006590  29 2c 62 6d 6c 25 28 33  29 2c 62 6d 6c 25 28 34  |),bml%(3),bml%(4|
000065a0  29 2c 62 6d 6c 25 28 35  29 2c 62 6d 6c 25 28 36  |),bml%(5),bml%(6|
000065b0  29 2c 62 6d 6c 25 28 37  29 2c 62 6d 6c 25 28 38  |),bml%(7),bml%(8|
000065c0  29 0d 2a 80 0b 20 20 ed  20 78 78 25 0d 2a 8a 27  |).*..  . xx%.*.'|
000065d0  20 20 e7 20 61 61 6e 25  3d 32 20 80 20 78 78 25  |  . aan%=2 . xx%|
000065e0  3c 31 32 33 20 f2 61 6c  70 68 61 6e 75 6d 28 78  |<123 .alphanum(x|
000065f0  78 25 29 0d 2a 94 2c fd  20 28 78 78 25 3e 74 25  |x%).*.,. (xx%>t%|
00006600  20 80 20 61 61 6e 25 3d  31 29 20 84 20 28 78 78  | . aan%=1) . (xx|
00006610  25 3d 31 32 33 20 80 20  61 61 6e 25 3d 32 29 0d  |%=123 . aan%=2).|
00006620  2a 9e 05 e1 0d 2a a8 05  3a 0d 2a b2 0b dd f2 66  |*....*..:.*....f|
00006630  6c 69 70 78 0d 2a bc 0e  64 25 3d 62 6d 6c 25 28  |lipx.*..d%=bml%(|
00006640  38 29 0d 2a c6 13 62 6d  6c 25 28 38 29 3d 62 6d  |8).*..bml%(8)=bm|
00006650  6c 25 28 31 29 0d 2a d0  0e 62 6d 6c 25 28 31 29  |l%(1).*..bml%(1)|
00006660  3d 64 25 0d 2a da 0e 64  25 3d 62 6d 6c 25 28 37  |=d%.*..d%=bml%(7|
00006670  29 0d 2a e4 13 62 6d 6c  25 28 37 29 3d 62 6d 6c  |).*..bml%(7)=bml|
00006680  25 28 32 29 0d 2a ee 0e  62 6d 6c 25 28 32 29 3d  |%(2).*..bml%(2)=|
00006690  64 25 0d 2a f8 0e 64 25  3d 62 6d 6c 25 28 36 29  |d%.*..d%=bml%(6)|
000066a0  0d 2b 02 13 62 6d 6c 25  28 36 29 3d 62 6d 6c 25  |.+..bml%(6)=bml%|
000066b0  28 33 29 0d 2b 0c 0e 62  6d 6c 25 28 33 29 3d 64  |(3).+..bml%(3)=d|
000066c0  25 0d 2b 16 0e 64 25 3d  62 6d 6c 25 28 35 29 0d  |%.+..d%=bml%(5).|
000066d0  2b 20 13 62 6d 6c 25 28  35 29 3d 62 6d 6c 25 28  |+ .bml%(5)=bml%(|
000066e0  34 29 0d 2b 2a 0e 62 6d  6c 25 28 34 29 3d 64 25  |4).+*.bml%(4)=d%|
000066f0  0d 2b 34 05 e1 0d 2b 3e  05 3a 0d 2b 48 0b dd f2  |.+4...+>.:.+H...|
00006700  66 6c 69 70 79 0d 2b 52  0e e3 20 6c 25 3d 31 20  |flipy.+R.. l%=1 |
00006710  b8 20 38 0d 2b 5c 10 20  20 e3 20 63 25 3d 31 20  |. 8.+\.  . c%=1 |
00006720  b8 20 34 0d 2b 66 14 20  20 20 20 72 62 25 3d 32  |. 4.+f.    rb%=2|
00006730  5e 28 63 25 2d 31 29 0d  2b 70 1a 20 20 20 20 64  |^(c%-1).+p.    d|
00006740  31 25 3d 62 6d 6c 25 28  6c 25 29 20 80 20 72 62  |1%=bml%(l%) . rb|
00006750  25 0d 2b 7a 14 20 20 20  20 6c 62 25 3d 32 5e 28  |%.+z.    lb%=2^(|
00006760  38 2d 63 25 29 0d 2b 84  1a 20 20 20 20 64 32 25  |8-c%).+..    d2%|
00006770  3d 62 6d 6c 25 28 6c 25  29 20 80 20 6c 62 25 0d  |=bml%(l%) . lb%.|
00006780  2b 8e 45 20 20 20 20 e7  20 64 32 25 3d 6c 62 25  |+.E    . d2%=lb%|
00006790  20 62 6d 6c 25 28 6c 25  29 3d 62 6d 6c 25 28 6c  | bml%(l%)=bml%(l|
000067a0  25 29 20 84 20 72 62 25  20 8b 20 62 6d 6c 25 28  |%) . rb% . bml%(|
000067b0  6c 25 29 3d 62 6d 6c 25  28 6c 25 29 20 80 20 ac  |l%)=bml%(l%) . .|
000067c0  20 72 62 25 0d 2b 98 45  20 20 20 20 e7 20 64 31  | rb%.+.E    . d1|
000067d0  25 3d 72 62 25 20 62 6d  6c 25 28 6c 25 29 3d 62  |%=rb% bml%(l%)=b|
000067e0  6d 6c 25 28 6c 25 29 20  84 20 6c 62 25 20 8b 20  |ml%(l%) . lb% . |
000067f0  62 6d 6c 25 28 6c 25 29  3d 62 6d 6c 25 28 6c 25  |bml%(l%)=bml%(l%|
00006800  29 20 80 20 ac 20 6c 62  25 0d 2b a2 0a 20 20 ed  |) . . lb%.+..  .|
00006810  20 63 25 0d 2b ac 08 ed  20 6c 25 0d 2b b6 05 e1  | c%.+... l%.+...|
00006820  0d 2b c0 05 3a 0d 2b ca  0c dd f2 72 6f 74 61 74  |.+..:.+....rotat|
00006830  65 0d 2b d4 0e f2 67 65  74 5f 63 68 61 72 73 0d  |e.+...get_chars.|
00006840  2b de 19 e7 20 61 61 6e  25 3d 32 20 66 25 3d 34  |+... aan%=2 f%=4|
00006850  38 3a 20 74 25 3d 35 37  0d 2b e8 17 e7 20 a4 63  |8: t%=57.+... .c|
00006860  68 65 63 6b 5f 63 68 61  72 73 3c 3e 32 20 e1 0d  |heck_chars<>2 ..|
00006870  2b f2 05 f5 0d 2b fc 13  20 20 e3 20 78 78 25 3d  |+....+..  . xx%=|
00006880  66 25 20 b8 20 74 25 0d  2c 06 18 20 20 20 20 f2  |f% . t%.,..    .|
00006890  67 65 74 5f 62 69 74 6d  61 70 28 78 78 25 29 0d  |get_bitmap(xx%).|
000068a0  2c 10 12 20 20 20 20 e3  20 72 25 3d 31 20 b8 20  |,..    . r%=1 . |
000068b0  38 0d 2c 1a 0e 20 20 20  20 20 20 63 25 3d 30 0d  |8.,..      c%=0.|
000068c0  2c 24 15 20 20 20 20 20  20 e3 20 6c 63 25 3d 31  |,$.      . lc%=1|
000068d0  20 b8 20 38 0d 2c 2e 32  20 20 20 20 20 20 20 20  | . 8.,.2        |
000068e0  e7 20 28 62 6d 6c 25 28  6c 63 25 29 20 80 20 32  |. (bml%(lc%) . 2|
000068f0  5e 28 38 2d 72 25 29 29  20 63 25 2b 3d 32 5e 28  |^(8-r%)) c%+=2^(|
00006900  6c 63 25 2d 31 29 0d 2c  38 0f 20 20 20 20 20 20  |lc%-1).,8.      |
00006910  ed 20 6c 63 25 0d 2c 42  16 20 20 20 20 20 20 62  |. lc%.,B.      b|
00006920  6d 6c 32 25 28 72 25 29  3d 63 25 0d 2c 4c 0c 20  |ml2%(r%)=c%.,L. |
00006930  20 20 20 ed 20 72 25 0d  2c 56 58 20 20 20 20 ef  |   . r%.,VX    .|
00006940  20 32 33 2c 78 78 25 2c  62 6d 6c 32 25 28 31 29  | 23,xx%,bml2%(1)|
00006950  2c 62 6d 6c 32 25 28 32  29 2c 62 6d 6c 32 25 28  |,bml2%(2),bml2%(|
00006960  33 29 2c 62 6d 6c 32 25  28 34 29 2c 62 6d 6c 32  |3),bml2%(4),bml2|
00006970  25 28 35 29 2c 62 6d 6c  32 25 28 36 29 2c 62 6d  |%(5),bml2%(6),bm|
00006980  6c 32 25 28 37 29 2c 62  6d 6c 32 25 28 38 29 0d  |l2%(7),bml2%(8).|
00006990  2c 60 0b 20 20 ed 20 78  78 25 0d 2c 6a 27 20 20  |,`.  . xx%.,j'  |
000069a0  e7 20 61 61 6e 25 3d 32  20 80 20 78 78 25 3c 31  |. aan%=2 . xx%<1|
000069b0  32 33 20 f2 61 6c 70 68  61 6e 75 6d 28 78 78 25  |23 .alphanum(xx%|
000069c0  29 0d 2c 74 2c fd 20 28  78 78 25 3e 74 25 20 80  |).,t,. (xx%>t% .|
000069d0  20 61 61 6e 25 3d 31 29  20 84 20 28 78 78 25 3d  | aan%=1) . (xx%=|
000069e0  31 32 33 20 80 20 61 61  6e 25 3d 32 29 0d 2c 7e  |123 . aan%=2).,~|
000069f0  05 e1 0d 2c 88 05 3a 0d  2c 92 10 dd f2 73 63 72  |...,..:.,....scr|
00006a00  6f 6c 6c 28 69 25 29 0d  2c 9c 14 f2 67 65 74 5f  |oll(i%).,...get_|
00006a10  62 69 74 6d 61 70 28 63  65 25 29 0d 2c a6 32 ee  |bitmap(ce%).,.2.|
00006a20  20 69 25 2b 31 20 f2 73  63 72 6f 6c 6c 5f 75 2c  | i%+1 .scroll_u,|
00006a30  f2 73 63 72 6f 6c 6c 5f  6c 2c f2 73 63 72 6f 6c  |.scroll_l,.scrol|
00006a40  6c 5f 72 2c f2 73 63 72  6f 6c 6c 5f 64 0d 2c b0  |l_r,.scroll_d.,.|
00006a50  4c ef 20 32 33 2c 63 65  25 2c 62 6d 6c 25 28 31  |L. 23,ce%,bml%(1|
00006a60  29 2c 62 6d 6c 25 28 32  29 2c 62 6d 6c 25 28 33  |),bml%(2),bml%(3|
00006a70  29 2c 62 6d 6c 25 28 34  29 2c 62 6d 6c 25 28 35  |),bml%(4),bml%(5|
00006a80  29 2c 62 6d 6c 25 28 36  29 2c 62 6d 6c 25 28 37  |),bml%(6),bml%(7|
00006a90  29 2c 62 6d 6c 25 28 38  29 0d 2c ba 12 f2 70 75  |),bml%(8).,...pu|
00006aa0  74 5f 63 68 61 72 28 63  65 25 29 0d 2c c4 15 f2  |t_char(ce%).,...|
00006ab0  75 70 64 61 74 65 5f 63  68 61 72 28 63 65 25 29  |update_char(ce%)|
00006ac0  0d 2c ce 05 e1 0d 2c d8  05 3a 0d 2c e2 0e dd f2  |.,....,..:.,....|
00006ad0  73 63 72 6f 6c 6c 5f 6c  0d 2c ec 0e e3 20 73 25  |scroll_l.,... s%|
00006ae0  3d 31 20 b8 20 38 0d 2c  f6 19 20 20 62 6d 6c 25  |=1 . 8.,..  bml%|
00006af0  28 73 25 29 3d 62 6d 6c  25 28 73 25 29 2a 32 0d  |(s%)=bml%(s%)*2.|
00006b00  2d 00 08 ed 20 73 25 0d  2d 0a 05 e1 0d 2d 14 05  |-... s%.-....-..|
00006b10  3a 0d 2d 1e 0e dd f2 73  63 72 6f 6c 6c 5f 72 0d  |:.-....scroll_r.|
00006b20  2d 28 0e e3 20 73 25 3d  31 20 b8 20 38 0d 2d 32  |-(.. s%=1 . 8.-2|
00006b30  19 20 20 62 6d 6c 25 28  73 25 29 3d 62 6d 6c 25  |.  bml%(s%)=bml%|
00006b40  28 73 25 29 2f 32 0d 2d  3c 08 ed 20 73 25 0d 2d  |(s%)/2.-<.. s%.-|
00006b50  46 05 e1 0d 2d 50 05 3a  0d 2d 5a 0e dd f2 73 63  |F...-P.:.-Z...sc|
00006b60  72 6f 6c 6c 5f 75 0d 2d  64 0e e3 20 73 25 3d 31  |roll_u.-d.. s%=1|
00006b70  20 b8 20 37 0d 2d 6e 19  20 20 62 6d 6c 25 28 73  | . 7.-n.  bml%(s|
00006b80  25 29 3d 62 6d 6c 25 28  73 25 2b 31 29 0d 2d 78  |%)=bml%(s%+1).-x|
00006b90  08 ed 20 73 25 0d 2d 82  0d 62 6d 6c 25 28 38 29  |.. s%.-..bml%(8)|
00006ba0  3d 30 0d 2d 8c 05 e1 0d  2d 96 05 3a 0d 2d a0 0e  |=0.-....-..:.-..|
00006bb0  dd f2 73 63 72 6f 6c 6c  5f 64 0d 2d aa 12 e3 20  |..scroll_d.-... |
00006bc0  73 25 3d 38 20 b8 20 32  20 88 2d 31 0d 2d b4 19  |s%=8 . 2 .-1.-..|
00006bd0  20 20 62 6d 6c 25 28 73  25 29 3d 62 6d 6c 25 28  |  bml%(s%)=bml%(|
00006be0  73 25 2d 31 29 0d 2d be  08 ed 20 73 25 0d 2d c8  |s%-1).-... s%.-.|
00006bf0  0d 62 6d 6c 25 28 31 29  3d 30 0d 2d d2 05 e1 0d  |.bml%(1)=0.-....|
00006c00  2d dc 05 3a 0d 2d e6 22  dd f2 64 65 66 61 75 6c  |-..:.-."..defaul|
00006c10  74 5f 63 68 61 72 61 63  74 65 72 28 63 68 61 72  |t_character(char|
00006c20  25 2c 77 74 25 29 0d 2d  f0 29 e7 20 63 68 61 72  |%,wt%).-.). char|
00006c30  25 3d 30 20 f2 65 72 72  6f 72 28 31 2c a4 6d 65  |%=0 .error(1,.me|
00006c40  73 73 28 22 4f 4b 35 22  29 2c 31 29 3a 20 e1 0d  |ss("OK5"),1): ..|
00006c50  2d fa 0d e7 20 77 74 25  3d 31 20 8c 0d 2e 04 b7  |-... wt%=1 .....|
00006c60  20 20 ef 20 32 33 2c 63  68 61 72 25 2c 6f 72 5f  |  . 23,char%,or_|
00006c70  64 65 66 25 28 63 68 61  72 25 2d 33 32 2c 39 29  |def%(char%-32,9)|
00006c80  2c 6f 72 5f 64 65 66 25  28 63 68 61 72 25 2d 33  |,or_def%(char%-3|
00006c90  32 2c 31 30 29 2c 6f 72  5f 64 65 66 25 28 63 68  |2,10),or_def%(ch|
00006ca0  61 72 25 2d 33 32 2c 31  31 29 2c 6f 72 5f 64 65  |ar%-32,11),or_de|
00006cb0  66 25 28 63 68 61 72 25  2d 33 32 2c 31 32 29 2c  |f%(char%-32,12),|
00006cc0  6f 72 5f 64 65 66 25 28  63 68 61 72 25 2d 33 32  |or_def%(char%-32|
00006cd0  2c 31 33 29 2c 6f 72 5f  64 65 66 25 28 63 68 61  |,13),or_def%(cha|
00006ce0  72 25 2d 33 32 2c 31 34  29 2c 6f 72 5f 64 65 66  |r%-32,14),or_def|
00006cf0  25 28 63 68 61 72 25 2d  33 32 2c 31 35 29 2c 6f  |%(char%-32,15),o|
00006d00  72 5f 64 65 66 25 28 63  68 61 72 25 2d 33 32 2c  |r_def%(char%-32,|
00006d10  31 36 29 0d 2e 0e 05 cc  0d 2e 18 b0 20 20 ef 20  |16).........  . |
00006d20  32 33 2c 63 68 61 72 25  2c 6f 72 5f 64 65 66 25  |23,char%,or_def%|
00006d30  28 63 68 61 72 25 2d 33  32 2c 31 29 2c 6f 72 5f  |(char%-32,1),or_|
00006d40  64 65 66 25 28 63 68 61  72 25 2d 33 32 2c 32 29  |def%(char%-32,2)|
00006d50  2c 6f 72 5f 64 65 66 25  28 63 68 61 72 25 2d 33  |,or_def%(char%-3|
00006d60  32 2c 33 29 2c 6f 72 5f  64 65 66 25 28 63 68 61  |2,3),or_def%(cha|
00006d70  72 25 2d 33 32 2c 34 29  2c 6f 72 5f 64 65 66 25  |r%-32,4),or_def%|
00006d80  28 63 68 61 72 25 2d 33  32 2c 35 29 2c 6f 72 5f  |(char%-32,5),or_|
00006d90  64 65 66 25 28 63 68 61  72 25 2d 33 32 2c 36 29  |def%(char%-32,6)|
00006da0  2c 6f 72 5f 64 65 66 25  28 63 68 61 72 25 2d 33  |,or_def%(char%-3|
00006db0  32 2c 37 29 2c 6f 72 5f  64 65 66 25 28 63 68 61  |2,7),or_def%(cha|
00006dc0  72 25 2d 33 32 2c 38 29  0d 2e 22 05 cd 0d 2e 2c  |r%-32,8).."....,|
00006dd0  1b e7 20 61 75 74 75 70  25 20 f2 72 65 64 72 61  |.. autup% .redra|
00006de0  77 5f 73 63 72 65 65 6e  0d 2e 36 05 e1 0d 2e 40  |w_screen..6....@|
00006df0  05 3a 0d 2e 4a 0a dd f2  70 61 67 65 0d 2e 54 35  |.:..J...page..T5|
00006e00  77 70 61 67 65 25 3d bb  a4 72 65 61 64 5f 69 6e  |wpage%=..read_in|
00006e10  64 69 72 65 63 74 65 64  5f 69 63 6f 6e 5f 74 65  |directed_icon_te|
00006e20  78 74 28 68 61 6e 64 6c  65 25 28 34 29 2c 38 37  |xt(handle%(4),87|
00006e30  29 0d 2e 5e 20 e7 20 69  25 3d 38 34 20 80 20 77  |)..^ . i%=84 . w|
00006e40  70 61 67 65 25 3e 31 20  77 70 61 67 65 25 2d 3d  |page%>1 wpage%-=|
00006e50  31 0d 2e 68 20 e7 20 69  25 3d 38 38 20 80 20 77  |1..h . i%=88 . w|
00006e60  70 61 67 65 25 3c 33 20  77 70 61 67 65 25 2b 3d  |page%<3 wpage%+=|
00006e70  31 0d 2e 72 23 f2 75 70  64 61 74 65 5f 69 63 6f  |1..r#.update_ico|
00006e80  6e 5f 74 65 78 74 28 34  2c 38 37 2c c3 77 70 61  |n_text(4,87,.wpa|
00006e90  67 65 25 29 0d 2e 7c 05  e1 0d 2e 86 05 3a 0d 2e  |ge%)..|......:..|
00006ea0  90 0e dd f2 6e 65 77 5f  70 61 67 65 0d 2e 9a 35  |....new_page...5|
00006eb0  6e 70 61 67 65 25 3d bb  a4 72 65 61 64 5f 69 6e  |npage%=..read_in|
00006ec0  64 69 72 65 63 74 65 64  5f 69 63 6f 6e 5f 74 65  |directed_icon_te|
00006ed0  78 74 28 68 61 6e 64 6c  65 25 28 34 29 2c 38 37  |xt(handle%(4),87|
00006ee0  29 0d 2e a4 23 e7 20 6e  70 61 67 65 25 3d 70 61  |)...#. npage%=pa|
00006ef0  67 65 25 20 e1 20 8b 20  70 61 67 65 25 3d 6e 70  |ge% . . page%=np|
00006f00  61 67 65 25 0d 2e ae 17  62 6c 6f 63 6b 25 21 30  |age%....block%!0|
00006f10  3d 68 61 6e 64 6c 65 25  28 32 29 0d 2e b8 21 c8  |=handle%(2)...!.|
00006f20  99 20 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |. "Wimp_CloseWin|
00006f30  64 6f 77 22 2c 2c 62 6c  6f 63 6b 25 0d 2e c2 16  |dow",,block%....|
00006f40  63 25 3d 28 70 61 67 65  25 2d 31 29 2a 39 31 2b  |c%=(page%-1)*91+|
00006f50  33 32 0d 2e cc 16 73 25  3d 28 70 61 67 65 25 2d  |32....s%=(page%-|
00006f60  31 29 2a 39 31 2b 33 31  0d 2e d6 0a 69 63 25 3d  |1)*91+31....ic%=|
00006f70  31 34 0d 2e e0 05 f5 0d  2e ea 07 20 20 f5 0d 2e  |14.........  ...|
00006f80  f4 16 20 20 20 20 e7 20  69 63 25 20 83 20 31 34  |..    . ic% . 14|
00006f90  3d 30 20 8c 0d 2e fe 1e  20 20 20 20 20 20 e7 20  |=0 .....      . |
00006fa0  70 61 67 65 25 3d 33 20  80 20 69 63 25 3e 36 39  |page%=3 . ic%>69|
00006fb0  20 8c 0d 2f 08 27 20 20  20 20 20 20 20 20 f2 75  | ../.'        .u|
00006fc0  70 64 61 74 65 5f 69 63  6f 6e 5f 74 65 78 74 28  |pdate_icon_text(|
00006fd0  32 2c 69 63 25 2c 22 22  29 0d 2f 12 0b 20 20 20  |2,ic%,"")./..   |
00006fe0  20 20 20 cc 0d 2f 1c 28  20 20 20 20 20 20 20 20  |   ../.(        |
00006ff0  f2 75 70 64 61 74 65 5f  69 63 6f 6e 5f 74 65 78  |.update_icon_tex|
00007000  74 28 32 2c 69 63 25 2c  c3 73 25 29 0d 2f 26 0b  |t(2,ic%,.s%)./&.|
00007010  20 20 20 20 20 20 cd 0d  2f 30 10 20 20 20 20 20  |      ../0.     |
00007020  20 73 25 2b 3d 31 33 0d  2f 3a 09 20 20 20 20 cd  | s%+=13./:.    .|
00007030  0d 2f 44 0e 20 20 20 20  69 63 25 2b 3d 31 0d 2f  |./D.    ic%+=1./|
00007040  4e 13 20 20 fd 20 69 63  25 20 83 20 31 34 3c 3e  |N.  . ic% . 14<>|
00007050  30 0d 2f 58 10 20 20 e7  20 63 25 3e 32 35 35 20  |0./X.  . c%>255 |
00007060  8c 0d 2f 62 23 20 20 20  20 f2 75 70 64 61 74 65  |../b#    .update|
00007070  5f 69 63 6f 6e 5f 74 65  78 74 28 32 2c 69 63 25  |_icon_text(2,ic%|
00007080  2c 22 22 29 0d 2f 6c 08  20 20 20 cc 0d 2f 76 25  |,"")./l.   ../v%|
00007090  20 20 20 20 20 f2 75 70  64 61 74 65 5f 69 63 6f  |     .update_ico|
000070a0  6e 5f 74 65 78 74 28 32  2c 69 63 25 2c bd 63 25  |n_text(2,ic%,.c%|
000070b0  29 0d 2f 80 08 20 20 20  cd 0d 2f 8a 0b 20 20 63  |)./..   ../..  c|
000070c0  25 2b 3d 31 0d 2f 94 0d  fd 20 69 63 25 3d 31 31  |%+=1./... ic%=11|
000070d0  31 0d 2f 9e 16 f2 63 6c  6f 73 65 28 68 61 6e 64  |1./...close(hand|
000070e0  6c 65 25 28 33 29 29 0d  2f a8 05 e1 0d 2f b2 05  |le%(3))./..../..|
000070f0  3a 0d 2f bc 0f dd f2 73  61 76 65 28 70 6e 24 29  |:./....save(pn$)|
00007100  0d 2f c6 32 66 25 3d bb  a4 72 65 61 64 5f 69 6e  |./.2f%=..read_in|
00007110  64 69 72 65 63 74 65 64  5f 69 63 6f 6e 5f 74 65  |directed_icon_te|
00007120  78 74 28 68 61 6e 64 6c  65 25 28 34 29 2c 31 31  |xt(handle%(4),11|
00007130  36 29 0d 2f d0 32 74 25  3d bb a4 72 65 61 64 5f  |6)./.2t%=..read_|
00007140  69 6e 64 69 72 65 63 74  65 64 5f 69 63 6f 6e 5f  |indirected_icon_|
00007150  74 65 78 74 28 68 61 6e  64 6c 65 25 28 34 29 2c  |text(handle%(4),|
00007160  31 32 31 29 0d 2f da 0a  74 24 3d c3 74 25 0d 2f  |121)./..t$=.t%./|
00007170  e4 17 e7 20 a4 63 68 65  63 6b 5f 63 68 61 72 73  |... .check_chars|
00007180  3c 3e 32 20 e1 0d 2f ee  15 c8 99 20 22 48 6f 75  |<>2 ../.... "Hou|
00007190  72 67 6c 61 73 73 5f 4f  6e 22 0d 2f f8 0c 63 25  |rglass_On"./..c%|
000071a0  3d ae 20 70 6e 24 0d 30  02 10 e3 20 70 25 3d 66  |=. pn$.0... p%=f|
000071b0  25 20 b8 20 74 25 0d 30  0c 0d 20 20 d5 23 63 25  |% . t%.0..  .#c%|
000071c0  2c 32 33 0d 30 16 0d 20  20 d5 23 63 25 2c 70 25  |,23.0..  .#c%,p%|
000071d0  0d 30 20 15 20 20 f2 67  65 74 5f 62 69 74 6d 61  |.0 .  .get_bitma|
000071e0  70 28 70 25 29 0d 30 2a  10 20 20 e3 20 62 25 3d  |p(p%).0*.  . b%=|
000071f0  31 20 b8 20 38 0d 30 34  15 20 20 20 20 d5 23 63  |1 . 8.04.    .#c|
00007200  25 2c 62 6d 6c 25 28 62  25 29 0d 30 3e 0a 20 20  |%,bml%(b%).0>.  |
00007210  ed 20 62 25 0d 30 48 08  ed 20 70 25 0d 30 52 08  |. b%.0H.. p%.0R.|
00007220  d9 23 63 25 0d 30 5c 1a  ff 22 53 45 54 54 59 50  |.#c%.0\.."SETTYP|
00007230  45 20 22 2b 70 6e 24 2b  22 20 46 46 37 22 0d 30  |E "+pn$+" FF7".0|
00007240  66 09 63 68 25 3d a3 0d  30 70 1f f2 75 70 64 61  |f.ch%=..0p..upda|
00007250  74 65 5f 69 63 6f 6e 5f  74 65 78 74 28 35 2c 31  |te_icon_text(5,1|
00007260  30 2c 70 6e 24 29 0d 30  7a 1c c8 99 20 22 57 69  |0,pn$).0z... "Wi|
00007270  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
00007280  2d 31 0d 30 84 16 c8 99  20 22 48 6f 75 72 67 6c  |-1.0.... "Hourgl|
00007290  61 73 73 5f 4f 66 66 22  0d 30 8e 05 e1 0d ff     |ass_Off".0.....|
0000729f