Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav » Calendr
Calendr
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 tapes » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav |
Filename: | Calendr |
Read OK: | ✔ |
File size: | 0D9F bytes |
Load address: | FFFF1900 |
Exec address: | FFFF8023 |
Duplicates
There are 2 duplicate copies of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_08_11_D-MU08_11.ssd » Calendr
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav » Calendr
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape18b_acorn_eu_1991_january.wav » Calendr
File contents
10REM Calendar 20REM by Martyn Fox 30REM (c) The Micro User 40DIM head$(12),M%(12),D%(12) 50FORN=1TO12 60READ head$(N),M%(N),D%(N):NEXT 70MODE7:db$=CHR$141 80c1$=CHR$131:c2$=CHR$(ASCc1$EOR6) 90PRINTTAB(14,6)db$"CALENDAR" 100PRINTTAB(14)db$"CALENDAR" 110PROCInstructions 120PROCDate 130miss%=0 140IF year<1752 PROCJulian 150IF year>1752 PROCGreg 160IF year=1752 PROCsept52 170head$=head$(mon%)+" "+STR$(year) 180PROCCalendr(head$,M%,D%) 190A=GET 200IF A=46 OR A=62 PROCNext:GOTO140 210IF A=44 OR A=60 PROCPrev:GOTO140 220VDU23,1,1;0;0;0; 230CLS 240GOTO120 250DEFPROCJulian 260leap%=year DIV 4 270D%=(year+leap%+D%(mon%)+4) MOD 7 280M%=M%(mon%) 290IF year MOD 4=0 PROCLeap 300ENDPROC 310DEFPROCGreg 320leap%=(year DIV 4)-(year DIV 100)+(year DIV 400) 330D%=(year+leap%+D%(mon%)+6) MOD 7 340M%=M%(mon%) 350IF year MOD 100 =0 AND year MOD 400 <>0 C%=1 ELSE C%=0 360IF year MOD 4 =0 AND C%=0 PROCLeap 370ENDPROC 380DEFPROCLeap 390IF mon%<3 D%=D%+6:D%=D% MOD 7 400IF mon%=2 M%=29 410ENDPROC 420DEFPROCsept52 430IF mon%<9 PROCJulian 440IF mon%>9 PROCGreg 450IF mon%=9 miss%=1:PROCJulian 460ENDPROC 470DATAJanuary,31,0,February,28,3,March,31,3,April,30,6 480DATAMay,31,1,June,30,4,July,31,6,August,31,2 490DATASeptember,30,5,October,31,0,November,30,3,December,31,5 500DEFPROCCalendr(head$,M%,D%) 510REM head$=heading,M%=no.of days in month,D%=start day (Mon=0,Sun=6). 520MISS2%=0 530CLS 540VDU23,1,0;0;0;0; 550PRINT'db$TAB(19-LENhead$/2)head$ 560PRINTdb$TAB(19-LENhead$/2)head$ 570PRINT'TAB(2)db$c1$"Mon "c2$"Tue "c1$"Wed "c2$"Thu "c1$"Fri "c2$"Sat "c1$"Sun" 580PRINTTAB(2)db$c1$"Mon "c2$"Tue "c1$"Wed "c2$"Thu "c1$"Fri "c2$"Sat "c1$"Sun" 590@%=2:D%=-D% 600REPEAT PRINT 610W%=0:colour%=131:PROCLine 620IFW%<7 W%=W%+1:D%=D%+1:GOTO620 630W%=0:D%=D%-7:colour%=131 640IF D%=10 AND miss%=1 D%=-1:MISS2%=1 650PROCLine:miss%=0:UNTILD%=M% 660IFMISS2%=1MISS2%=0:PRINT''TAB(4)CHR$(34)"Give Us Back Our Eleven Days!"CHR$(34) 670ENDPROC 680DEFPROCLine 690PRINTTAB(1)db$; 700REPEAT D%=D%+1:W%=W%+1 710IFD%=3 AND miss%=1 D%=14:REM September 1752 720PRINTCHR$(colour%)" ";:colour%=colour% EOR 6 730IF D%<1PRINTSPC2;ELSEPRINTD%; 740PRINT" "; 750UNTILW%=7 OR D%=M%:PRINT:ENDPROC 760DEFPROCDate 770PRINTTAB(0,10)SPC5"Please enter the month and year."' 780INPUTTAB(10)date$:N=0 790REPEAT N=N+1:I=0 800IFASCMID$(date$,N)>&2F month$=LEFT$(date$,N):I=1 810UNTIL I=0 820Z=LEN(date$)+1 830REPEAT Z=Z-1:I=0 840IFASCMID$(date$,Z)>&2F YEAR$=RIGHT$(date$,LEN(date$)+1-Z):I=1 850UNTILI=0 860IF Z<>N THEN900 870IF ASCmonth$>&39 PROCLetts ELSE PROCFig 880IF I=0 THEN900 890PROCYear 900IF I=0 CLS:PRINTTAB(5,7)"That does not make sense."'TAB(5)"Please try again.":GOTO770 910ENDPROC 920DEFPROCFig 930mon%=VAL(month$) 940IF mon%<1 OR mon%>12 I=0 ELSE I=1 950ENDPROC 960DEFPROCLetts 970A$=CHR$(ASCmonth$ AND &5F) 980B$=CHR$(ASCMID$(month$,2) OR &20) 990C$=CHR$(ASCMID$(month$,3) OR &20) 1000month$=A$+B$+C$ 1010I=0 1020FORN=1TO12 1030IFmonth$=LEFT$(head$(N),3) mon%=N:I=1 1040NEXT:ENDPROC 1050DEFPROCYear 1060year=VAL(YEAR$):I=1 1070IFyear=0ANDLEFT$(YEAR$,1)<>"0"I=0 1080IF year<100 AND RIGHT$(YEAR$,2)<>"AD" AND RIGHT$(YEAR$,2)<>"ad" year=year+1900 1090ENDPROC 1100DEFPROCNext:mon%=mon%+1 1110IF mon%=13 mon%=1:year=year+1 1120ENDPROC 1130DEFPROCPrev:mon%=mon%-1 1140IF mon%=0 mon%=12:year=year-1 1150IF year<0 year=0:mon%=1:VDU7 1160ENDPROC 1170DEFPROCInstructions 1180PRINT''"Do you require instructions? (Y/N)" 1190A=GET 1200IF A=78THEN1300 1210IF A<>89THEN1190 1220CLS:PRINT 1230PRINT"This program will display a calendar forany month from 0 AD onwards." 1240PRINT'"Enter the month and year. The month may be entered as a number or letters (only the first 3 letters are required)." 1250PRINT'"The month and year must be separated by a single full stop or space. If the yearentered is less than 100, e.g. 84, it" 1260PRINT"will be assumed to be in the 20th"'"century, e.g. 1984. If you want to entera date in the 1st century AD, type AD onthe end of the year, e.g. NOV.84AD or 11.84AD." 1270PRINT'"To display the next month, press >."'"To display the previous month, press <. To display any other month, press any other key." 1280PRINT'"Press any key to continue." 1290A=GET:CLS 1300ENDPROC
� Calendar � by Martyn Fox � (c) The Micro User (� head$(12),M%(12),D%(12) 2�N=1�12 <� head$(N),M%(N),D%(N):� F�7:db$=�141 Pc1$=�131:c2$=�(�c1$�6) Z�14,6)db$"CALENDAR" d�14)db$"CALENDAR" n�Instructions x �Date �miss%=0 �� year<1752 �Julian �� year>1752 �Greg �� year=1752 �sept52 �"head$=head$(mon%)+" "+�(year) ��Calendr(head$,M%,D%) �A=� �� A=46 � A=62 �Next:�tL@ �� A=44 � A=60 �Prev:�tL@ ��23,1,1;0;0;0; �� � �Dx@ ���Julian leap%=year � 4 "D%=(year+leap%+D%(mon%)+4) � 7 M%=M%(mon%) "� year � 4=0 �Leap ,� 6 ��Greg @.leap%=(year � 4)-(year � 100)+(year � 400) J"D%=(year+leap%+D%(mon%)+6) � 7 TM%=M%(mon%) ^0� year � 100 =0 � year � 400 <>0 C%=1 � C%=0 h� year � 4 =0 � C%=0 �Leap r� | ��Leap �� mon%<3 D%=D%+6:D%=D% � 7 �� mon%=2 M%=29 �� ���sept52 �� mon%<9 �Julian �� mon%>9 �Greg �� mon%=9 miss%=1:�Julian �� �5�January,31,0,February,28,3,March,31,3,April,30,6 �-�May,31,1,June,30,4,July,31,6,August,31,2 �<�September,30,5,October,31,0,November,30,3,December,31,5 ���Calendr(head$,M%,D%) �F� head$=heading,M%=no.of days in month,D%=start day (Mon=0,Sun=6). MISS2%=0 � �23,1,0;0;0;0; &�'db$�19-�head$/2)head$ 0�db$�19-�head$/2)head$ :J�'�2)db$c1$"Mon "c2$"Tue "c1$"Wed "c2$"Thu "c1$"Fri "c2$"Sat "c1$"Sun" DI�2)db$c1$"Mon "c2$"Tue "c1$"Wed "c2$"Thu "c1$"Fri "c2$"Sat "c1$"Sun" N@%=2:D%=-D% X� � bW%=0:colour%=131:�Line l�W%<7 W%=W%+1:D%=D%+1:�DlB vW%=0:D%=D%-7:colour%=131 �$� D%=10 � miss%=1 D%=-1:MISS2%=1 ��Line:miss%=0:�D%=M% �E�MISS2%=1MISS2%=0:�''�4)�(34)"Give Us Back Our Eleven Days!"�(34) �� � ��Line ��1)db$; �� D%=D%+1:W%=W%+1 �*�D%=3 � miss%=1 D%=14:� September 1752 �'�(colour%)" ";:colour%=colour% � 6 �� D%<1�2;��D%; � �" "; ��W%=7 � D%=M%:�:� � ��Date 0�0,10)�5"Please enter the month and year."' �10)date$:N=0 � N=N+1:I=0 (�date$,N)>&2F month$=�date$,N):I=1 * � I=0 4Z=�(date$)+1 >� Z=Z-1:I=0 H2�date$,Z)>&2F YEAR$=�date$,�(date$)+1-Z):I=1 R�I=0 \� Z<>N ��tDC f� �month$>&39 �Letts � �Fig p� I=0 ��tDC z �Year �J� I=0 �:�5,7)"That does not make sense."'�5)"Please try again.":�TBC �� � ��Fig �mon%=�(month$) � � mon%<1 � mon%>12 I=0 � I=1 �� ���Letts �A$=�(�month$ � &5F) �B$=�(��month$,2) � &20) �C$=�(��month$,3) � &20) �month$=A$+B$+C$ �I=0 ��N=1�12 #�month$=�head$(N),3) mon%=N:I=1 �:� ��Year $year=�(YEAR$):I=1 .�year=0��YEAR$,1)<>"0"I=0 8A� year<100 � �YEAR$,2)<>"AD" � �YEAR$,2)<>"ad" year=year+1900 B� L��Next:mon%=mon%+1 V � mon%=13 mon%=1:year=year+1 `� j��Prev:mon%=mon%-1 t � mon%=0 mon%=12:year=year-1 ~� year<0 year=0:mon%=1:�7 �� ���Instructions �+�''"Do you require instructions? (Y/N)" �A=� �� A=78��TTE �� A<>89��tfD ��:� �K�"This program will display a calendar forany month from 0 AD onwards." �z�'"Enter the month and year. The month may be entered as a number or letters (only the first 3 letters are required)." �}�'"The month and year must be separated by a single full stop or space. If the yearentered is less than 100, e.g. 84, it" ��"will be assumed to be in the 20th"'"century, e.g. 1984. If you want to entera date in the 1st century AD, type AD onthe end of the year, e.g. NOV.84AD or 11.84AD." ���'"To display the next month, press >."'"To display the previous month, press <. To display any other month, press any other key." "�'"Press any key to continue." A=�:� � �
00000000 0d 00 0a 0e f4 20 43 61 6c 65 6e 64 61 72 0d 00 |..... Calendar..| 00000010 14 13 f4 20 62 79 20 4d 61 72 74 79 6e 20 46 6f |... by Martyn Fo| 00000020 78 0d 00 1e 18 f4 20 28 63 29 20 54 68 65 20 4d |x..... (c) The M| 00000030 69 63 72 6f 20 55 73 65 72 0d 00 28 1d de 20 68 |icro User..(.. h| 00000040 65 61 64 24 28 31 32 29 2c 4d 25 28 31 32 29 2c |ead$(12),M%(12),| 00000050 44 25 28 31 32 29 0d 00 32 0b e3 4e 3d 31 b8 31 |D%(12)..2..N=1.1| 00000060 32 0d 00 3c 1c f3 20 68 65 61 64 24 28 4e 29 2c |2..<.. head$(N),| 00000070 4d 25 28 4e 29 2c 44 25 28 4e 29 3a ed 0d 00 46 |M%(N),D%(N):...F| 00000080 0f eb 37 3a 64 62 24 3d bd 31 34 31 0d 00 50 1a |..7:db$=.141..P.| 00000090 63 31 24 3d bd 31 33 31 3a 63 32 24 3d bd 28 97 |c1$=.131:c2$=.(.| 000000a0 63 31 24 82 36 29 0d 00 5a 18 f1 8a 31 34 2c 36 |c1$.6)..Z...14,6| 000000b0 29 64 62 24 22 43 41 4c 45 4e 44 41 52 22 0d 00 |)db$"CALENDAR"..| 000000c0 64 16 f1 8a 31 34 29 64 62 24 22 43 41 4c 45 4e |d...14)db$"CALEN| 000000d0 44 41 52 22 0d 00 6e 11 f2 49 6e 73 74 72 75 63 |DAR"..n..Instruc| 000000e0 74 69 6f 6e 73 0d 00 78 09 f2 44 61 74 65 0d 00 |tions..x..Date..| 000000f0 82 0b 6d 69 73 73 25 3d 30 0d 00 8c 17 e7 20 79 |..miss%=0..... y| 00000100 65 61 72 3c 31 37 35 32 20 f2 4a 75 6c 69 61 6e |ear<1752 .Julian| 00000110 0d 00 96 15 e7 20 79 65 61 72 3e 31 37 35 32 20 |..... year>1752 | 00000120 f2 47 72 65 67 0d 00 a0 17 e7 20 79 65 61 72 3d |.Greg..... year=| 00000130 31 37 35 32 20 f2 73 65 70 74 35 32 0d 00 aa 22 |1752 .sept52..."| 00000140 68 65 61 64 24 3d 68 65 61 64 24 28 6d 6f 6e 25 |head$=head$(mon%| 00000150 29 2b 22 20 20 22 2b c3 28 79 65 61 72 29 0d 00 |)+" "+.(year)..| 00000160 b4 19 f2 43 61 6c 65 6e 64 72 28 68 65 61 64 24 |...Calendr(head$| 00000170 2c 4d 25 2c 44 25 29 0d 00 be 07 41 3d a5 0d 00 |,M%,D%)....A=...| 00000180 c8 1d e7 20 41 3d 34 36 20 84 20 41 3d 36 32 20 |... A=46 . A=62 | 00000190 f2 4e 65 78 74 3a e5 8d 74 4c 40 0d 00 d2 1d e7 |.Next:..tL@.....| 000001a0 20 41 3d 34 34 20 84 20 41 3d 36 30 20 f2 50 72 | A=44 . A=60 .Pr| 000001b0 65 76 3a e5 8d 74 4c 40 0d 00 dc 12 ef 32 33 2c |ev:..tL@.....23,| 000001c0 31 2c 31 3b 30 3b 30 3b 30 3b 0d 00 e6 05 db 0d |1,1;0;0;0;......| 000001d0 00 f0 09 e5 8d 44 78 40 0d 00 fa 0c dd f2 4a 75 |.....Dx@......Ju| 000001e0 6c 69 61 6e 0d 01 04 12 6c 65 61 70 25 3d 79 65 |lian....leap%=ye| 000001f0 61 72 20 81 20 34 0d 01 0e 22 44 25 3d 28 79 65 |ar . 4..."D%=(ye| 00000200 61 72 2b 6c 65 61 70 25 2b 44 25 28 6d 6f 6e 25 |ar+leap%+D%(mon%| 00000210 29 2b 34 29 20 83 20 37 0d 01 18 0f 4d 25 3d 4d |)+4) . 7....M%=M| 00000220 25 28 6d 6f 6e 25 29 0d 01 22 16 e7 20 79 65 61 |%(mon%)..".. yea| 00000230 72 20 83 20 34 3d 30 20 f2 4c 65 61 70 0d 01 2c |r . 4=0 .Leap..,| 00000240 05 e1 0d 01 36 0a dd f2 47 72 65 67 0d 01 40 2e |....6...Greg..@.| 00000250 6c 65 61 70 25 3d 28 79 65 61 72 20 81 20 34 29 |leap%=(year . 4)| 00000260 2d 28 79 65 61 72 20 81 20 31 30 30 29 2b 28 79 |-(year . 100)+(y| 00000270 65 61 72 20 81 20 34 30 30 29 0d 01 4a 22 44 25 |ear . 400)..J"D%| 00000280 3d 28 79 65 61 72 2b 6c 65 61 70 25 2b 44 25 28 |=(year+leap%+D%(| 00000290 6d 6f 6e 25 29 2b 36 29 20 83 20 37 0d 01 54 0f |mon%)+6) . 7..T.| 000002a0 4d 25 3d 4d 25 28 6d 6f 6e 25 29 0d 01 5e 30 e7 |M%=M%(mon%)..^0.| 000002b0 20 79 65 61 72 20 83 20 31 30 30 20 3d 30 20 80 | year . 100 =0 .| 000002c0 20 79 65 61 72 20 83 20 34 30 30 20 3c 3e 30 20 | year . 400 <>0 | 000002d0 43 25 3d 31 20 8b 20 43 25 3d 30 0d 01 68 1e e7 |C%=1 . C%=0..h..| 000002e0 20 79 65 61 72 20 83 20 34 20 3d 30 20 80 20 43 | year . 4 =0 . C| 000002f0 25 3d 30 20 f2 4c 65 61 70 0d 01 72 05 e1 0d 01 |%=0 .Leap..r....| 00000300 7c 0a dd f2 4c 65 61 70 0d 01 86 1e e7 20 6d 6f ||...Leap..... mo| 00000310 6e 25 3c 33 20 44 25 3d 44 25 2b 36 3a 44 25 3d |n%<3 D%=D%+6:D%=| 00000320 44 25 20 83 20 37 0d 01 90 12 e7 20 6d 6f 6e 25 |D% . 7..... mon%| 00000330 3d 32 20 4d 25 3d 32 39 0d 01 9a 05 e1 0d 01 a4 |=2 M%=29........| 00000340 0c dd f2 73 65 70 74 35 32 0d 01 ae 14 e7 20 6d |...sept52..... m| 00000350 6f 6e 25 3c 39 20 f2 4a 75 6c 69 61 6e 0d 01 b8 |on%<9 .Julian...| 00000360 12 e7 20 6d 6f 6e 25 3e 39 20 f2 47 72 65 67 0d |.. mon%>9 .Greg.| 00000370 01 c2 1c e7 20 6d 6f 6e 25 3d 39 20 6d 69 73 73 |.... mon%=9 miss| 00000380 25 3d 31 3a f2 4a 75 6c 69 61 6e 0d 01 cc 05 e1 |%=1:.Julian.....| 00000390 0d 01 d6 35 dc 4a 61 6e 75 61 72 79 2c 33 31 2c |...5.January,31,| 000003a0 30 2c 46 65 62 72 75 61 72 79 2c 32 38 2c 33 2c |0,February,28,3,| 000003b0 4d 61 72 63 68 2c 33 31 2c 33 2c 41 70 72 69 6c |March,31,3,April| 000003c0 2c 33 30 2c 36 0d 01 e0 2d dc 4d 61 79 2c 33 31 |,30,6...-.May,31| 000003d0 2c 31 2c 4a 75 6e 65 2c 33 30 2c 34 2c 4a 75 6c |,1,June,30,4,Jul| 000003e0 79 2c 33 31 2c 36 2c 41 75 67 75 73 74 2c 33 31 |y,31,6,August,31| 000003f0 2c 32 0d 01 ea 3c dc 53 65 70 74 65 6d 62 65 72 |,2...<.September| 00000400 2c 33 30 2c 35 2c 4f 63 74 6f 62 65 72 2c 33 31 |,30,5,October,31| 00000410 2c 30 2c 4e 6f 76 65 6d 62 65 72 2c 33 30 2c 33 |,0,November,30,3| 00000420 2c 44 65 63 65 6d 62 65 72 2c 33 31 2c 35 0d 01 |,December,31,5..| 00000430 f4 1a dd f2 43 61 6c 65 6e 64 72 28 68 65 61 64 |....Calendr(head| 00000440 24 2c 4d 25 2c 44 25 29 0d 01 fe 46 f4 20 68 65 |$,M%,D%)...F. he| 00000450 61 64 24 3d 68 65 61 64 69 6e 67 2c 4d 25 3d 6e |ad$=heading,M%=n| 00000460 6f 2e 6f 66 20 64 61 79 73 20 69 6e 20 6d 6f 6e |o.of days in mon| 00000470 74 68 2c 44 25 3d 73 74 61 72 74 20 64 61 79 20 |th,D%=start day | 00000480 28 4d 6f 6e 3d 30 2c 53 75 6e 3d 36 29 2e 0d 02 |(Mon=0,Sun=6)...| 00000490 08 0c 4d 49 53 53 32 25 3d 30 0d 02 12 05 db 0d |..MISS2%=0......| 000004a0 02 1c 12 ef 32 33 2c 31 2c 30 3b 30 3b 30 3b 30 |....23,1,0;0;0;0| 000004b0 3b 0d 02 26 1b f1 27 64 62 24 8a 31 39 2d a9 68 |;..&..'db$.19-.h| 000004c0 65 61 64 24 2f 32 29 68 65 61 64 24 0d 02 30 1a |ead$/2)head$..0.| 000004d0 f1 64 62 24 8a 31 39 2d a9 68 65 61 64 24 2f 32 |.db$.19-.head$/2| 000004e0 29 68 65 61 64 24 0d 02 3a 4a f1 27 8a 32 29 64 |)head$..:J.'.2)d| 000004f0 62 24 63 31 24 22 4d 6f 6e 20 22 63 32 24 22 54 |b$c1$"Mon "c2$"T| 00000500 75 65 20 22 63 31 24 22 57 65 64 20 22 63 32 24 |ue "c1$"Wed "c2$| 00000510 22 54 68 75 20 22 63 31 24 22 46 72 69 20 22 63 |"Thu "c1$"Fri "c| 00000520 32 24 22 53 61 74 20 22 63 31 24 22 53 75 6e 22 |2$"Sat "c1$"Sun"| 00000530 0d 02 44 49 f1 8a 32 29 64 62 24 63 31 24 22 4d |..DI..2)db$c1$"M| 00000540 6f 6e 20 22 63 32 24 22 54 75 65 20 22 63 31 24 |on "c2$"Tue "c1$| 00000550 22 57 65 64 20 22 63 32 24 22 54 68 75 20 22 63 |"Wed "c2$"Thu "c| 00000560 31 24 22 46 72 69 20 22 63 32 24 22 53 61 74 20 |1$"Fri "c2$"Sat | 00000570 22 63 31 24 22 53 75 6e 22 0d 02 4e 0f 40 25 3d |"c1$"Sun"..N.@%=| 00000580 32 3a 44 25 3d 2d 44 25 0d 02 58 07 f5 20 f1 0d |2:D%=-D%..X.. ..| 00000590 02 62 1a 57 25 3d 30 3a 63 6f 6c 6f 75 72 25 3d |.b.W%=0:colour%=| 000005a0 31 33 31 3a f2 4c 69 6e 65 0d 02 6c 1f e7 57 25 |131:.Line..l..W%| 000005b0 3c 37 20 57 25 3d 57 25 2b 31 3a 44 25 3d 44 25 |<7 W%=W%+1:D%=D%| 000005c0 2b 31 3a e5 8d 44 6c 42 0d 02 76 1c 57 25 3d 30 |+1:..DlB..v.W%=0| 000005d0 3a 44 25 3d 44 25 2d 37 3a 63 6f 6c 6f 75 72 25 |:D%=D%-7:colour%| 000005e0 3d 31 33 31 0d 02 80 24 e7 20 44 25 3d 31 30 20 |=131...$. D%=10 | 000005f0 80 20 6d 69 73 73 25 3d 31 20 44 25 3d 2d 31 3a |. miss%=1 D%=-1:| 00000600 4d 49 53 53 32 25 3d 31 0d 02 8a 18 f2 4c 69 6e |MISS2%=1.....Lin| 00000610 65 3a 6d 69 73 73 25 3d 30 3a fd 44 25 3d 4d 25 |e:miss%=0:.D%=M%| 00000620 0d 02 94 45 e7 4d 49 53 53 32 25 3d 31 4d 49 53 |...E.MISS2%=1MIS| 00000630 53 32 25 3d 30 3a f1 27 27 8a 34 29 bd 28 33 34 |S2%=0:.''.4).(34| 00000640 29 22 47 69 76 65 20 55 73 20 42 61 63 6b 20 4f |)"Give Us Back O| 00000650 75 72 20 45 6c 65 76 65 6e 20 44 61 79 73 21 22 |ur Eleven Days!"| 00000660 bd 28 33 34 29 0d 02 9e 05 e1 0d 02 a8 0a dd f2 |.(34)...........| 00000670 4c 69 6e 65 0d 02 b2 0c f1 8a 31 29 64 62 24 3b |Line......1)db$;| 00000680 0d 02 bc 15 f5 20 44 25 3d 44 25 2b 31 3a 57 25 |..... D%=D%+1:W%| 00000690 3d 57 25 2b 31 0d 02 c6 2a e7 44 25 3d 33 20 80 |=W%+1...*.D%=3 .| 000006a0 20 6d 69 73 73 25 3d 31 20 44 25 3d 31 34 3a f4 | miss%=1 D%=14:.| 000006b0 20 53 65 70 74 65 6d 62 65 72 20 31 37 35 32 0d | September 1752.| 000006c0 02 d0 27 f1 bd 28 63 6f 6c 6f 75 72 25 29 22 20 |..'..(colour%)" | 000006d0 22 3b 3a 63 6f 6c 6f 75 72 25 3d 63 6f 6c 6f 75 |";:colour%=colou| 000006e0 72 25 20 82 20 36 0d 02 da 13 e7 20 44 25 3c 31 |r% . 6..... D%<1| 000006f0 f1 89 32 3b 8b f1 44 25 3b 0d 02 e4 09 f1 22 20 |..2;..D%;....." | 00000700 22 3b 0d 02 ee 15 fd 57 25 3d 37 20 84 20 44 25 |";.....W%=7 . D%| 00000710 3d 4d 25 3a f1 3a e1 0d 02 f8 0a dd f2 44 61 74 |=M%:.:.......Dat| 00000720 65 0d 03 02 30 f1 8a 30 2c 31 30 29 89 35 22 50 |e...0..0,10).5"P| 00000730 6c 65 61 73 65 20 65 6e 74 65 72 20 74 68 65 20 |lease enter the | 00000740 6d 6f 6e 74 68 20 61 6e 64 20 79 65 61 72 2e 22 |month and year."| 00000750 27 0d 03 0c 12 e8 8a 31 30 29 64 61 74 65 24 3a |'......10)date$:| 00000760 4e 3d 30 0d 03 16 0f f5 20 4e 3d 4e 2b 31 3a 49 |N=0..... N=N+1:I| 00000770 3d 30 0d 03 20 28 e7 97 c1 64 61 74 65 24 2c 4e |=0.. (...date$,N| 00000780 29 3e 26 32 46 20 6d 6f 6e 74 68 24 3d c0 64 61 |)>&2F month$=.da| 00000790 74 65 24 2c 4e 29 3a 49 3d 31 0d 03 2a 09 fd 20 |te$,N):I=1..*.. | 000007a0 49 3d 30 0d 03 34 10 5a 3d a9 28 64 61 74 65 24 |I=0..4.Z=.(date$| 000007b0 29 2b 31 0d 03 3e 0f f5 20 5a 3d 5a 2d 31 3a 49 |)+1..>.. Z=Z-1:I| 000007c0 3d 30 0d 03 48 32 e7 97 c1 64 61 74 65 24 2c 5a |=0..H2...date$,Z| 000007d0 29 3e 26 32 46 20 59 45 41 52 24 3d c2 64 61 74 |)>&2F YEAR$=.dat| 000007e0 65 24 2c a9 28 64 61 74 65 24 29 2b 31 2d 5a 29 |e$,.(date$)+1-Z)| 000007f0 3a 49 3d 31 0d 03 52 08 fd 49 3d 30 0d 03 5c 10 |:I=1..R..I=0..\.| 00000800 e7 20 5a 3c 3e 4e 20 8c 8d 74 44 43 0d 03 66 1f |. Z<>N ..tDC..f.| 00000810 e7 20 97 6d 6f 6e 74 68 24 3e 26 33 39 20 f2 4c |. .month$>&39 .L| 00000820 65 74 74 73 20 8b 20 f2 46 69 67 0d 03 70 0f e7 |etts . .Fig..p..| 00000830 20 49 3d 30 20 8c 8d 74 44 43 0d 03 7a 09 f2 59 | I=0 ..tDC..z..Y| 00000840 65 61 72 0d 03 84 4a e7 20 49 3d 30 20 db 3a f1 |ear...J. I=0 .:.| 00000850 8a 35 2c 37 29 22 54 68 61 74 20 64 6f 65 73 20 |.5,7)"That does | 00000860 6e 6f 74 20 6d 61 6b 65 20 73 65 6e 73 65 2e 22 |not make sense."| 00000870 27 8a 35 29 22 50 6c 65 61 73 65 20 74 72 79 20 |'.5)"Please try | 00000880 61 67 61 69 6e 2e 22 3a e5 8d 54 42 43 0d 03 8e |again.":..TBC...| 00000890 05 e1 0d 03 98 09 dd f2 46 69 67 0d 03 a2 12 6d |........Fig....m| 000008a0 6f 6e 25 3d bb 28 6d 6f 6e 74 68 24 29 0d 03 ac |on%=.(month$)...| 000008b0 20 e7 20 6d 6f 6e 25 3c 31 20 84 20 6d 6f 6e 25 | . mon%<1 . mon%| 000008c0 3e 31 32 20 49 3d 30 20 8b 20 49 3d 31 0d 03 b6 |>12 I=0 . I=1...| 000008d0 05 e1 0d 03 c0 0b dd f2 4c 65 74 74 73 0d 03 ca |........Letts...| 000008e0 17 41 24 3d bd 28 97 6d 6f 6e 74 68 24 20 80 20 |.A$=.(.month$ . | 000008f0 26 35 46 29 0d 03 d4 1b 42 24 3d bd 28 97 c1 6d |&5F)....B$=.(..m| 00000900 6f 6e 74 68 24 2c 32 29 20 84 20 26 32 30 29 0d |onth$,2) . &20).| 00000910 03 de 1b 43 24 3d bd 28 97 c1 6d 6f 6e 74 68 24 |...C$=.(..month$| 00000920 2c 33 29 20 84 20 26 32 30 29 0d 03 e8 13 6d 6f |,3) . &20)....mo| 00000930 6e 74 68 24 3d 41 24 2b 42 24 2b 43 24 0d 03 f2 |nth$=A$+B$+C$...| 00000940 07 49 3d 30 0d 03 fc 0b e3 4e 3d 31 b8 31 32 0d |.I=0.....N=1.12.| 00000950 04 06 23 e7 6d 6f 6e 74 68 24 3d c0 68 65 61 64 |..#.month$=.head| 00000960 24 28 4e 29 2c 33 29 20 6d 6f 6e 25 3d 4e 3a 49 |$(N),3) mon%=N:I| 00000970 3d 31 0d 04 10 07 ed 3a e1 0d 04 1a 0a dd f2 59 |=1.....:.......Y| 00000980 65 61 72 0d 04 24 15 79 65 61 72 3d bb 28 59 45 |ear..$.year=.(YE| 00000990 41 52 24 29 3a 49 3d 31 0d 04 2e 1d e7 79 65 61 |AR$):I=1.....yea| 000009a0 72 3d 30 80 c0 59 45 41 52 24 2c 31 29 3c 3e 22 |r=0..YEAR$,1)<>"| 000009b0 30 22 49 3d 30 0d 04 38 41 e7 20 79 65 61 72 3c |0"I=0..8A. year<| 000009c0 31 30 30 20 80 20 c2 59 45 41 52 24 2c 32 29 3c |100 . .YEAR$,2)<| 000009d0 3e 22 41 44 22 20 80 20 c2 59 45 41 52 24 2c 32 |>"AD" . .YEAR$,2| 000009e0 29 3c 3e 22 61 64 22 20 79 65 61 72 3d 79 65 61 |)<>"ad" year=yea| 000009f0 72 2b 31 39 30 30 0d 04 42 05 e1 0d 04 4c 16 dd |r+1900..B....L..| 00000a00 f2 4e 65 78 74 3a 6d 6f 6e 25 3d 6d 6f 6e 25 2b |.Next:mon%=mon%+| 00000a10 31 0d 04 56 20 e7 20 6d 6f 6e 25 3d 31 33 20 6d |1..V . mon%=13 m| 00000a20 6f 6e 25 3d 31 3a 79 65 61 72 3d 79 65 61 72 2b |on%=1:year=year+| 00000a30 31 0d 04 60 05 e1 0d 04 6a 16 dd f2 50 72 65 76 |1..`....j...Prev| 00000a40 3a 6d 6f 6e 25 3d 6d 6f 6e 25 2d 31 0d 04 74 20 |:mon%=mon%-1..t | 00000a50 e7 20 6d 6f 6e 25 3d 30 20 6d 6f 6e 25 3d 31 32 |. mon%=0 mon%=12| 00000a60 3a 79 65 61 72 3d 79 65 61 72 2d 31 0d 04 7e 1d |:year=year-1..~.| 00000a70 e7 20 79 65 61 72 3c 30 20 79 65 61 72 3d 30 3a |. year<0 year=0:| 00000a80 6d 6f 6e 25 3d 31 3a ef 37 0d 04 88 05 e1 0d 04 |mon%=1:.7.......| 00000a90 92 12 dd f2 49 6e 73 74 72 75 63 74 69 6f 6e 73 |....Instructions| 00000aa0 0d 04 9c 2b f1 27 27 22 44 6f 20 79 6f 75 20 72 |...+.''"Do you r| 00000ab0 65 71 75 69 72 65 20 69 6e 73 74 72 75 63 74 69 |equire instructi| 00000ac0 6f 6e 73 3f 20 28 59 2f 4e 29 22 0d 04 a6 07 41 |ons? (Y/N)"....A| 00000ad0 3d a5 0d 04 b0 0f e7 20 41 3d 37 38 8c 8d 54 54 |=...... A=78..TT| 00000ae0 45 0d 04 ba 10 e7 20 41 3c 3e 38 39 8c 8d 74 66 |E..... A<>89..tf| 00000af0 44 0d 04 c4 07 db 3a f1 0d 04 ce 4b f1 22 54 68 |D.....:....K."Th| 00000b00 69 73 20 70 72 6f 67 72 61 6d 20 77 69 6c 6c 20 |is program will | 00000b10 64 69 73 70 6c 61 79 20 61 20 63 61 6c 65 6e 64 |display a calend| 00000b20 61 72 20 66 6f 72 61 6e 79 20 6d 6f 6e 74 68 20 |ar forany month | 00000b30 66 72 6f 6d 20 30 20 41 44 20 6f 6e 77 61 72 64 |from 0 AD onward| 00000b40 73 2e 22 0d 04 d8 7a f1 27 22 45 6e 74 65 72 20 |s."...z.'"Enter | 00000b50 74 68 65 20 6d 6f 6e 74 68 20 61 6e 64 20 79 65 |the month and ye| 00000b60 61 72 2e 20 54 68 65 20 6d 6f 6e 74 68 20 6d 61 |ar. The month ma| 00000b70 79 20 62 65 20 65 6e 74 65 72 65 64 20 61 73 20 |y be entered as | 00000b80 61 20 6e 75 6d 62 65 72 20 6f 72 20 6c 65 74 74 |a number or lett| 00000b90 65 72 73 20 28 6f 6e 6c 79 20 74 68 65 20 66 69 |ers (only the fi| 00000ba0 72 73 74 20 33 20 6c 65 74 74 65 72 73 20 61 72 |rst 3 letters ar| 00000bb0 65 20 72 65 71 75 69 72 65 64 29 2e 22 0d 04 e2 |e required)."...| 00000bc0 7d f1 27 22 54 68 65 20 6d 6f 6e 74 68 20 61 6e |}.'"The month an| 00000bd0 64 20 79 65 61 72 20 6d 75 73 74 20 62 65 20 73 |d year must be s| 00000be0 65 70 61 72 61 74 65 64 20 62 79 20 61 20 73 69 |eparated by a si| 00000bf0 6e 67 6c 65 20 66 75 6c 6c 20 73 74 6f 70 20 6f |ngle full stop o| 00000c00 72 20 73 70 61 63 65 2e 20 49 66 20 74 68 65 20 |r space. If the | 00000c10 79 65 61 72 65 6e 74 65 72 65 64 20 69 73 20 6c |yearentered is l| 00000c20 65 73 73 20 74 68 61 6e 20 31 30 30 2c 20 65 2e |ess than 100, e.| 00000c30 67 2e 20 38 34 2c 20 69 74 22 0d 04 ec ab f1 22 |g. 84, it"....."| 00000c40 77 69 6c 6c 20 62 65 20 61 73 73 75 6d 65 64 20 |will be assumed | 00000c50 74 6f 20 62 65 20 69 6e 20 74 68 65 20 32 30 74 |to be in the 20t| 00000c60 68 22 27 22 63 65 6e 74 75 72 79 2c 20 65 2e 67 |h"'"century, e.g| 00000c70 2e 20 31 39 38 34 2e 20 49 66 20 79 6f 75 20 77 |. 1984. If you w| 00000c80 61 6e 74 20 74 6f 20 65 6e 74 65 72 61 20 64 61 |ant to entera da| 00000c90 74 65 20 69 6e 20 74 68 65 20 31 73 74 20 63 65 |te in the 1st ce| 00000ca0 6e 74 75 72 79 20 41 44 2c 20 74 79 70 65 20 41 |ntury AD, type A| 00000cb0 44 20 6f 6e 74 68 65 20 65 6e 64 20 6f 66 20 74 |D onthe end of t| 00000cc0 68 65 20 79 65 61 72 2c 20 65 2e 67 2e 20 4e 4f |he year, e.g. NO| 00000cd0 56 2e 38 34 41 44 20 6f 72 20 20 20 31 31 2e 38 |V.84AD or 11.8| 00000ce0 34 41 44 2e 22 0d 04 f6 88 f1 27 22 54 6f 20 64 |4AD.".....'"To d| 00000cf0 69 73 70 6c 61 79 20 74 68 65 20 6e 65 78 74 20 |isplay the next | 00000d00 6d 6f 6e 74 68 2c 20 70 72 65 73 73 20 3e 2e 22 |month, press >."| 00000d10 27 22 54 6f 20 64 69 73 70 6c 61 79 20 74 68 65 |'"To display the| 00000d20 20 70 72 65 76 69 6f 75 73 20 6d 6f 6e 74 68 2c | previous month,| 00000d30 20 70 72 65 73 73 20 3c 2e 20 54 6f 20 64 69 73 | press <. To dis| 00000d40 70 6c 61 79 20 61 6e 79 20 6f 74 68 65 72 20 6d |play any other m| 00000d50 6f 6e 74 68 2c 20 70 72 65 73 73 20 61 6e 79 20 |onth, press any | 00000d60 20 20 6f 74 68 65 72 20 6b 65 79 2e 22 0d 05 00 | other key."...| 00000d70 22 f1 27 22 50 72 65 73 73 20 61 6e 79 20 6b 65 |".'"Press any ke| 00000d80 79 20 74 6f 20 63 6f 6e 74 69 6e 75 65 2e 22 0d |y to continue.".| 00000d90 05 0a 09 41 3d a5 3a db 0d 05 14 05 e1 0d ff |...A=.:........| 00000d9f