Home » Personal collection » Acorn hard disk » zipped_disks » 2000_apps_1 » apps1/Apps/!Calendar/!RunImage
apps1/Apps/!Calendar/!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 » Personal collection » Acorn hard disk » zipped_disks » 2000_apps_1 |
Filename: | apps1/Apps/!Calendar/!RunImage |
Read OK: | ✔ |
File size: | 206E bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Acorn ADFS disks » Greaseweazled » adfs_1.6M_Apps1.adf » Apps/!Calendar/!RunImage
- Personal collection » Acorn hard disk » zipped_disks » 2000_apps_1 » apps1/Apps/!Calendar/!RunImage
File contents
0REM > !RunImage 10REM Calendar 20REM in Archimedes Wimp Environment 30REM Version 4.0 40REM (c) Alex Hopkins May 1989 50: 60SYS "Wimp_Initialise",200,&4B534154,"Calendar" TO ,task 70PROCsetup 80ON ERROR PROCerror : Quit=TRUE 90: 100REPEAT 110PROCpoll(FNpoll(0)) 120UNTIL Quit 130SYS "Wimp_CloseDown" 140END 150: 160DEF PROCsetup 170DIM block &800,menu 150,template% &800,D%(7,7),A$(7) 180DIM Sprites &220,factor% 15,pixtrans% 15 190!Sprites=&220 : Sprites!4=0 : Sprites!8=16 : Sprites!12=0 200SYS "OS_SpriteOp",266,Sprites,"<Calendar$Dir>.Sprites" 210Quit=FALSE : Icon=FNiconbar 220PROCgetModeInfo : PROCloadTemplates 230PROCdateInit 240ENDPROC 250: 260DEF PROCgetModeInfo 270SYS "Wimp_ReadPixTrans",256,Sprites,"larrow",,,,factor%,pixtrans% 280ENDPROC 290: 300DEF PROCloadTemplates 310SYS "Wimp_OpenTemplate",,"<Calendar$Dir>.Templates" 320Info%=FNwindow("info") 330Calendar%=FNwindow("calendar") 340SYS "Wimp_CloseTemplate" 350ENDPROC 360: 370DEF FNwindow(a$) 380LOCAL c%,end% : end%=template%+&800 390SYS "Wimp_LoadTemplate",,block,template%,end%,-1,a$,0 TO ,,template%,,,,c% 400block!64=Sprites 410SYS "Wimp_CreateWindow",,block TO c% 420=c% 430: 440DEF FNpoll(mask%) 450LOCAL a% 460block!0=mask% 470SYS "Wimp_Poll",0,block TO a% 480=a% 490: 500DEF PROCpoll(reason%) 510CASE reason% OF 520WHEN 1 : PROCredrawWindow(block!0) 530WHEN 2 : PROCopenWindow(block!0,TRUE) 540WHEN 3 : PROCcloseWindow(block!0) 550WHEN 4 : IF block!0=Info% THEN 560 : PROCcloseWindow(block!0) 570 : SYS "Wimp_CreateMenu",-1 580ENDIF 590WHEN 6 : PROCcheck(block) 600WHEN 9 : PROCmenuSelect(block) 610WHEN 17,18 : PROCmessage(block) 620ENDCASE 630ENDPROC 640: 650DEF PROCmessage(handle%) 660CASE handle%!16 OF 670WHEN 0 : Quit=TRUE 680WHEN &502 : PROChelp(handle%) 690WHEN &400C1 : PROCgetModeInfo 700ENDCASE 710ENDPROC 720: 730DEF PROChelp(handle%) 740LOCAL text$ : text$="" 750block=handle% : block!12=handle%!8 : block!16=&503 760CASE block!32 OF 770WHEN -2 : text$="This is the Calendar icon.|M" 780 : text$+="Click SELECT to open the Calendar." 790WHEN Calendar% : CASE block!36 OF 800WHEN 18 : text$="This is the Month Back icon.|M" 810 : text$+="Click SELECT to move back one month." 820WHEN 19 : text$="This is the Month Forward icon.|M" 830 : text$+="Click SELECT to move forward one month." 840WHEN 20 : text$="This is the Year Back icon.|M" 850 : text$+="Click SELECT to move back one year." 860WHEN 21 : text$="This is the Year Forward icon.|M" 870 : text$+="Click SELECT to move forward one year." 880ENDCASE 890ENDCASE 900$(block+20)=text$ : block!0=(((20+LEN(text$)+1)DIV4)*4)+4 910$(block+21+LEN(text$))=CHR$(0) 920SYS "Wimp_SendMessage",17,block 930ENDPROC 940: 950DEF PROCopenWindow(handle%,full%) 960block!0=handle% 970IF NOT full% THEN SYS "Wimp_GetWindowState",0,block : block!28=-1 980SYS "Wimp_OpenWindow",0,block 990ENDPROC 1000: 1010DEF PROCredrawWindow(handle%) 1020LOCAL more%,x0%,y0% : block!0=handle% 1030SYS "Wimp_RedrawWindow",0,block TO more% 1040x0%=block!4 : y0%=block!8 1050WHILE more% 1060IF handle%=Calendar% THEN PROCupdateCalendar 1070SYS "Wimp_GetRectangle",0,block TO more% 1080ENDWHILE 1090ENDPROC 1100: 1110DEF PROCcloseWindow(handle%) 1120block!0=handle% 1130SYS "Wimp_CloseWindow",0,block 1140ENDPROC 1150: 1160DEF PROCcheck(block) 1170LOCAL mx%,my%,sx%,sy%,x0%,y0%,button%,handle%,icon% 1180mx%=block!0 : my%=block!4 1190button%=block!8 : handle%=block!12 : icon%=block!16 1200IF button% AND 2 THEN PROCmenu(block) : ENDPROC 1210IF handle%=-2 AND icon%=Icon THEN 1220 : PROCopenWindow(Calendar%,FALSE) 1230 : PROCupdateCalendar : ENDPROC 1240ENDIF 1250block!0=handle% : SYS "Wimp_GetWindowInfo",0,block 1260x0%=block!4 : y0%=block!8 1270sx%=mx%-x0% : sy%=my%-y0% 1280IF handle%=Calendar% THEN PROCcalendarSelect(icon%) 1290ENDPROC 1300: 1310DEF PROCmenu(b) 1320CASE b!12 OF 1330WHEN -2 : PROCdrawMenu(1,"Calendar,Info,Quit") 1340 : SYS "Wimp_CreateMenu",,menu+4,!b-64,176 1350ENDCASE 1360ENDPROC 1370: 1380DEF PROCmenuSelect(b) 1390CASE !menu OF 1400WHEN 1 : PROCiconbarMenu(b) 1410ENDCASE 1420ENDPROC 1430: 1440DEF PROCiconbarMenu(b) 1450CASE !b OF 1460WHEN 0 : PROCopenWindow(Info%,FALSE) 1470WHEN 1 : Quit=TRUE 1480ENDCASE 1490ENDPROC 1500: 1510DEF PROCgetIconInfo(handle%,icon%) 1520block!0=handle% : block!4=icon% 1530SYS "Wimp_GetIconState",,block 1540ix0%=block!8 : iy0%=block!12 : ix1%=block!16 : iy1%=block!20 1550flags%=block!24 1560IF (flags% AND &100)>0 THEN 1570 : text$=$block!28 1580ELSE : text$=$(block+28) 1590ENDIF 1600ENDPROC 1610: 1620DEF PROCdeleteIcon(handle%,icon%) 1630block!0=handle% : block!4=icon% 1640SYS "Wimp_DeleteIcon",,block 1650ENDPROC 1660: 1670DEF PROCupdateCalendar 1680LOCAL a%,i%,data$ 1690PROCmonth(Y%,M%,1) 1700PROCgetIconInfo(Calendar%,9) : PROCdeleteIcon(Calendar%,9) 1710data$=M$ 1720i%=FNcreateIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) 1730SYS "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% 1740PROCgetIconInfo(Calendar%,10) : PROCdeleteIcon(Calendar%,10) 1750data$=Year$ 1760i%=FNcreateIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) 1770SYS "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% 1780FOR a%=1 TO 7 1790PROCgetIconInfo(Calendar%,a%+10) : PROCdeleteIcon(Calendar%,a%+10) 1800data$=A$(a%) 1810i%=FNcreateIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) 1820SYS "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% 1830NEXT 1840ENDPROC 1850: 1860DEF PROCcalendarSelect(icon%) 1870CASE icon% OF 1880WHEN 18 : M%-=1 : IF M%<1 THEN M%=12 : Y%-=1 1890 : PROCupdateCalendar 1900WHEN 19 : M%+=1 : IF M%>12 THEN M%=1 : Y%+=1 1910 : PROCupdateCalendar 1920WHEN 20 : Y%-=1 : PROCupdateCalendar 1930WHEN 21 : Y%+=1 : PROCupdateCalendar 1940ENDCASE 1950ENDPROC 1960: 1970DEF PROCdrawMenu(handle%,menu$) 1980!menu=handle% 1990menu?16=7 : menu?17=2 : menu?18=7 : menu?19=0 2000menu!20=156 : menu!24=40 : menu!28=0 2010ptr=menu+32 2020$(menu+4)=LEFT$(menu$,INSTR(menu$,",")-1) 2030menu$+="," : WHILE menu$<>"" 2040menu$=MID$(menu$,INSTR(menu$,",")+1) 2050IF LEFT$(menu$,4)="Info" THEN 2060 : !ptr=0 : ptr!4=Info% : ptr!8=&7000021 2070 : $(ptr+12)=LEFT$(menu$,INSTR(menu$,",")-1) 2080 : ptr+=24 2090ELSE : IF menu$<>"" THEN 2100 : !ptr=0 : ptr!4=-1 : ptr!8=&7000021 2110 : $(ptr+12)=LEFT$(menu$,INSTR(menu$,",")-1) 2120 : ptr+=24 2130ENDIF 2140ENDIF 2150ENDWHILE 2160ptr!-24=ptr!-24 OR &80 2170ENDPROC 2180: 2190DEF FNcreateIcon(handle%,ix0%,iy0%,ix1%,iy1%,flags%,data$) 2200block!0=handle% : block!4=ix0% : block!8=iy0% 2210block!12=ix1% : block!16=iy1% : block!20=flags% 2220DIM block!24 (LEN data$+1) : $(block!24)=data$ 2230block!28=-1 : block!32=LEN data$+1 2240SYS "Wimp_CreateIcon",,block TO icon% 2250=icon% 2260: 2270DEF FNiconbar 2280LOCAL data$ 2290!block=-1 : block!4=0 : block!8=0 : block!12=68 : block!16=68 : block!20=&3102 2300data$="!calendar" 2310DIM block!24 (LEN data$+1) : $(block!24)=data$ 2320block!28=1 : block!32=LEN data$+1 2330SYS "Wimp_CreateIcon",,block TO icon% 2340=icon% 2350: 2360DEF PROCerror 2370SYS "Wimp_DragBox",,-1 2380!block=ERR : $(block+4)=REPORT$+" at line "+STR$ERL+CHR$0 2390SYS "Wimp_ReportError",block,1,"Address Book" 2400ENDPROC 2410: 2420DEF PROCdateInit 2430LOCAL M$ 2440Y%=VAL(MID$(TIME$,12,4)) : M$=MID$(TIME$,8,3) 2450CASE M$ OF 2460WHEN "Jan" : M%=1 2470WHEN "Feb" : M%=2 2480WHEN "Mar" : M%=3 2490WHEN "Apr" : M%=4 2500WHEN "May" : M%=5 2510WHEN "Jun" : M%=6 2520WHEN "Jul" : M%=7 2530WHEN "Aug" : M%=8 2540WHEN "Sep" : M%=9 2550WHEN "Oct" : M%=10 2560WHEN "Nov" : M%=11 2570WHEN "Dec" : M%=12 2580ENDCASE 2590ENDPROC 2600: 2610DEF PROCyear(Y%) 2620LOCAL i% 2630PROCgetIconInfo(Calendar%,10) : PROCdeleteIcon(Calendar%,10) 2640Year$=STR$(Y%) 2650i%=FNcreateIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,Year$) 2660ENDPROC 2670: 2680DEF PROCmonth(Y%,M%,z%) 2690PROCcalc(Y%,M%) : PROCyear(Y%) 2700IF z%=2 THEN 2710 : PRINT'" "Month$" "Year$' 2720 : PRINT" MONDAY "+A1$ 2730 : PRINT" TUESDAY "+A2$ 2740 : PRINT" WEDNESDAY"+A3$ 2750 : PRINT" THURSDAY "+A4$ 2760 : PRINT" FRIDAY "+A5$ 2770 : PRINT" SATURDAY "+A6$ 2780 : PRINT" SUNDAY "+A7$ 2790 : ENDPROC 2800ENDIF 2810ENDPROC 2820: 2830DEF PROCcalc(Y%,M%) 2840LOCAL a%,b%,leap%,days%,offset%,col%,row%,F%,a$ 2850CASE (Y% AND 3) OF 2860WHEN 0 : CASE TRUE OF 2870WHEN (Y% MOD 100)=0 : CASE ((Y% DIV 100)AND 3) OF 2880WHEN 0 : leap%=1 2890WHEN 1,2,3 : leap%=0 2900ENDCASE 2910OTHERWISE : leap%=1 2920ENDCASE 2930WHEN 1,2,3 : leap%=0 2940ENDCASE 2950CASE M% OF 2960WHEN 1,3,5,7,8,10,12 : days%=31 2970WHEN 2 : days%=28+leap% 2980WHEN 4,6,9,11 : days%=30 2990ENDCASE 3000a%=Y% 3010offset%=(6+a%+(a%-1)DIV 4-(a%-1)DIV 100+(a%-1)DIV 400)MOD 7 3020IF M%>2 THEN offset%=(offset%+leap%)MOD 7 3030CASE M% OF 3040WHEN 1 : F%=offset% : M$="JANUARY " 3050WHEN 2 : F%=(offset%+3)MOD 7 : M$="FEBRUARY " 3060WHEN 3 : F%=(offset%+3)MOD 7 : M$="MARCH " 3070WHEN 4 : F%=(offset%+6)MOD 7 : M$="APRIL " 3080WHEN 5 : F%=(offset%+1)MOD 7 : M$="MAY " 3090WHEN 6 : F%=(offset%+4)MOD 7 : M$="JUNE " 3100WHEN 7 : F%=(offset%+6)MOD 7 : M$="JULY " 3110WHEN 8 : F%=(offset%+2)MOD 7 : M$="AUGUST " 3120WHEN 9 : F%=(offset%+5)MOD 7 : M$="SEPTEMBER " 3130WHEN 10 : F%=offset% : M$="OCTOBER " 3140WHEN 11 : F%=(offset%+3)MOD 7 : M$="NOVEMBER " 3150WHEN 12 : F%=(offset%+5)MOD 7 : M$="DECEMBER " 3160ENDCASE 3170D%()=0 : A$()="" 3180FOR a%=0 TO days%-1 3190col%=(a%+F%)MOD 7 : row%=(a%+F%)DIV 7 3200D%(col%+1,row%+1)=(a%+1) 3210NEXT 3220FOR a%=1 TO 6 : FOR b%=1 TO 7 3230a$=" "+STR$(D%(b%,a%)) 3240IF LEN(a$)=3 THEN a$+=" " 3250IF a$=" 0 " THEN a$=" " 3260A$(b%)+=a$ 3270NEXT b% : NEXT a% 3280ENDPROC
� > !RunImage � Calendar $� in Archimedes Wimp Environment � Version 4.0 (� (c) Alex Hopkins May 1989 2: <9ș "Wimp_Initialise",200,&4B534154,"Calendar" � ,task F �setup P� � �error : Quit=� Z: d� n�poll(�poll(0)) x � Quit �ș "Wimp_CloseDown" �� �: �� �setup �6� block &800,menu 150,template% &800,D%(7,7),A$(7) �*� Sprites &220,factor% 15,pixtrans% 15 �=!Sprites=&220 : Sprites!4=0 : Sprites!8=16 : Sprites!12=0 �9ș "OS_SpriteOp",266,Sprites,"<Calendar$Dir>.Sprites" �Quit=� : Icon=�iconbar �!�getModeInfo : �loadTemplates � �dateInit �� �: � �getModeInfo Dș "Wimp_ReadPixTrans",256,Sprites,"larrow",,,,factor%,pixtrans% � ": ,� �loadTemplates 66ș "Wimp_OpenTemplate",,"<Calendar$Dir>.Templates" @Info%=�window("info") J!Calendar%=�window("calendar") Tș "Wimp_CloseTemplate" ^� h: r� �window(a$) |#� c%,end% : end%=template%+&800 �Lș "Wimp_LoadTemplate",,block,template%,end%,-1,a$,0 � ,,template%,,,,c% �block!64=Sprites �&ș "Wimp_CreateWindow",,block � c% �=c% �: �� �poll(mask%) �� a% �block!0=mask% �ș "Wimp_Poll",0,block � a% �=a% �: �� �poll(reason%) �Ȏ reason% � � 1 : �redrawWindow(block!0) � 2 : �openWindow(block!0,�) � 3 : �closeWindow(block!0) &� 4 : � block!0=Info% � 0" : �closeWindow(block!0) :$ : ș "Wimp_CreateMenu",-1 D� N� 6 : �check(block) X� 9 : �menuSelect(block) b� 17,18 : �message(block) l� v� �: �� �message(handle%) �Ȏ handle%!16 � �� 0 : Quit=� �� &502 : �help(handle%) �� &400C1 : �getModeInfo �� �� �: �� �help(handle%) �� text$ : text$="" �6block=handle% : block!12=handle%!8 : block!16=&503 �Ȏ block!32 � /� -2 : text$="This is the Calendar icon.|M" 9 : text$+="Click SELECT to open the Calendar." � Calendar% : Ȏ block!36 � 1� 18 : text$="This is the Month Back icon.|M" *; : text$+="Click SELECT to move back one month." 44� 19 : text$="This is the Month Forward icon.|M" >> : text$+="Click SELECT to move forward one month." H0� 20 : text$="This is the Year Back icon.|M" R: : text$+="Click SELECT to move back one year." \3� 21 : text$="This is the Year Forward icon.|M" f= : text$+="Click SELECT to move forward one year." p� z� �9$(block+20)=text$ : block!0=(((20+�(text$)+1)�4)*4)+4 �$(block+21+�(text$))=�(0) �"ș "Wimp_SendMessage",17,block �� �: � � �openWindow(handle%,full%) �block!0=handle% �>� � full% � ș "Wimp_GetWindowState",0,block : block!28=-1 � ș "Wimp_OpenWindow",0,block �� �: �� �redrawWindow(handle%) �%� more%,x0%,y0% : block!0=handle% *ș "Wimp_RedrawWindow",0,block � more% x0%=block!4 : y0%=block!8 ȕ more% $)� handle%=Calendar% � �updateCalendar .*ș "Wimp_GetRectangle",0,block � more% 8� B� L: V� �closeWindow(handle%) `block!0=handle% j!ș "Wimp_CloseWindow",0,block t� ~: �� �check(block) �3� mx%,my%,sx%,sy%,x0%,y0%,button%,handle%,icon% �mx%=block!0 : my%=block!4 �7button%=block!8 : handle%=block!12 : icon%=block!16 �$� button% � 2 � �menu(block) : � �� handle%=-2 � icon%=Icon � �# : �openWindow(Calendar%,�) � : �updateCalendar : � �� �5block!0=handle% : ș "Wimp_GetWindowInfo",0,block �x0%=block!4 : y0%=block!8 �sx%=mx%-x0% : sy%=my%-y0% 0� handle%=Calendar% � �calendarSelect(icon%) � : � �menu(b) ( Ȏ b!12 � 2,� -2 : �drawMenu(1,"Calendar,Info,Quit") <4 : ș "Wimp_CreateMenu",,menu+4,!b-64,176 F� P� Z: d� �menuSelect(b) nȎ !menu � x� 1 : �iconbarMenu(b) �� �� �: �� �iconbarMenu(b) �Ȏ !b � �� 0 : �openWindow(Info%,�) �� 1 : Quit=� �� �� �: �!� �getIconInfo(handle%,icon%) �#block!0=handle% : block!4=icon% �!ș "Wimp_GetIconState",,block @ix0%=block!8 : iy0%=block!12 : ix1%=block!16 : iy1%=block!20 flags%=block!24 � (flags% � &100)>0 � " : text$=$block!28 ,� : text$=$(block+28) 6� @� J: T � �deleteIcon(handle%,icon%) ^#block!0=handle% : block!4=icon% hș "Wimp_DeleteIcon",,block r� |: �� �updateCalendar �� a%,i%,data$ ��month(Y%,M%,1) �8�getIconInfo(Calendar%,9) : �deleteIcon(Calendar%,9) �data$=M$ �>i%=�createIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) �7ș "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% �:�getIconInfo(Calendar%,10) : �deleteIcon(Calendar%,10) �data$=Year$ �>i%=�createIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) �7ș "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% �� a%=1 � 7 �@�getIconInfo(Calendar%,a%+10) : �deleteIcon(Calendar%,a%+10) data$=A$(a%) >i%=�createIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,data$) 7ș "Wimp_ForceRedraw",Calendar%,ix0%,iy0%,ix1%,iy1% &� 0� :: D� �calendarSelect(icon%) NȎ icon% � X)� 18 : M%-=1 : � M%<1 � M%=12 : Y%-=1 b : �updateCalendar l)� 19 : M%+=1 : � M%>12 � M%=1 : Y%+=1 v : �updateCalendar �"� 20 : Y%-=1 : �updateCalendar �"� 21 : Y%+=1 : �updateCalendar �� �� �: �� �drawMenu(handle%,menu$) �!menu=handle% �1menu?16=7 : menu?17=2 : menu?18=7 : menu?19=0 �(menu!20=156 : menu!24=40 : menu!28=0 �ptr=menu+32 �#$(menu+4)=�menu$,�menu$,",")-1) �menu$+="," : ȕ menu$<>"" �menu$=�menu$,�menu$,",")+1) � �menu$,4)="Info" � 0 : !ptr=0 : ptr!4=Info% : ptr!8=&7000021 * : $(ptr+12)=�menu$,�menu$,",")-1) : ptr+=24 *� : � menu$<>"" � 4- : !ptr=0 : ptr!4=-1 : ptr!8=&7000021 >* : $(ptr+12)=�menu$,�menu$,",")-1) H : ptr+=24 R� \� f� pptr!-24=ptr!-24 � &80 z� �: �;� �createIcon(handle%,ix0%,iy0%,ix1%,iy1%,flags%,data$) �1block!0=handle% : block!4=ix0% : block!8=iy0% �3block!12=ix1% : block!16=iy1% : block!20=flags% �.� block!24 (� data$+1) : $(block!24)=data$ �$block!28=-1 : block!32=� data$+1 �'ș "Wimp_CreateIcon",,block � icon% � =icon% �: �� �iconbar �� data$ �R!block=-1 : block!4=0 : block!8=0 : block!12=68 : block!16=68 : block!20=&3102 �data$="!calendar" .� block!24 (� data$+1) : $(block!24)=data$ #block!28=1 : block!32=� data$+1 'ș "Wimp_CreateIcon",,block � icon% $ =icon% .: 8� �error Bș "Wimp_DragBox",,-1 L.!block=� : $(block+4)=�$+" at line "+Þ+�0 V0ș "Wimp_ReportError",block,1,"Address Book" `� j: t� �dateInit ~� M$ �!Y%=�(��$,12,4)) : M$=��$,8,3) �Ȏ M$ � �� "Jan" : M%=1 �� "Feb" : M%=2 �� "Mar" : M%=3 �� "Apr" : M%=4 �� "May" : M%=5 �� "Jun" : M%=6 �� "Jul" : M%=7 �� "Aug" : M%=8 �� "Sep" : M%=9 �� "Oct" : M%=10 � "Nov" : M%=11 � "Dec" : M%=12 � � (: 2� �year(Y%) <� i% F:�getIconInfo(Calendar%,10) : �deleteIcon(Calendar%,10) PYear$=�(Y%) Z>i%=�createIcon(Calendar%,ix0%,iy0%,ix1%,iy1%,flags%,Year$) d� n: x� �month(Y%,M%,z%) ��calc(Y%,M%) : �year(Y%) �� z%=2 � � : �'" "Month$" "Year$' � : �" MONDAY "+A1$ � : �" TUESDAY "+A2$ � : �" WEDNESDAY"+A3$ � : �" THURSDAY "+A4$ � : �" FRIDAY "+A5$ � : �" SATURDAY "+A6$ � : �" SUNDAY "+A7$ � : � �� �� : � �calc(Y%,M%) /� a%,b%,leap%,days%,offset%,col%,row%,F%,a$ "Ȏ (Y% � 3) � ,� 0 : Ȏ � � 6)� (Y% � 100)=0 : Ȏ ((Y% � 100)� 3) � @� 0 : leap%=1 J� 1,2,3 : leap%=0 T� ^ : leap%=1 h� r� 1,2,3 : leap%=0 |� �Ȏ M% � � � 1,3,5,7,8,10,12 : days%=31 �&� 2 : days%=28+leap% � � 4,6,9,11 : days%=30 �� � a%=Y% �7offset%=(6+a%+(a%-1)� 4-(a%-1)� 100+(a%-1)� 400)� 7 �'� M%>2 � offset%=(offset%+leap%)� 7 �Ȏ M% � �0� 1 : F%=offset% : M$="JANUARY " �.� 2 : F%=(offset%+3)� 7 : M$="FEBRUARY " �.� 3 : F%=(offset%+3)� 7 : M$="MARCH " �.� 4 : F%=(offset%+6)� 7 : M$="APRIL " .� 5 : F%=(offset%+1)� 7 : M$="MAY " .� 6 : F%=(offset%+4)� 7 : M$="JUNE " .� 7 : F%=(offset%+6)� 7 : M$="JULY " &.� 8 : F%=(offset%+2)� 7 : M$="AUGUST " 0.� 9 : F%=(offset%+5)� 7 : M$="SEPTEMBER " :0� 10 : F%=offset% : M$="OCTOBER " D.� 11 : F%=(offset%+3)� 7 : M$="NOVEMBER " N.� 12 : F%=(offset%+5)� 7 : M$="DECEMBER " X� bD%()=0 : A$()="" l� a%=0 � days%-1 v%col%=(a%+F%)� 7 : row%=(a%+F%)� 7 �D%(col%+1,row%+1)=(a%+1) �� �� a%=1 � 6 : � b%=1 � 7 �a$=" "+�(D%(b%,a%)) �� �(a$)=3 � a$+=" " �� a$=" 0 " � a$=" " �A$(b%)+=a$ �� b% : � a% �� �
00000000 0d 00 00 11 f4 20 3e 20 21 52 75 6e 49 6d 61 67 |..... > !RunImag| 00000010 65 0d 00 0a 0e f4 20 43 61 6c 65 6e 64 61 72 0d |e..... Calendar.| 00000020 00 14 24 f4 20 69 6e 20 41 72 63 68 69 6d 65 64 |..$. in Archimed| 00000030 65 73 20 57 69 6d 70 20 45 6e 76 69 72 6f 6e 6d |es Wimp Environm| 00000040 65 6e 74 0d 00 1e 11 f4 20 56 65 72 73 69 6f 6e |ent..... Version| 00000050 20 34 2e 30 0d 00 28 1f f4 20 28 63 29 20 41 6c | 4.0..(.. (c) Al| 00000060 65 78 20 48 6f 70 6b 69 6e 73 20 4d 61 79 20 31 |ex Hopkins May 1| 00000070 39 38 39 0d 00 32 05 3a 0d 00 3c 39 c8 99 20 22 |989..2.:..<9.. "| 00000080 57 69 6d 70 5f 49 6e 69 74 69 61 6c 69 73 65 22 |Wimp_Initialise"| 00000090 2c 32 30 30 2c 26 34 42 35 33 34 31 35 34 2c 22 |,200,&4B534154,"| 000000a0 43 61 6c 65 6e 64 61 72 22 20 b8 20 2c 74 61 73 |Calendar" . ,tas| 000000b0 6b 0d 00 46 0a f2 73 65 74 75 70 0d 00 50 17 ee |k..F..setup..P..| 000000c0 20 85 20 f2 65 72 72 6f 72 20 3a 20 51 75 69 74 | . .error : Quit| 000000d0 3d b9 0d 00 5a 05 3a 0d 00 64 05 f5 0d 00 6e 13 |=...Z.:..d....n.| 000000e0 f2 70 6f 6c 6c 28 a4 70 6f 6c 6c 28 30 29 29 0d |.poll(.poll(0)).| 000000f0 00 78 0a fd 20 51 75 69 74 0d 00 82 17 c8 99 20 |.x.. Quit...... | 00000100 22 57 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 |"Wimp_CloseDown"| 00000110 0d 00 8c 05 e0 0d 00 96 05 3a 0d 00 a0 0c dd 20 |.........:..... | 00000120 f2 73 65 74 75 70 0d 00 aa 36 de 20 62 6c 6f 63 |.setup...6. bloc| 00000130 6b 20 26 38 30 30 2c 6d 65 6e 75 20 31 35 30 2c |k &800,menu 150,| 00000140 74 65 6d 70 6c 61 74 65 25 20 26 38 30 30 2c 44 |template% &800,D| 00000150 25 28 37 2c 37 29 2c 41 24 28 37 29 0d 00 b4 2a |%(7,7),A$(7)...*| 00000160 de 20 53 70 72 69 74 65 73 20 26 32 32 30 2c 66 |. Sprites &220,f| 00000170 61 63 74 6f 72 25 20 31 35 2c 70 69 78 74 72 61 |actor% 15,pixtra| 00000180 6e 73 25 20 31 35 0d 00 be 3d 21 53 70 72 69 74 |ns% 15...=!Sprit| 00000190 65 73 3d 26 32 32 30 20 3a 20 53 70 72 69 74 65 |es=&220 : Sprite| 000001a0 73 21 34 3d 30 20 3a 20 53 70 72 69 74 65 73 21 |s!4=0 : Sprites!| 000001b0 38 3d 31 36 20 3a 20 53 70 72 69 74 65 73 21 31 |8=16 : Sprites!1| 000001c0 32 3d 30 0d 00 c8 39 c8 99 20 22 4f 53 5f 53 70 |2=0...9.. "OS_Sp| 000001d0 72 69 74 65 4f 70 22 2c 32 36 36 2c 53 70 72 69 |riteOp",266,Spri| 000001e0 74 65 73 2c 22 3c 43 61 6c 65 6e 64 61 72 24 44 |tes,"<Calendar$D| 000001f0 69 72 3e 2e 53 70 72 69 74 65 73 22 0d 00 d2 1a |ir>.Sprites"....| 00000200 51 75 69 74 3d a3 20 3a 20 49 63 6f 6e 3d a4 69 |Quit=. : Icon=.i| 00000210 63 6f 6e 62 61 72 0d 00 dc 21 f2 67 65 74 4d 6f |conbar...!.getMo| 00000220 64 65 49 6e 66 6f 20 3a 20 f2 6c 6f 61 64 54 65 |deInfo : .loadTe| 00000230 6d 70 6c 61 74 65 73 0d 00 e6 0d f2 64 61 74 65 |mplates.....date| 00000240 49 6e 69 74 0d 00 f0 05 e1 0d 00 fa 05 3a 0d 01 |Init.........:..| 00000250 04 12 dd 20 f2 67 65 74 4d 6f 64 65 49 6e 66 6f |... .getModeInfo| 00000260 0d 01 0e 44 c8 99 20 22 57 69 6d 70 5f 52 65 61 |...D.. "Wimp_Rea| 00000270 64 50 69 78 54 72 61 6e 73 22 2c 32 35 36 2c 53 |dPixTrans",256,S| 00000280 70 72 69 74 65 73 2c 22 6c 61 72 72 6f 77 22 2c |prites,"larrow",| 00000290 2c 2c 2c 66 61 63 74 6f 72 25 2c 70 69 78 74 72 |,,,factor%,pixtr| 000002a0 61 6e 73 25 0d 01 18 05 e1 0d 01 22 05 3a 0d 01 |ans%.......".:..| 000002b0 2c 14 dd 20 f2 6c 6f 61 64 54 65 6d 70 6c 61 74 |,.. .loadTemplat| 000002c0 65 73 0d 01 36 36 c8 99 20 22 57 69 6d 70 5f 4f |es..66.. "Wimp_O| 000002d0 70 65 6e 54 65 6d 70 6c 61 74 65 22 2c 2c 22 3c |penTemplate",,"<| 000002e0 43 61 6c 65 6e 64 61 72 24 44 69 72 3e 2e 54 65 |Calendar$Dir>.Te| 000002f0 6d 70 6c 61 74 65 73 22 0d 01 40 19 49 6e 66 6f |mplates"..@.Info| 00000300 25 3d a4 77 69 6e 64 6f 77 28 22 69 6e 66 6f 22 |%=.window("info"| 00000310 29 0d 01 4a 21 43 61 6c 65 6e 64 61 72 25 3d a4 |)..J!Calendar%=.| 00000320 77 69 6e 64 6f 77 28 22 63 61 6c 65 6e 64 61 72 |window("calendar| 00000330 22 29 0d 01 54 1b c8 99 20 22 57 69 6d 70 5f 43 |")..T... "Wimp_C| 00000340 6c 6f 73 65 54 65 6d 70 6c 61 74 65 22 0d 01 5e |loseTemplate"..^| 00000350 05 e1 0d 01 68 05 3a 0d 01 72 11 dd 20 a4 77 69 |....h.:..r.. .wi| 00000360 6e 64 6f 77 28 61 24 29 0d 01 7c 23 ea 20 63 25 |ndow(a$)..|#. c%| 00000370 2c 65 6e 64 25 20 3a 20 65 6e 64 25 3d 74 65 6d |,end% : end%=tem| 00000380 70 6c 61 74 65 25 2b 26 38 30 30 0d 01 86 4c c8 |plate%+&800...L.| 00000390 99 20 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 |. "Wimp_LoadTemp| 000003a0 6c 61 74 65 22 2c 2c 62 6c 6f 63 6b 2c 74 65 6d |late",,block,tem| 000003b0 70 6c 61 74 65 25 2c 65 6e 64 25 2c 2d 31 2c 61 |plate%,end%,-1,a| 000003c0 24 2c 30 20 b8 20 2c 2c 74 65 6d 70 6c 61 74 65 |$,0 . ,,template| 000003d0 25 2c 2c 2c 2c 63 25 0d 01 90 14 62 6c 6f 63 6b |%,,,,c%....block| 000003e0 21 36 34 3d 53 70 72 69 74 65 73 0d 01 9a 26 c8 |!64=Sprites...&.| 000003f0 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 |. "Wimp_CreateWi| 00000400 6e 64 6f 77 22 2c 2c 62 6c 6f 63 6b 20 b8 20 63 |ndow",,block . c| 00000410 25 0d 01 a4 07 3d 63 25 0d 01 ae 05 3a 0d 01 b8 |%....=c%....:...| 00000420 12 dd 20 a4 70 6f 6c 6c 28 6d 61 73 6b 25 29 0d |.. .poll(mask%).| 00000430 01 c2 08 ea 20 61 25 0d 01 cc 11 62 6c 6f 63 6b |.... a%....block| 00000440 21 30 3d 6d 61 73 6b 25 0d 01 d6 1f c8 99 20 22 |!0=mask%...... "| 00000450 57 69 6d 70 5f 50 6f 6c 6c 22 2c 30 2c 62 6c 6f |Wimp_Poll",0,blo| 00000460 63 6b 20 b8 20 61 25 0d 01 e0 07 3d 61 25 0d 01 |ck . a%....=a%..| 00000470 ea 05 3a 0d 01 f4 14 dd 20 f2 70 6f 6c 6c 28 72 |..:..... .poll(r| 00000480 65 61 73 6f 6e 25 29 0d 01 fe 10 c8 8e 20 72 65 |eason%)...... re| 00000490 61 73 6f 6e 25 20 ca 0d 02 08 20 c9 20 31 20 3a |ason% .... . 1 :| 000004a0 20 f2 72 65 64 72 61 77 57 69 6e 64 6f 77 28 62 | .redrawWindow(b| 000004b0 6c 6f 63 6b 21 30 29 0d 02 12 20 c9 20 32 20 3a |lock!0)... . 2 :| 000004c0 20 f2 6f 70 65 6e 57 69 6e 64 6f 77 28 62 6c 6f | .openWindow(blo| 000004d0 63 6b 21 30 2c b9 29 0d 02 1c 1f c9 20 33 20 3a |ck!0,.)..... 3 :| 000004e0 20 f2 63 6c 6f 73 65 57 69 6e 64 6f 77 28 62 6c | .closeWindow(bl| 000004f0 6f 63 6b 21 30 29 0d 02 26 1b c9 20 34 20 3a 20 |ock!0)..&.. 4 : | 00000500 e7 20 62 6c 6f 63 6b 21 30 3d 49 6e 66 6f 25 20 |. block!0=Info% | 00000510 8c 0d 02 30 22 20 20 20 20 20 20 20 3a 20 f2 63 |...0" : .c| 00000520 6c 6f 73 65 57 69 6e 64 6f 77 28 62 6c 6f 63 6b |loseWindow(block| 00000530 21 30 29 0d 02 3a 24 20 20 20 20 20 20 20 3a 20 |!0)..:$ : | 00000540 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d |.. "Wimp_CreateM| 00000550 65 6e 75 22 2c 2d 31 0d 02 44 05 cd 0d 02 4e 17 |enu",-1..D....N.| 00000560 c9 20 36 20 3a 20 f2 63 68 65 63 6b 28 62 6c 6f |. 6 : .check(blo| 00000570 63 6b 29 0d 02 58 1c c9 20 39 20 3a 20 f2 6d 65 |ck)..X.. 9 : .me| 00000580 6e 75 53 65 6c 65 63 74 28 62 6c 6f 63 6b 29 0d |nuSelect(block).| 00000590 02 62 1d c9 20 31 37 2c 31 38 20 3a 20 f2 6d 65 |.b.. 17,18 : .me| 000005a0 73 73 61 67 65 28 62 6c 6f 63 6b 29 0d 02 6c 05 |ssage(block)..l.| 000005b0 cb 0d 02 76 05 e1 0d 02 80 05 3a 0d 02 8a 17 dd |...v......:.....| 000005c0 20 f2 6d 65 73 73 61 67 65 28 68 61 6e 64 6c 65 | .message(handle| 000005d0 25 29 0d 02 94 13 c8 8e 20 68 61 6e 64 6c 65 25 |%)...... handle%| 000005e0 21 31 36 20 ca 0d 02 9e 15 c9 20 30 20 20 20 20 |!16 ...... 0 | 000005f0 20 20 3a 20 51 75 69 74 3d b9 0d 02 a8 1d c9 20 | : Quit=...... | 00000600 26 35 30 32 20 20 20 3a 20 f2 68 65 6c 70 28 68 |&502 : .help(h| 00000610 61 6e 64 6c 65 25 29 0d 02 b2 1b c9 20 26 34 30 |andle%)..... &40| 00000620 30 43 31 20 3a 20 f2 67 65 74 4d 6f 64 65 49 6e |0C1 : .getModeIn| 00000630 66 6f 0d 02 bc 05 cb 0d 02 c6 05 e1 0d 02 d0 05 |fo..............| 00000640 3a 0d 02 da 14 dd 20 f2 68 65 6c 70 28 68 61 6e |:..... .help(han| 00000650 64 6c 65 25 29 0d 02 e4 16 ea 20 74 65 78 74 24 |dle%)..... text$| 00000660 20 3a 20 74 65 78 74 24 3d 22 22 0d 02 ee 36 62 | : text$=""...6b| 00000670 6c 6f 63 6b 3d 68 61 6e 64 6c 65 25 20 3a 20 62 |lock=handle% : b| 00000680 6c 6f 63 6b 21 31 32 3d 68 61 6e 64 6c 65 25 21 |lock!12=handle%!| 00000690 38 20 3a 20 62 6c 6f 63 6b 21 31 36 3d 26 35 30 |8 : block!16=&50| 000006a0 33 0d 02 f8 11 c8 8e 20 62 6c 6f 63 6b 21 33 32 |3...... block!32| 000006b0 20 ca 0d 03 02 2f c9 20 2d 32 20 3a 20 74 65 78 | ..../. -2 : tex| 000006c0 74 24 3d 22 54 68 69 73 20 69 73 20 74 68 65 20 |t$="This is the | 000006d0 43 61 6c 65 6e 64 61 72 20 69 63 6f 6e 2e 7c 4d |Calendar icon.|M| 000006e0 22 0d 03 0c 39 20 20 20 20 20 20 20 20 3a 20 74 |"...9 : t| 000006f0 65 78 74 24 2b 3d 22 43 6c 69 63 6b 20 53 45 4c |ext$+="Click SEL| 00000700 45 43 54 20 74 6f 20 6f 70 65 6e 20 74 68 65 20 |ECT to open the | 00000710 43 61 6c 65 6e 64 61 72 2e 22 0d 03 16 1f c9 20 |Calendar."..... | 00000720 43 61 6c 65 6e 64 61 72 25 20 3a 20 c8 8e 20 62 |Calendar% : .. b| 00000730 6c 6f 63 6b 21 33 36 20 ca 0d 03 20 31 c9 20 31 |lock!36 ... 1. 1| 00000740 38 20 3a 20 74 65 78 74 24 3d 22 54 68 69 73 20 |8 : text$="This | 00000750 69 73 20 74 68 65 20 4d 6f 6e 74 68 20 42 61 63 |is the Month Bac| 00000760 6b 20 69 63 6f 6e 2e 7c 4d 22 0d 03 2a 3b 20 20 |k icon.|M"..*; | 00000770 20 20 20 20 20 20 3a 20 74 65 78 74 24 2b 3d 22 | : text$+="| 00000780 43 6c 69 63 6b 20 53 45 4c 45 43 54 20 74 6f 20 |Click SELECT to | 00000790 6d 6f 76 65 20 62 61 63 6b 20 6f 6e 65 20 6d 6f |move back one mo| 000007a0 6e 74 68 2e 22 0d 03 34 34 c9 20 31 39 20 3a 20 |nth."..44. 19 : | 000007b0 74 65 78 74 24 3d 22 54 68 69 73 20 69 73 20 74 |text$="This is t| 000007c0 68 65 20 4d 6f 6e 74 68 20 46 6f 72 77 61 72 64 |he Month Forward| 000007d0 20 69 63 6f 6e 2e 7c 4d 22 0d 03 3e 3e 20 20 20 | icon.|M"..>> | 000007e0 20 20 20 20 20 3a 20 74 65 78 74 24 2b 3d 22 43 | : text$+="C| 000007f0 6c 69 63 6b 20 53 45 4c 45 43 54 20 74 6f 20 6d |lick SELECT to m| 00000800 6f 76 65 20 66 6f 72 77 61 72 64 20 6f 6e 65 20 |ove forward one | 00000810 6d 6f 6e 74 68 2e 22 0d 03 48 30 c9 20 32 30 20 |month."..H0. 20 | 00000820 3a 20 74 65 78 74 24 3d 22 54 68 69 73 20 69 73 |: text$="This is| 00000830 20 74 68 65 20 59 65 61 72 20 42 61 63 6b 20 69 | the Year Back i| 00000840 63 6f 6e 2e 7c 4d 22 0d 03 52 3a 20 20 20 20 20 |con.|M"..R: | 00000850 20 20 20 3a 20 74 65 78 74 24 2b 3d 22 43 6c 69 | : text$+="Cli| 00000860 63 6b 20 53 45 4c 45 43 54 20 74 6f 20 6d 6f 76 |ck SELECT to mov| 00000870 65 20 62 61 63 6b 20 6f 6e 65 20 79 65 61 72 2e |e back one year.| 00000880 22 0d 03 5c 33 c9 20 32 31 20 3a 20 74 65 78 74 |"..\3. 21 : text| 00000890 24 3d 22 54 68 69 73 20 69 73 20 74 68 65 20 59 |$="This is the Y| 000008a0 65 61 72 20 46 6f 72 77 61 72 64 20 69 63 6f 6e |ear Forward icon| 000008b0 2e 7c 4d 22 0d 03 66 3d 20 20 20 20 20 20 20 20 |.|M"..f= | 000008c0 3a 20 74 65 78 74 24 2b 3d 22 43 6c 69 63 6b 20 |: text$+="Click | 000008d0 53 45 4c 45 43 54 20 74 6f 20 6d 6f 76 65 20 66 |SELECT to move f| 000008e0 6f 72 77 61 72 64 20 6f 6e 65 20 79 65 61 72 2e |orward one year.| 000008f0 22 0d 03 70 05 cb 0d 03 7a 05 cb 0d 03 84 39 24 |"..p....z.....9$| 00000900 28 62 6c 6f 63 6b 2b 32 30 29 3d 74 65 78 74 24 |(block+20)=text$| 00000910 20 3a 20 62 6c 6f 63 6b 21 30 3d 28 28 28 32 30 | : block!0=(((20| 00000920 2b a9 28 74 65 78 74 24 29 2b 31 29 81 34 29 2a |+.(text$)+1).4)*| 00000930 34 29 2b 34 0d 03 8e 1d 24 28 62 6c 6f 63 6b 2b |4)+4....$(block+| 00000940 32 31 2b a9 28 74 65 78 74 24 29 29 3d bd 28 30 |21+.(text$))=.(0| 00000950 29 0d 03 98 22 c8 99 20 22 57 69 6d 70 5f 53 65 |)...".. "Wimp_Se| 00000960 6e 64 4d 65 73 73 61 67 65 22 2c 31 37 2c 62 6c |ndMessage",17,bl| 00000970 6f 63 6b 0d 03 a2 05 e1 0d 03 ac 05 3a 0d 03 b6 |ock.........:...| 00000980 20 dd 20 f2 6f 70 65 6e 57 69 6e 64 6f 77 28 68 | . .openWindow(h| 00000990 61 6e 64 6c 65 25 2c 66 75 6c 6c 25 29 0d 03 c0 |andle%,full%)...| 000009a0 13 62 6c 6f 63 6b 21 30 3d 68 61 6e 64 6c 65 25 |.block!0=handle%| 000009b0 0d 03 ca 3e e7 20 ac 20 66 75 6c 6c 25 20 8c 20 |...>. . full% . | 000009c0 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 |.. "Wimp_GetWind| 000009d0 6f 77 53 74 61 74 65 22 2c 30 2c 62 6c 6f 63 6b |owState",0,block| 000009e0 20 3a 20 62 6c 6f 63 6b 21 32 38 3d 2d 31 0d 03 | : block!28=-1..| 000009f0 d4 20 c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 |. .. "Wimp_OpenW| 00000a00 69 6e 64 6f 77 22 2c 30 2c 62 6c 6f 63 6b 0d 03 |indow",0,block..| 00000a10 de 05 e1 0d 03 e8 05 3a 0d 03 f2 1c dd 20 f2 72 |.......:..... .r| 00000a20 65 64 72 61 77 57 69 6e 64 6f 77 28 68 61 6e 64 |edrawWindow(hand| 00000a30 6c 65 25 29 0d 03 fc 25 ea 20 6d 6f 72 65 25 2c |le%)...%. more%,| 00000a40 78 30 25 2c 79 30 25 20 3a 20 62 6c 6f 63 6b 21 |x0%,y0% : block!| 00000a50 30 3d 68 61 6e 64 6c 65 25 0d 04 06 2a c8 99 20 |0=handle%...*.. | 00000a60 22 57 69 6d 70 5f 52 65 64 72 61 77 57 69 6e 64 |"Wimp_RedrawWind| 00000a70 6f 77 22 2c 30 2c 62 6c 6f 63 6b 20 b8 20 6d 6f |ow",0,block . mo| 00000a80 72 65 25 0d 04 10 1d 78 30 25 3d 62 6c 6f 63 6b |re%....x0%=block| 00000a90 21 34 20 3a 20 79 30 25 3d 62 6c 6f 63 6b 21 38 |!4 : y0%=block!8| 00000aa0 0d 04 1a 0c c8 95 20 6d 6f 72 65 25 0d 04 24 29 |...... more%..$)| 00000ab0 e7 20 68 61 6e 64 6c 65 25 3d 43 61 6c 65 6e 64 |. handle%=Calend| 00000ac0 61 72 25 20 8c 20 f2 75 70 64 61 74 65 43 61 6c |ar% . .updateCal| 00000ad0 65 6e 64 61 72 0d 04 2e 2a c8 99 20 22 57 69 6d |endar...*.. "Wim| 00000ae0 70 5f 47 65 74 52 65 63 74 61 6e 67 6c 65 22 2c |p_GetRectangle",| 00000af0 30 2c 62 6c 6f 63 6b 20 b8 20 6d 6f 72 65 25 0d |0,block . more%.| 00000b00 04 38 05 ce 0d 04 42 05 e1 0d 04 4c 05 3a 0d 04 |.8....B....L.:..| 00000b10 56 1b dd 20 f2 63 6c 6f 73 65 57 69 6e 64 6f 77 |V.. .closeWindow| 00000b20 28 68 61 6e 64 6c 65 25 29 0d 04 60 13 62 6c 6f |(handle%)..`.blo| 00000b30 63 6b 21 30 3d 68 61 6e 64 6c 65 25 0d 04 6a 21 |ck!0=handle%..j!| 00000b40 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 69 |.. "Wimp_CloseWi| 00000b50 6e 64 6f 77 22 2c 30 2c 62 6c 6f 63 6b 0d 04 74 |ndow",0,block..t| 00000b60 05 e1 0d 04 7e 05 3a 0d 04 88 13 dd 20 f2 63 68 |....~.:..... .ch| 00000b70 65 63 6b 28 62 6c 6f 63 6b 29 0d 04 92 33 ea 20 |eck(block)...3. | 00000b80 6d 78 25 2c 6d 79 25 2c 73 78 25 2c 73 79 25 2c |mx%,my%,sx%,sy%,| 00000b90 78 30 25 2c 79 30 25 2c 62 75 74 74 6f 6e 25 2c |x0%,y0%,button%,| 00000ba0 68 61 6e 64 6c 65 25 2c 69 63 6f 6e 25 0d 04 9c |handle%,icon%...| 00000bb0 1d 6d 78 25 3d 62 6c 6f 63 6b 21 30 20 3a 20 6d |.mx%=block!0 : m| 00000bc0 79 25 3d 62 6c 6f 63 6b 21 34 0d 04 a6 37 62 75 |y%=block!4...7bu| 00000bd0 74 74 6f 6e 25 3d 62 6c 6f 63 6b 21 38 20 3a 20 |tton%=block!8 : | 00000be0 68 61 6e 64 6c 65 25 3d 62 6c 6f 63 6b 21 31 32 |handle%=block!12| 00000bf0 20 3a 20 69 63 6f 6e 25 3d 62 6c 6f 63 6b 21 31 | : icon%=block!1| 00000c00 36 0d 04 b0 24 e7 20 62 75 74 74 6f 6e 25 20 80 |6...$. button% .| 00000c10 20 32 20 8c 20 f2 6d 65 6e 75 28 62 6c 6f 63 6b | 2 . .menu(block| 00000c20 29 20 3a 20 e1 0d 04 ba 1f e7 20 68 61 6e 64 6c |) : ...... handl| 00000c30 65 25 3d 2d 32 20 80 20 69 63 6f 6e 25 3d 49 63 |e%=-2 . icon%=Ic| 00000c40 6f 6e 20 8c 0d 04 c4 23 20 20 20 20 20 3a 20 f2 |on ....# : .| 00000c50 6f 70 65 6e 57 69 6e 64 6f 77 28 43 61 6c 65 6e |openWindow(Calen| 00000c60 64 61 72 25 2c a3 29 0d 04 ce 1e 20 20 20 20 20 |dar%,.).... | 00000c70 3a 20 f2 75 70 64 61 74 65 43 61 6c 65 6e 64 61 |: .updateCalenda| 00000c80 72 20 3a 20 e1 0d 04 d8 05 cd 0d 04 e2 35 62 6c |r : .........5bl| 00000c90 6f 63 6b 21 30 3d 68 61 6e 64 6c 65 25 20 3a 20 |ock!0=handle% : | 00000ca0 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 |.. "Wimp_GetWind| 00000cb0 6f 77 49 6e 66 6f 22 2c 30 2c 62 6c 6f 63 6b 0d |owInfo",0,block.| 00000cc0 04 ec 1d 78 30 25 3d 62 6c 6f 63 6b 21 34 20 3a |...x0%=block!4 :| 00000cd0 20 79 30 25 3d 62 6c 6f 63 6b 21 38 0d 04 f6 1d | y0%=block!8....| 00000ce0 73 78 25 3d 6d 78 25 2d 78 30 25 20 3a 20 73 79 |sx%=mx%-x0% : sy| 00000cf0 25 3d 6d 79 25 2d 79 30 25 0d 05 00 30 e7 20 68 |%=my%-y0%...0. h| 00000d00 61 6e 64 6c 65 25 3d 43 61 6c 65 6e 64 61 72 25 |andle%=Calendar%| 00000d10 20 8c 20 f2 63 61 6c 65 6e 64 61 72 53 65 6c 65 | . .calendarSele| 00000d20 63 74 28 69 63 6f 6e 25 29 0d 05 0a 05 e1 0d 05 |ct(icon%).......| 00000d30 14 05 3a 0d 05 1e 0e dd 20 f2 6d 65 6e 75 28 62 |..:..... .menu(b| 00000d40 29 0d 05 28 0d c8 8e 20 62 21 31 32 20 ca 0d 05 |)..(... b!12 ...| 00000d50 32 2c c9 20 2d 32 20 3a 20 f2 64 72 61 77 4d 65 |2,. -2 : .drawMe| 00000d60 6e 75 28 31 2c 22 43 61 6c 65 6e 64 61 72 2c 49 |nu(1,"Calendar,I| 00000d70 6e 66 6f 2c 51 75 69 74 22 29 0d 05 3c 34 20 20 |nfo,Quit")..<4 | 00000d80 20 20 20 20 20 20 3a 20 c8 99 20 22 57 69 6d 70 | : .. "Wimp| 00000d90 5f 43 72 65 61 74 65 4d 65 6e 75 22 2c 2c 6d 65 |_CreateMenu",,me| 00000da0 6e 75 2b 34 2c 21 62 2d 36 34 2c 31 37 36 0d 05 |nu+4,!b-64,176..| 00000db0 46 05 cb 0d 05 50 05 e1 0d 05 5a 05 3a 0d 05 64 |F....P....Z.:..d| 00000dc0 14 dd 20 f2 6d 65 6e 75 53 65 6c 65 63 74 28 62 |.. .menuSelect(b| 00000dd0 29 0d 05 6e 0e c8 8e 20 21 6d 65 6e 75 20 ca 0d |)..n... !menu ..| 00000de0 05 78 19 c9 20 31 20 3a 20 f2 69 63 6f 6e 62 61 |.x.. 1 : .iconba| 00000df0 72 4d 65 6e 75 28 62 29 0d 05 82 05 cb 0d 05 8c |rMenu(b)........| 00000e00 05 e1 0d 05 96 05 3a 0d 05 a0 15 dd 20 f2 69 63 |......:..... .ic| 00000e10 6f 6e 62 61 72 4d 65 6e 75 28 62 29 0d 05 aa 0b |onbarMenu(b)....| 00000e20 c8 8e 20 21 62 20 ca 0d 05 b4 1e c9 20 30 20 3a |.. !b ...... 0 :| 00000e30 20 f2 6f 70 65 6e 57 69 6e 64 6f 77 28 49 6e 66 | .openWindow(Inf| 00000e40 6f 25 2c a3 29 0d 05 be 10 c9 20 31 20 3a 20 51 |o%,.)..... 1 : Q| 00000e50 75 69 74 3d b9 0d 05 c8 05 cb 0d 05 d2 05 e1 0d |uit=............| 00000e60 05 dc 05 3a 0d 05 e6 21 dd 20 f2 67 65 74 49 63 |...:...!. .getIc| 00000e70 6f 6e 49 6e 66 6f 28 68 61 6e 64 6c 65 25 2c 69 |onInfo(handle%,i| 00000e80 63 6f 6e 25 29 0d 05 f0 23 62 6c 6f 63 6b 21 30 |con%)...#block!0| 00000e90 3d 68 61 6e 64 6c 65 25 20 3a 20 62 6c 6f 63 6b |=handle% : block| 00000ea0 21 34 3d 69 63 6f 6e 25 0d 05 fa 21 c8 99 20 22 |!4=icon%...!.. "| 00000eb0 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 |Wimp_GetIconStat| 00000ec0 65 22 2c 2c 62 6c 6f 63 6b 0d 06 04 40 69 78 30 |e",,block...@ix0| 00000ed0 25 3d 62 6c 6f 63 6b 21 38 20 3a 20 69 79 30 25 |%=block!8 : iy0%| 00000ee0 3d 62 6c 6f 63 6b 21 31 32 20 3a 20 69 78 31 25 |=block!12 : ix1%| 00000ef0 3d 62 6c 6f 63 6b 21 31 36 20 3a 20 69 79 31 25 |=block!16 : iy1%| 00000f00 3d 62 6c 6f 63 6b 21 32 30 0d 06 0e 13 66 6c 61 |=block!20....fla| 00000f10 67 73 25 3d 62 6c 6f 63 6b 21 32 34 0d 06 18 19 |gs%=block!24....| 00000f20 e7 20 28 66 6c 61 67 73 25 20 80 20 26 31 30 30 |. (flags% . &100| 00000f30 29 3e 30 20 8c 0d 06 22 1a 20 20 20 20 20 3a 20 |)>0 ...". : | 00000f40 74 65 78 74 24 3d 24 62 6c 6f 63 6b 21 32 38 0d |text$=$block!28.| 00000f50 06 2c 19 cc 20 3a 20 74 65 78 74 24 3d 24 28 62 |.,.. : text$=$(b| 00000f60 6c 6f 63 6b 2b 32 38 29 0d 06 36 05 cd 0d 06 40 |lock+28)..6....@| 00000f70 05 e1 0d 06 4a 05 3a 0d 06 54 20 dd 20 f2 64 65 |....J.:..T . .de| 00000f80 6c 65 74 65 49 63 6f 6e 28 68 61 6e 64 6c 65 25 |leteIcon(handle%| 00000f90 2c 69 63 6f 6e 25 29 0d 06 5e 23 62 6c 6f 63 6b |,icon%)..^#block| 00000fa0 21 30 3d 68 61 6e 64 6c 65 25 20 3a 20 62 6c 6f |!0=handle% : blo| 00000fb0 63 6b 21 34 3d 69 63 6f 6e 25 0d 06 68 1f c8 99 |ck!4=icon%..h...| 00000fc0 20 22 57 69 6d 70 5f 44 65 6c 65 74 65 49 63 6f | "Wimp_DeleteIco| 00000fd0 6e 22 2c 2c 62 6c 6f 63 6b 0d 06 72 05 e1 0d 06 |n",,block..r....| 00000fe0 7c 05 3a 0d 06 86 15 dd 20 f2 75 70 64 61 74 65 ||.:..... .update| 00000ff0 43 61 6c 65 6e 64 61 72 0d 06 90 11 ea 20 61 25 |Calendar..... a%| 00001000 2c 69 25 2c 64 61 74 61 24 0d 06 9a 13 f2 6d 6f |,i%,data$.....mo| 00001010 6e 74 68 28 59 25 2c 4d 25 2c 31 29 0d 06 a4 38 |nth(Y%,M%,1)...8| 00001020 f2 67 65 74 49 63 6f 6e 49 6e 66 6f 28 43 61 6c |.getIconInfo(Cal| 00001030 65 6e 64 61 72 25 2c 39 29 20 3a 20 f2 64 65 6c |endar%,9) : .del| 00001040 65 74 65 49 63 6f 6e 28 43 61 6c 65 6e 64 61 72 |eteIcon(Calendar| 00001050 25 2c 39 29 0d 06 ae 0c 64 61 74 61 24 3d 4d 24 |%,9)....data$=M$| 00001060 0d 06 b8 3e 69 25 3d a4 63 72 65 61 74 65 49 63 |...>i%=.createIc| 00001070 6f 6e 28 43 61 6c 65 6e 64 61 72 25 2c 69 78 30 |on(Calendar%,ix0| 00001080 25 2c 69 79 30 25 2c 69 78 31 25 2c 69 79 31 25 |%,iy0%,ix1%,iy1%| 00001090 2c 66 6c 61 67 73 25 2c 64 61 74 61 24 29 0d 06 |,flags%,data$)..| 000010a0 c2 37 c8 99 20 22 57 69 6d 70 5f 46 6f 72 63 65 |.7.. "Wimp_Force| 000010b0 52 65 64 72 61 77 22 2c 43 61 6c 65 6e 64 61 72 |Redraw",Calendar| 000010c0 25 2c 69 78 30 25 2c 69 79 30 25 2c 69 78 31 25 |%,ix0%,iy0%,ix1%| 000010d0 2c 69 79 31 25 0d 06 cc 3a f2 67 65 74 49 63 6f |,iy1%...:.getIco| 000010e0 6e 49 6e 66 6f 28 43 61 6c 65 6e 64 61 72 25 2c |nInfo(Calendar%,| 000010f0 31 30 29 20 3a 20 f2 64 65 6c 65 74 65 49 63 6f |10) : .deleteIco| 00001100 6e 28 43 61 6c 65 6e 64 61 72 25 2c 31 30 29 0d |n(Calendar%,10).| 00001110 06 d6 0f 64 61 74 61 24 3d 59 65 61 72 24 0d 06 |...data$=Year$..| 00001120 e0 3e 69 25 3d a4 63 72 65 61 74 65 49 63 6f 6e |.>i%=.createIcon| 00001130 28 43 61 6c 65 6e 64 61 72 25 2c 69 78 30 25 2c |(Calendar%,ix0%,| 00001140 69 79 30 25 2c 69 78 31 25 2c 69 79 31 25 2c 66 |iy0%,ix1%,iy1%,f| 00001150 6c 61 67 73 25 2c 64 61 74 61 24 29 0d 06 ea 37 |lags%,data$)...7| 00001160 c8 99 20 22 57 69 6d 70 5f 46 6f 72 63 65 52 65 |.. "Wimp_ForceRe| 00001170 64 72 61 77 22 2c 43 61 6c 65 6e 64 61 72 25 2c |draw",Calendar%,| 00001180 69 78 30 25 2c 69 79 30 25 2c 69 78 31 25 2c 69 |ix0%,iy0%,ix1%,i| 00001190 79 31 25 0d 06 f4 0e e3 20 61 25 3d 31 20 b8 20 |y1%..... a%=1 . | 000011a0 37 0d 06 fe 40 f2 67 65 74 49 63 6f 6e 49 6e 66 |7...@.getIconInf| 000011b0 6f 28 43 61 6c 65 6e 64 61 72 25 2c 61 25 2b 31 |o(Calendar%,a%+1| 000011c0 30 29 20 3a 20 f2 64 65 6c 65 74 65 49 63 6f 6e |0) : .deleteIcon| 000011d0 28 43 61 6c 65 6e 64 61 72 25 2c 61 25 2b 31 30 |(Calendar%,a%+10| 000011e0 29 0d 07 08 10 64 61 74 61 24 3d 41 24 28 61 25 |)....data$=A$(a%| 000011f0 29 0d 07 12 3e 69 25 3d a4 63 72 65 61 74 65 49 |)...>i%=.createI| 00001200 63 6f 6e 28 43 61 6c 65 6e 64 61 72 25 2c 69 78 |con(Calendar%,ix| 00001210 30 25 2c 69 79 30 25 2c 69 78 31 25 2c 69 79 31 |0%,iy0%,ix1%,iy1| 00001220 25 2c 66 6c 61 67 73 25 2c 64 61 74 61 24 29 0d |%,flags%,data$).| 00001230 07 1c 37 c8 99 20 22 57 69 6d 70 5f 46 6f 72 63 |..7.. "Wimp_Forc| 00001240 65 52 65 64 72 61 77 22 2c 43 61 6c 65 6e 64 61 |eRedraw",Calenda| 00001250 72 25 2c 69 78 30 25 2c 69 79 30 25 2c 69 78 31 |r%,ix0%,iy0%,ix1| 00001260 25 2c 69 79 31 25 0d 07 26 05 ed 0d 07 30 05 e1 |%,iy1%..&....0..| 00001270 0d 07 3a 05 3a 0d 07 44 1c dd 20 f2 63 61 6c 65 |..:.:..D.. .cale| 00001280 6e 64 61 72 53 65 6c 65 63 74 28 69 63 6f 6e 25 |ndarSelect(icon%| 00001290 29 0d 07 4e 0e c8 8e 20 69 63 6f 6e 25 20 ca 0d |)..N... icon% ..| 000012a0 07 58 29 c9 20 31 38 20 3a 20 4d 25 2d 3d 31 20 |.X). 18 : M%-=1 | 000012b0 3a 20 e7 20 4d 25 3c 31 20 8c 20 4d 25 3d 31 32 |: . M%<1 . M%=12| 000012c0 20 3a 20 59 25 2d 3d 31 0d 07 62 1d 20 20 20 20 | : Y%-=1..b. | 000012d0 20 20 20 20 3a 20 f2 75 70 64 61 74 65 43 61 6c | : .updateCal| 000012e0 65 6e 64 61 72 0d 07 6c 29 c9 20 31 39 20 3a 20 |endar..l). 19 : | 000012f0 4d 25 2b 3d 31 20 3a 20 e7 20 4d 25 3e 31 32 20 |M%+=1 : . M%>12 | 00001300 8c 20 4d 25 3d 31 20 3a 20 59 25 2b 3d 31 0d 07 |. M%=1 : Y%+=1..| 00001310 76 1d 20 20 20 20 20 20 20 20 3a 20 f2 75 70 64 |v. : .upd| 00001320 61 74 65 43 61 6c 65 6e 64 61 72 0d 07 80 22 c9 |ateCalendar...".| 00001330 20 32 30 20 3a 20 59 25 2d 3d 31 20 3a 20 f2 75 | 20 : Y%-=1 : .u| 00001340 70 64 61 74 65 43 61 6c 65 6e 64 61 72 0d 07 8a |pdateCalendar...| 00001350 22 c9 20 32 31 20 3a 20 59 25 2b 3d 31 20 3a 20 |". 21 : Y%+=1 : | 00001360 f2 75 70 64 61 74 65 43 61 6c 65 6e 64 61 72 0d |.updateCalendar.| 00001370 07 94 05 cb 0d 07 9e 05 e1 0d 07 a8 05 3a 0d 07 |.............:..| 00001380 b2 1e dd 20 f2 64 72 61 77 4d 65 6e 75 28 68 61 |... .drawMenu(ha| 00001390 6e 64 6c 65 25 2c 6d 65 6e 75 24 29 0d 07 bc 11 |ndle%,menu$)....| 000013a0 21 6d 65 6e 75 3d 68 61 6e 64 6c 65 25 0d 07 c6 |!menu=handle%...| 000013b0 31 6d 65 6e 75 3f 31 36 3d 37 20 3a 20 6d 65 6e |1menu?16=7 : men| 000013c0 75 3f 31 37 3d 32 20 3a 20 6d 65 6e 75 3f 31 38 |u?17=2 : menu?18| 000013d0 3d 37 20 3a 20 6d 65 6e 75 3f 31 39 3d 30 0d 07 |=7 : menu?19=0..| 000013e0 d0 28 6d 65 6e 75 21 32 30 3d 31 35 36 20 3a 20 |.(menu!20=156 : | 000013f0 6d 65 6e 75 21 32 34 3d 34 30 20 3a 20 6d 65 6e |menu!24=40 : men| 00001400 75 21 32 38 3d 30 0d 07 da 0f 70 74 72 3d 6d 65 |u!28=0....ptr=me| 00001410 6e 75 2b 33 32 0d 07 e4 23 24 28 6d 65 6e 75 2b |nu+32...#$(menu+| 00001420 34 29 3d c0 6d 65 6e 75 24 2c a7 6d 65 6e 75 24 |4)=.menu$,.menu$| 00001430 2c 22 2c 22 29 2d 31 29 0d 07 ee 1d 6d 65 6e 75 |,",")-1)....menu| 00001440 24 2b 3d 22 2c 22 20 3a 20 c8 95 20 6d 65 6e 75 |$+="," : .. menu| 00001450 24 3c 3e 22 22 0d 07 f8 1f 6d 65 6e 75 24 3d c1 |$<>""....menu$=.| 00001460 6d 65 6e 75 24 2c a7 6d 65 6e 75 24 2c 22 2c 22 |menu$,.menu$,","| 00001470 29 2b 31 29 0d 08 02 18 e7 20 c0 6d 65 6e 75 24 |)+1)..... .menu$| 00001480 2c 34 29 3d 22 49 6e 66 6f 22 20 8c 0d 08 0c 30 |,4)="Info" ....0| 00001490 20 20 20 20 20 3a 20 21 70 74 72 3d 30 20 3a 20 | : !ptr=0 : | 000014a0 70 74 72 21 34 3d 49 6e 66 6f 25 20 3a 20 70 74 |ptr!4=Info% : pt| 000014b0 72 21 38 3d 26 37 30 30 30 30 32 31 0d 08 16 2a |r!8=&7000021...*| 000014c0 20 20 20 20 20 3a 20 24 28 70 74 72 2b 31 32 29 | : $(ptr+12)| 000014d0 3d c0 6d 65 6e 75 24 2c a7 6d 65 6e 75 24 2c 22 |=.menu$,.menu$,"| 000014e0 2c 22 29 2d 31 29 0d 08 20 12 20 20 20 20 20 3a |,")-1).. . :| 000014f0 20 70 74 72 2b 3d 32 34 0d 08 2a 15 cc 20 3a 20 | ptr+=24..*.. : | 00001500 e7 20 6d 65 6e 75 24 3c 3e 22 22 20 8c 0d 08 34 |. menu$<>"" ...4| 00001510 2d 20 20 20 20 20 3a 20 21 70 74 72 3d 30 20 3a |- : !ptr=0 :| 00001520 20 70 74 72 21 34 3d 2d 31 20 3a 20 70 74 72 21 | ptr!4=-1 : ptr!| 00001530 38 3d 26 37 30 30 30 30 32 31 0d 08 3e 2a 20 20 |8=&7000021..>* | 00001540 20 20 20 3a 20 24 28 70 74 72 2b 31 32 29 3d c0 | : $(ptr+12)=.| 00001550 6d 65 6e 75 24 2c a7 6d 65 6e 75 24 2c 22 2c 22 |menu$,.menu$,","| 00001560 29 2d 31 29 0d 08 48 12 20 20 20 20 20 3a 20 70 |)-1)..H. : p| 00001570 74 72 2b 3d 32 34 0d 08 52 05 cd 0d 08 5c 05 cd |tr+=24..R....\..| 00001580 0d 08 66 05 ce 0d 08 70 19 70 74 72 21 2d 32 34 |..f....p.ptr!-24| 00001590 3d 70 74 72 21 2d 32 34 20 84 20 26 38 30 0d 08 |=ptr!-24 . &80..| 000015a0 7a 05 e1 0d 08 84 05 3a 0d 08 8e 3b dd 20 a4 63 |z......:...;. .c| 000015b0 72 65 61 74 65 49 63 6f 6e 28 68 61 6e 64 6c 65 |reateIcon(handle| 000015c0 25 2c 69 78 30 25 2c 69 79 30 25 2c 69 78 31 25 |%,ix0%,iy0%,ix1%| 000015d0 2c 69 79 31 25 2c 66 6c 61 67 73 25 2c 64 61 74 |,iy1%,flags%,dat| 000015e0 61 24 29 0d 08 98 31 62 6c 6f 63 6b 21 30 3d 68 |a$)...1block!0=h| 000015f0 61 6e 64 6c 65 25 20 3a 20 62 6c 6f 63 6b 21 34 |andle% : block!4| 00001600 3d 69 78 30 25 20 3a 20 62 6c 6f 63 6b 21 38 3d |=ix0% : block!8=| 00001610 69 79 30 25 0d 08 a2 33 62 6c 6f 63 6b 21 31 32 |iy0%...3block!12| 00001620 3d 69 78 31 25 20 3a 20 62 6c 6f 63 6b 21 31 36 |=ix1% : block!16| 00001630 3d 69 79 31 25 20 3a 20 62 6c 6f 63 6b 21 32 30 |=iy1% : block!20| 00001640 3d 66 6c 61 67 73 25 0d 08 ac 2e de 20 62 6c 6f |=flags%..... blo| 00001650 63 6b 21 32 34 20 28 a9 20 64 61 74 61 24 2b 31 |ck!24 (. data$+1| 00001660 29 20 3a 20 24 28 62 6c 6f 63 6b 21 32 34 29 3d |) : $(block!24)=| 00001670 64 61 74 61 24 0d 08 b6 24 62 6c 6f 63 6b 21 32 |data$...$block!2| 00001680 38 3d 2d 31 20 3a 20 62 6c 6f 63 6b 21 33 32 3d |8=-1 : block!32=| 00001690 a9 20 64 61 74 61 24 2b 31 0d 08 c0 27 c8 99 20 |. data$+1...'.. | 000016a0 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 6f 6e |"Wimp_CreateIcon| 000016b0 22 2c 2c 62 6c 6f 63 6b 20 b8 20 69 63 6f 6e 25 |",,block . icon%| 000016c0 0d 08 ca 0a 3d 69 63 6f 6e 25 0d 08 d4 05 3a 0d |....=icon%....:.| 000016d0 08 de 0e dd 20 a4 69 63 6f 6e 62 61 72 0d 08 e8 |.... .iconbar...| 000016e0 0b ea 20 64 61 74 61 24 0d 08 f2 52 21 62 6c 6f |.. data$...R!blo| 000016f0 63 6b 3d 2d 31 20 3a 20 62 6c 6f 63 6b 21 34 3d |ck=-1 : block!4=| 00001700 30 20 3a 20 62 6c 6f 63 6b 21 38 3d 30 20 3a 20 |0 : block!8=0 : | 00001710 62 6c 6f 63 6b 21 31 32 3d 36 38 20 3a 20 62 6c |block!12=68 : bl| 00001720 6f 63 6b 21 31 36 3d 36 38 20 3a 20 62 6c 6f 63 |ock!16=68 : bloc| 00001730 6b 21 32 30 3d 26 33 31 30 32 0d 08 fc 15 64 61 |k!20=&3102....da| 00001740 74 61 24 3d 22 21 63 61 6c 65 6e 64 61 72 22 0d |ta$="!calendar".| 00001750 09 06 2e de 20 62 6c 6f 63 6b 21 32 34 20 28 a9 |.... block!24 (.| 00001760 20 64 61 74 61 24 2b 31 29 20 3a 20 24 28 62 6c | data$+1) : $(bl| 00001770 6f 63 6b 21 32 34 29 3d 64 61 74 61 24 0d 09 10 |ock!24)=data$...| 00001780 23 62 6c 6f 63 6b 21 32 38 3d 31 20 3a 20 62 6c |#block!28=1 : bl| 00001790 6f 63 6b 21 33 32 3d a9 20 64 61 74 61 24 2b 31 |ock!32=. data$+1| 000017a0 0d 09 1a 27 c8 99 20 22 57 69 6d 70 5f 43 72 65 |...'.. "Wimp_Cre| 000017b0 61 74 65 49 63 6f 6e 22 2c 2c 62 6c 6f 63 6b 20 |ateIcon",,block | 000017c0 b8 20 69 63 6f 6e 25 0d 09 24 0a 3d 69 63 6f 6e |. icon%..$.=icon| 000017d0 25 0d 09 2e 05 3a 0d 09 38 0c dd 20 f2 65 72 72 |%....:..8.. .err| 000017e0 6f 72 0d 09 42 19 c8 99 20 22 57 69 6d 70 5f 44 |or..B... "Wimp_D| 000017f0 72 61 67 42 6f 78 22 2c 2c 2d 31 0d 09 4c 2e 21 |ragBox",,-1..L.!| 00001800 62 6c 6f 63 6b 3d 9f 20 3a 20 24 28 62 6c 6f 63 |block=. : $(bloc| 00001810 6b 2b 34 29 3d f6 24 2b 22 20 61 74 20 6c 69 6e |k+4)=.$+" at lin| 00001820 65 20 22 2b c3 9e 2b bd 30 0d 09 56 30 c8 99 20 |e "+..+.0..V0.. | 00001830 22 57 69 6d 70 5f 52 65 70 6f 72 74 45 72 72 6f |"Wimp_ReportErro| 00001840 72 22 2c 62 6c 6f 63 6b 2c 31 2c 22 41 64 64 72 |r",block,1,"Addr| 00001850 65 73 73 20 42 6f 6f 6b 22 0d 09 60 05 e1 0d 09 |ess Book"..`....| 00001860 6a 05 3a 0d 09 74 0f dd 20 f2 64 61 74 65 49 6e |j.:..t.. .dateIn| 00001870 69 74 0d 09 7e 08 ea 20 4d 24 0d 09 88 21 59 25 |it..~.. M$...!Y%| 00001880 3d bb 28 c1 91 24 2c 31 32 2c 34 29 29 20 3a 20 |=.(..$,12,4)) : | 00001890 4d 24 3d c1 91 24 2c 38 2c 33 29 0d 09 92 0b c8 |M$=..$,8,3).....| 000018a0 8e 20 4d 24 20 ca 0d 09 9c 12 c9 20 22 4a 61 6e |. M$ ...... "Jan| 000018b0 22 20 3a 20 4d 25 3d 31 0d 09 a6 12 c9 20 22 46 |" : M%=1..... "F| 000018c0 65 62 22 20 3a 20 4d 25 3d 32 0d 09 b0 12 c9 20 |eb" : M%=2..... | 000018d0 22 4d 61 72 22 20 3a 20 4d 25 3d 33 0d 09 ba 12 |"Mar" : M%=3....| 000018e0 c9 20 22 41 70 72 22 20 3a 20 4d 25 3d 34 0d 09 |. "Apr" : M%=4..| 000018f0 c4 12 c9 20 22 4d 61 79 22 20 3a 20 4d 25 3d 35 |... "May" : M%=5| 00001900 0d 09 ce 12 c9 20 22 4a 75 6e 22 20 3a 20 4d 25 |..... "Jun" : M%| 00001910 3d 36 0d 09 d8 12 c9 20 22 4a 75 6c 22 20 3a 20 |=6..... "Jul" : | 00001920 4d 25 3d 37 0d 09 e2 12 c9 20 22 41 75 67 22 20 |M%=7..... "Aug" | 00001930 3a 20 4d 25 3d 38 0d 09 ec 12 c9 20 22 53 65 70 |: M%=8..... "Sep| 00001940 22 20 3a 20 4d 25 3d 39 0d 09 f6 13 c9 20 22 4f |" : M%=9..... "O| 00001950 63 74 22 20 3a 20 4d 25 3d 31 30 0d 0a 00 13 c9 |ct" : M%=10.....| 00001960 20 22 4e 6f 76 22 20 3a 20 4d 25 3d 31 31 0d 0a | "Nov" : M%=11..| 00001970 0a 13 c9 20 22 44 65 63 22 20 3a 20 4d 25 3d 31 |... "Dec" : M%=1| 00001980 32 0d 0a 14 05 cb 0d 0a 1e 05 e1 0d 0a 28 05 3a |2............(.:| 00001990 0d 0a 32 0f dd 20 f2 79 65 61 72 28 59 25 29 0d |..2.. .year(Y%).| 000019a0 0a 3c 08 ea 20 69 25 0d 0a 46 3a f2 67 65 74 49 |.<.. i%..F:.getI| 000019b0 63 6f 6e 49 6e 66 6f 28 43 61 6c 65 6e 64 61 72 |conInfo(Calendar| 000019c0 25 2c 31 30 29 20 3a 20 f2 64 65 6c 65 74 65 49 |%,10) : .deleteI| 000019d0 63 6f 6e 28 43 61 6c 65 6e 64 61 72 25 2c 31 30 |con(Calendar%,10| 000019e0 29 0d 0a 50 0f 59 65 61 72 24 3d c3 28 59 25 29 |)..P.Year$=.(Y%)| 000019f0 0d 0a 5a 3e 69 25 3d a4 63 72 65 61 74 65 49 63 |..Z>i%=.createIc| 00001a00 6f 6e 28 43 61 6c 65 6e 64 61 72 25 2c 69 78 30 |on(Calendar%,ix0| 00001a10 25 2c 69 79 30 25 2c 69 78 31 25 2c 69 79 31 25 |%,iy0%,ix1%,iy1%| 00001a20 2c 66 6c 61 67 73 25 2c 59 65 61 72 24 29 0d 0a |,flags%,Year$)..| 00001a30 64 05 e1 0d 0a 6e 05 3a 0d 0a 78 16 dd 20 f2 6d |d....n.:..x.. .m| 00001a40 6f 6e 74 68 28 59 25 2c 4d 25 2c 7a 25 29 0d 0a |onth(Y%,M%,z%)..| 00001a50 82 1c f2 63 61 6c 63 28 59 25 2c 4d 25 29 20 3a |...calc(Y%,M%) :| 00001a60 20 f2 79 65 61 72 28 59 25 29 0d 0a 8c 0c e7 20 | .year(Y%)..... | 00001a70 7a 25 3d 32 20 8c 0d 0a 96 20 20 20 20 20 20 3a |z%=2 .... :| 00001a80 20 f1 27 22 20 22 4d 6f 6e 74 68 24 22 20 20 22 | .'" "Month$" "| 00001a90 59 65 61 72 24 27 0d 0a a0 1c 20 20 20 20 20 3a |Year$'.... :| 00001aa0 20 f1 22 20 4d 4f 4e 44 41 59 20 20 20 22 2b 41 | ." MONDAY "+A| 00001ab0 31 24 0d 0a aa 1c 20 20 20 20 20 3a 20 f1 22 20 |1$.... : ." | 00001ac0 54 55 45 53 44 41 59 20 20 22 2b 41 32 24 0d 0a |TUESDAY "+A2$..| 00001ad0 b4 1c 20 20 20 20 20 3a 20 f1 22 20 57 45 44 4e |.. : ." WEDN| 00001ae0 45 53 44 41 59 22 2b 41 33 24 0d 0a be 1c 20 20 |ESDAY"+A3$.... | 00001af0 20 20 20 3a 20 f1 22 20 54 48 55 52 53 44 41 59 | : ." THURSDAY| 00001b00 20 22 2b 41 34 24 0d 0a c8 1c 20 20 20 20 20 3a | "+A4$.... :| 00001b10 20 f1 22 20 46 52 49 44 41 59 20 20 20 22 2b 41 | ." FRIDAY "+A| 00001b20 35 24 0d 0a d2 1c 20 20 20 20 20 3a 20 f1 22 20 |5$.... : ." | 00001b30 53 41 54 55 52 44 41 59 20 22 2b 41 36 24 0d 0a |SATURDAY "+A6$..| 00001b40 dc 1c 20 20 20 20 20 3a 20 f1 22 20 53 55 4e 44 |.. : ." SUND| 00001b50 41 59 20 20 20 22 2b 41 37 24 0d 0a e6 0c 20 20 |AY "+A7$.... | 00001b60 20 20 20 3a 20 e1 0d 0a f0 05 cd 0d 0a fa 05 e1 | : ...........| 00001b70 0d 0b 04 05 3a 0d 0b 0e 12 dd 20 f2 63 61 6c 63 |....:..... .calc| 00001b80 28 59 25 2c 4d 25 29 0d 0b 18 2f ea 20 61 25 2c |(Y%,M%).../. a%,| 00001b90 62 25 2c 6c 65 61 70 25 2c 64 61 79 73 25 2c 6f |b%,leap%,days%,o| 00001ba0 66 66 73 65 74 25 2c 63 6f 6c 25 2c 72 6f 77 25 |ffset%,col%,row%| 00001bb0 2c 46 25 2c 61 24 0d 0b 22 11 c8 8e 20 28 59 25 |,F%,a$.."... (Y%| 00001bc0 20 80 20 33 29 20 ca 0d 0b 2c 10 c9 20 30 20 3a | . 3) ...,.. 0 :| 00001bd0 20 c8 8e 20 b9 20 ca 0d 0b 36 29 c9 20 28 59 25 | .. . ...6). (Y%| 00001be0 20 83 20 31 30 30 29 3d 30 20 3a 20 c8 8e 20 28 | . 100)=0 : .. (| 00001bf0 28 59 25 20 81 20 31 30 30 29 80 20 33 29 20 ca |(Y% . 100). 3) .| 00001c00 0d 0b 40 15 c9 20 30 20 20 20 20 20 3a 20 6c 65 |..@.. 0 : le| 00001c10 61 70 25 3d 31 0d 0b 4a 15 c9 20 31 2c 32 2c 33 |ap%=1..J.. 1,2,3| 00001c20 20 3a 20 6c 65 61 70 25 3d 30 0d 0b 54 05 cb 0d | : leap%=0..T...| 00001c30 0b 5e 10 7f 20 20 3a 20 6c 65 61 70 25 3d 31 0d |.^.. : leap%=1.| 00001c40 0b 68 05 cb 0d 0b 72 15 c9 20 31 2c 32 2c 33 20 |.h....r.. 1,2,3 | 00001c50 3a 20 6c 65 61 70 25 3d 30 0d 0b 7c 05 cb 0d 0b |: leap%=0..|....| 00001c60 86 0b c8 8e 20 4d 25 20 ca 0d 0b 90 20 c9 20 31 |.... M% .... . 1| 00001c70 2c 33 2c 35 2c 37 2c 38 2c 31 30 2c 31 32 20 3a |,3,5,7,8,10,12 :| 00001c80 20 64 61 79 73 25 3d 33 31 0d 0b 9a 26 c9 20 32 | days%=31...&. 2| 00001c90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a | :| 00001ca0 20 64 61 79 73 25 3d 32 38 2b 6c 65 61 70 25 0d | days%=28+leap%.| 00001cb0 0b a4 20 c9 20 34 2c 36 2c 39 2c 31 31 20 20 20 |.. . 4,6,9,11 | 00001cc0 20 20 20 20 20 3a 20 64 61 79 73 25 3d 33 30 0d | : days%=30.| 00001cd0 0b ae 05 cb 0d 0b b8 09 61 25 3d 59 25 0d 0b c2 |........a%=Y%...| 00001ce0 37 6f 66 66 73 65 74 25 3d 28 36 2b 61 25 2b 28 |7offset%=(6+a%+(| 00001cf0 61 25 2d 31 29 81 20 34 2d 28 61 25 2d 31 29 81 |a%-1). 4-(a%-1).| 00001d00 20 31 30 30 2b 28 61 25 2d 31 29 81 20 34 30 30 | 100+(a%-1). 400| 00001d10 29 83 20 37 0d 0b cc 27 e7 20 4d 25 3e 32 20 8c |). 7...'. M%>2 .| 00001d20 20 6f 66 66 73 65 74 25 3d 28 6f 66 66 73 65 74 | offset%=(offset| 00001d30 25 2b 6c 65 61 70 25 29 83 20 37 0d 0b d6 0b c8 |%+leap%). 7.....| 00001d40 8e 20 4d 25 20 ca 0d 0b e0 30 c9 20 31 20 20 3a |. M% ....0. 1 :| 00001d50 20 46 25 3d 6f 66 66 73 65 74 25 20 20 20 20 20 | F%=offset% | 00001d60 20 20 20 20 20 3a 20 4d 24 3d 22 4a 41 4e 55 41 | : M$="JANUA| 00001d70 52 59 20 20 20 22 0d 0b ea 2e c9 20 32 20 20 3a |RY "..... 2 :| 00001d80 20 46 25 3d 28 6f 66 66 73 65 74 25 2b 33 29 83 | F%=(offset%+3).| 00001d90 20 37 20 3a 20 4d 24 3d 22 46 45 42 52 55 41 52 | 7 : M$="FEBRUAR| 00001da0 59 20 20 22 0d 0b f4 2e c9 20 33 20 20 3a 20 46 |Y "..... 3 : F| 00001db0 25 3d 28 6f 66 66 73 65 74 25 2b 33 29 83 20 37 |%=(offset%+3). 7| 00001dc0 20 3a 20 4d 24 3d 22 4d 41 52 43 48 20 20 20 20 | : M$="MARCH | 00001dd0 20 22 0d 0b fe 2e c9 20 34 20 20 3a 20 46 25 3d | "..... 4 : F%=| 00001de0 28 6f 66 66 73 65 74 25 2b 36 29 83 20 37 20 3a |(offset%+6). 7 :| 00001df0 20 4d 24 3d 22 41 50 52 49 4c 20 20 20 20 20 22 | M$="APRIL "| 00001e00 0d 0c 08 2e c9 20 35 20 20 3a 20 46 25 3d 28 6f |..... 5 : F%=(o| 00001e10 66 66 73 65 74 25 2b 31 29 83 20 37 20 3a 20 4d |ffset%+1). 7 : M| 00001e20 24 3d 22 4d 41 59 20 20 20 20 20 20 20 22 0d 0c |$="MAY "..| 00001e30 12 2e c9 20 36 20 20 3a 20 46 25 3d 28 6f 66 66 |... 6 : F%=(off| 00001e40 73 65 74 25 2b 34 29 83 20 37 20 3a 20 4d 24 3d |set%+4). 7 : M$=| 00001e50 22 4a 55 4e 45 20 20 20 20 20 20 22 0d 0c 1c 2e |"JUNE "....| 00001e60 c9 20 37 20 20 3a 20 46 25 3d 28 6f 66 66 73 65 |. 7 : F%=(offse| 00001e70 74 25 2b 36 29 83 20 37 20 3a 20 4d 24 3d 22 4a |t%+6). 7 : M$="J| 00001e80 55 4c 59 20 20 20 20 20 20 22 0d 0c 26 2e c9 20 |ULY "..&.. | 00001e90 38 20 20 3a 20 46 25 3d 28 6f 66 66 73 65 74 25 |8 : F%=(offset%| 00001ea0 2b 32 29 83 20 37 20 3a 20 4d 24 3d 22 41 55 47 |+2). 7 : M$="AUG| 00001eb0 55 53 54 20 20 20 20 22 0d 0c 30 2e c9 20 39 20 |UST "..0.. 9 | 00001ec0 20 3a 20 46 25 3d 28 6f 66 66 73 65 74 25 2b 35 | : F%=(offset%+5| 00001ed0 29 83 20 37 20 3a 20 4d 24 3d 22 53 45 50 54 45 |). 7 : M$="SEPTE| 00001ee0 4d 42 45 52 20 22 0d 0c 3a 30 c9 20 31 30 20 3a |MBER "..:0. 10 :| 00001ef0 20 46 25 3d 6f 66 66 73 65 74 25 20 20 20 20 20 | F%=offset% | 00001f00 20 20 20 20 20 3a 20 4d 24 3d 22 4f 43 54 4f 42 | : M$="OCTOB| 00001f10 45 52 20 20 20 22 0d 0c 44 2e c9 20 31 31 20 3a |ER "..D.. 11 :| 00001f20 20 46 25 3d 28 6f 66 66 73 65 74 25 2b 33 29 83 | F%=(offset%+3).| 00001f30 20 37 20 3a 20 4d 24 3d 22 4e 4f 56 45 4d 42 45 | 7 : M$="NOVEMBE| 00001f40 52 20 20 22 0d 0c 4e 2e c9 20 31 32 20 3a 20 46 |R "..N.. 12 : F| 00001f50 25 3d 28 6f 66 66 73 65 74 25 2b 35 29 83 20 37 |%=(offset%+5). 7| 00001f60 20 3a 20 4d 24 3d 22 44 45 43 45 4d 42 45 52 20 | : M$="DECEMBER | 00001f70 20 22 0d 0c 58 05 cb 0d 0c 62 14 44 25 28 29 3d | "..X....b.D%()=| 00001f80 30 20 3a 20 41 24 28 29 3d 22 22 0d 0c 6c 14 e3 |0 : A$()=""..l..| 00001f90 20 61 25 3d 30 20 b8 20 64 61 79 73 25 2d 31 0d | a%=0 . days%-1.| 00001fa0 0c 76 25 63 6f 6c 25 3d 28 61 25 2b 46 25 29 83 |.v%col%=(a%+F%).| 00001fb0 20 37 20 3a 20 72 6f 77 25 3d 28 61 25 2b 46 25 | 7 : row%=(a%+F%| 00001fc0 29 81 20 37 0d 0c 80 1c 44 25 28 63 6f 6c 25 2b |). 7....D%(col%+| 00001fd0 31 2c 72 6f 77 25 2b 31 29 3d 28 61 25 2b 31 29 |1,row%+1)=(a%+1)| 00001fe0 0d 0c 8a 05 ed 0d 0c 94 1b e3 20 61 25 3d 31 20 |.......... a%=1 | 00001ff0 b8 20 36 20 3a 20 e3 20 62 25 3d 31 20 b8 20 37 |. 6 : . b%=1 . 7| 00002000 0d 0c 9e 18 61 24 3d 22 20 20 22 2b c3 28 44 25 |....a$=" "+.(D%| 00002010 28 62 25 2c 61 25 29 29 0d 0c a8 17 e7 20 a9 28 |(b%,a%))..... .(| 00002020 61 24 29 3d 33 20 8c 20 61 24 2b 3d 22 20 22 0d |a$)=3 . a$+=" ".| 00002030 0c b2 1b e7 20 61 24 3d 22 20 20 30 20 22 20 8c |.... a$=" 0 " .| 00002040 20 61 24 3d 22 20 20 20 20 22 0d 0c bc 0e 41 24 | a$=" "....A$| 00002050 28 62 25 29 2b 3d 61 24 0d 0c c6 0f ed 20 62 25 |(b%)+=a$..... b%| 00002060 20 3a 20 ed 20 61 25 0d 0c d0 05 e1 0d ff | : . a%.......| 0000206e