Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF » P/LEAP

P/LEAP

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 ADFS disks » Electron_User_Group » EUG_28.ADF
Filename: P/LEAP
Read OK:
File size: 024C bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM Leap Year checker from Roy Warner
   20REM Checks for a leap year 1990
   30REM onwards only until 2099
   40MODE6
   50REPEAT
   60PROCconstants
   70PROCyear
   80PROCtest
   90PROCresult
  100PROCexit
  110UNTIL a%=0:CLS
  120END
  130:
  140DEF PROCconstants
  150nlp$="Is not a leap year"
  160ilp$="Is a leap year"
  170ENDPROC
  180:
  190DEF PROCyear:CLS
  200PRINTTAB(13,6)"Give me a year"
  210INPUTTAB(12,9)"Enter year"a%
  220ENDPROC
  230:
  240DEF PROCtest
  250IF a% MOD 4<>0 THEN flag=FALSE ELSE IF a%=2000 THEN flag=FALSE ELSE flag=TRUE
  270ENDPROC
  280:
  290DEF PROCresult:CLS
  300PRINTTAB(13,6)"The year ";a%
  310IF flag THEN PRINTTAB(13,8)ilp$ ELSE PRINTTAB(10,8)nlp$
  320ENDPROC
  330:
  340DEF PROCexit
  350PRINTTAB(8,18)"Finished? Then type a Y"
  360a$=INKEY$350
  370IF a$="Y" THEN a%=0
  380ENDPROC

'� Leap Year checker from Roy Warner
!� Checks for a leap year 1990
� onwards only until 2099
(�6
2�
<�constants
F	�year
P	�test
Z�result
d	�exit
n� a%=0:�
x�
�:
�� �constants
�nlp$="Is not a leap year"
�ilp$="Is a leap year"
��
�:
�
� �year:�
��13,6)"Give me a year"
��12,9)"Enter year"a%
��
�:
�� �test
�6� a% � 4<>0 � flag=� � � a%=2000 � flag=� � flag=�
�
:
"� �result:�
,�13,6)"The year ";a%
6&� flag � �13,8)ilp$ � �10,8)nlp$
@�
J:
T� �exit
^$�8,18)"Finished? Then type a Y"
ha$=�350
r� a$="Y" � a%=0
|�
�
00000000  0d 00 0a 27 f4 20 4c 65  61 70 20 59 65 61 72 20  |...'. Leap Year |
00000010  63 68 65 63 6b 65 72 20  66 72 6f 6d 20 52 6f 79  |checker from Roy|
00000020  20 57 61 72 6e 65 72 0d  00 14 21 f4 20 43 68 65  | Warner...!. Che|
00000030  63 6b 73 20 66 6f 72 20  61 20 6c 65 61 70 20 79  |cks for a leap y|
00000040  65 61 72 20 31 39 39 30  0d 00 1e 1d f4 20 6f 6e  |ear 1990..... on|
00000050  77 61 72 64 73 20 6f 6e  6c 79 20 75 6e 74 69 6c  |wards only until|
00000060  20 32 30 39 39 0d 00 28  06 eb 36 0d 00 32 05 f5  | 2099..(..6..2..|
00000070  0d 00 3c 0e f2 63 6f 6e  73 74 61 6e 74 73 0d 00  |..<..constants..|
00000080  46 09 f2 79 65 61 72 0d  00 50 09 f2 74 65 73 74  |F..year..P..test|
00000090  0d 00 5a 0b f2 72 65 73  75 6c 74 0d 00 64 09 f2  |..Z..result..d..|
000000a0  65 78 69 74 0d 00 6e 0c  fd 20 61 25 3d 30 3a db  |exit..n.. a%=0:.|
000000b0  0d 00 78 05 e0 0d 00 82  05 3a 0d 00 8c 10 dd 20  |..x......:..... |
000000c0  f2 63 6f 6e 73 74 61 6e  74 73 0d 00 96 1d 6e 6c  |.constants....nl|
000000d0  70 24 3d 22 49 73 20 6e  6f 74 20 61 20 6c 65 61  |p$="Is not a lea|
000000e0  70 20 79 65 61 72 22 0d  00 a0 19 69 6c 70 24 3d  |p year"....ilp$=|
000000f0  22 49 73 20 61 20 6c 65  61 70 20 79 65 61 72 22  |"Is a leap year"|
00000100  0d 00 aa 05 e1 0d 00 b4  05 3a 0d 00 be 0d dd 20  |.........:..... |
00000110  f2 79 65 61 72 3a db 0d  00 c8 1b f1 8a 31 33 2c  |.year:.......13,|
00000120  36 29 22 47 69 76 65 20  6d 65 20 61 20 79 65 61  |6)"Give me a yea|
00000130  72 22 0d 00 d2 19 e8 8a  31 32 2c 39 29 22 45 6e  |r"......12,9)"En|
00000140  74 65 72 20 79 65 61 72  22 61 25 0d 00 dc 05 e1  |ter year"a%.....|
00000150  0d 00 e6 05 3a 0d 00 f0  0b dd 20 f2 74 65 73 74  |....:..... .test|
00000160  0d 00 fa 36 e7 20 61 25  20 83 20 34 3c 3e 30 20  |...6. a% . 4<>0 |
00000170  8c 20 66 6c 61 67 3d a3  20 8b 20 e7 20 61 25 3d  |. flag=. . . a%=|
00000180  32 30 30 30 20 8c 20 66  6c 61 67 3d a3 20 8b 20  |2000 . flag=. . |
00000190  66 6c 61 67 3d b9 0d 01  0e 05 e1 0d 01 18 05 3a  |flag=..........:|
000001a0  0d 01 22 0f dd 20 f2 72  65 73 75 6c 74 3a db 0d  |..".. .result:..|
000001b0  01 2c 19 f1 8a 31 33 2c  36 29 22 54 68 65 20 79  |.,...13,6)"The y|
000001c0  65 61 72 20 22 3b 61 25  0d 01 36 26 e7 20 66 6c  |ear ";a%..6&. fl|
000001d0  61 67 20 8c 20 f1 8a 31  33 2c 38 29 69 6c 70 24  |ag . ..13,8)ilp$|
000001e0  20 8b 20 f1 8a 31 30 2c  38 29 6e 6c 70 24 0d 01  | . ..10,8)nlp$..|
000001f0  40 05 e1 0d 01 4a 05 3a  0d 01 54 0b dd 20 f2 65  |@....J.:..T.. .e|
00000200  78 69 74 0d 01 5e 24 f1  8a 38 2c 31 38 29 22 46  |xit..^$..8,18)"F|
00000210  69 6e 69 73 68 65 64 3f  20 54 68 65 6e 20 74 79  |inished? Then ty|
00000220  70 65 20 61 20 59 22 0d  01 68 0b 61 24 3d bf 33  |pe a Y"..h.a$=.3|
00000230  35 30 0d 01 72 13 e7 20  61 24 3d 22 59 22 20 8c  |50..r.. a$="Y" .|
00000240  20 61 25 3d 30 0d 01 7c  05 e1 0d ff              | a%=0..|....|
0000024c
P/LEAP.m0
P/LEAP.m1
P/LEAP.m2
P/LEAP.m4
P/LEAP.m5