Home » Archimedes archive » Micro User » MU 1991-12.adf » Listings » 8bitDisc/Digital

8bitDisc/Digital

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 » Archimedes archive » Micro User » MU 1991-12.adf » Listings
Filename: 8bitDisc/Digital
Read OK:
File size: 01E8 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
   10 REM Digital Clock (12 or 24 Hour)
   20 REM by Jon Millington
   30 REM (c) The Micro User
   40 MODE 7
   50 INPUT'"Enter 1-12h or 0-24h "T
   60 INPUT'"Give time now"''"Hours? "H
   70 INPUT'"Minutes? "M'"Seconds? "S
   80 IF T THEN L=12 ELSE L=24
   90 CLS:VDU 23,1,0;0;0;0;
  100 TIME=100*(3600*H+60*M+S)
  110 REPEAT
  120 H=(TIME DIV 360000-T) MOD L+T
  130 M=(TIME DIV 6000) MOD 60
  140 S=(TIME DIV 100) MOD 60
  150 FOR C=11 TO 12
  160 PRINT TAB(14,C)CHR$ 141;
  170 IF H<10 AND T=0 THEN PRINT;0;
  180 PRINT;H SPC 2;
  190 IF M<10 THEN PRINT;0;
  200 PRINT;M SPC 2;
  210 IF S<10 THEN PRINT;0;
  220 PRINT;S SPC 2;
  230 NEXT C
  240 UNTIL FALSE

$ � Digital Clock (12 or 24 Hour)
 � by Jon Millington
 � (c) The Micro User
( � 7
2 �'"Enter 1-12h or 0-24h "T
<" �'"Give time now"''"Hours? "H
F  �'"Minutes? "M'"Seconds? "S
P � T � L=12 � L=24
Z �:� 23,1,0;0;0;0;
d �=100*(3600*H+60*M+S)
n �
x H=(� � 360000-T) � L+T
� M=(� � 6000) � 60
� S=(� � 100) � 60
� � C=11 � 12
� � �14,C)� 141;
� � H<10 � T=0 � �;0;
�
 �;H � 2;
� � M<10 � �;0;
�
 �;M � 2;
� � S<10 � �;0;
�
 �;S � 2;
� � C
� � �
�
00000000  0d 00 0a 24 20 f4 20 44  69 67 69 74 61 6c 20 43  |...$ . Digital C|
00000010  6c 6f 63 6b 20 28 31 32  20 6f 72 20 32 34 20 48  |lock (12 or 24 H|
00000020  6f 75 72 29 0d 00 14 18  20 f4 20 62 79 20 4a 6f  |our).... . by Jo|
00000030  6e 20 4d 69 6c 6c 69 6e  67 74 6f 6e 0d 00 1e 19  |n Millington....|
00000040  20 f4 20 28 63 29 20 54  68 65 20 4d 69 63 72 6f  | . (c) The Micro|
00000050  20 55 73 65 72 0d 00 28  08 20 eb 20 37 0d 00 32  | User..(. . 7..2|
00000060  1f 20 e8 27 22 45 6e 74  65 72 20 31 2d 31 32 68  |. .'"Enter 1-12h|
00000070  20 6f 72 20 30 2d 32 34  68 20 22 54 0d 00 3c 22  | or 0-24h "T..<"|
00000080  20 e8 27 22 47 69 76 65  20 74 69 6d 65 20 6e 6f  | .'"Give time no|
00000090  77 22 27 27 22 48 6f 75  72 73 3f 20 22 48 0d 00  |w"''"Hours? "H..|
000000a0  46 20 20 e8 27 22 4d 69  6e 75 74 65 73 3f 20 22  |F  .'"Minutes? "|
000000b0  4d 27 22 53 65 63 6f 6e  64 73 3f 20 22 53 0d 00  |M'"Seconds? "S..|
000000c0  50 16 20 e7 20 54 20 8c  20 4c 3d 31 32 20 8b 20  |P. . T . L=12 . |
000000d0  4c 3d 32 34 0d 00 5a 16  20 db 3a ef 20 32 33 2c  |L=24..Z. .:. 23,|
000000e0  31 2c 30 3b 30 3b 30 3b  30 3b 0d 00 64 1a 20 d1  |1,0;0;0;0;..d. .|
000000f0  3d 31 30 30 2a 28 33 36  30 30 2a 48 2b 36 30 2a  |=100*(3600*H+60*|
00000100  4d 2b 53 29 0d 00 6e 06  20 f5 0d 00 78 1b 20 48  |M+S)..n. ...x. H|
00000110  3d 28 91 20 81 20 33 36  30 30 30 30 2d 54 29 20  |=(. . 360000-T) |
00000120  83 20 4c 2b 54 0d 00 82  16 20 4d 3d 28 91 20 81  |. L+T.... M=(. .|
00000130  20 36 30 30 30 29 20 83  20 36 30 0d 00 8c 15 20  | 6000) . 60.... |
00000140  53 3d 28 91 20 81 20 31  30 30 29 20 83 20 36 30  |S=(. . 100) . 60|
00000150  0d 00 96 10 20 e3 20 43  3d 31 31 20 b8 20 31 32  |.... . C=11 . 12|
00000160  0d 00 a0 13 20 f1 20 8a  31 34 2c 43 29 bd 20 31  |.... . .14,C). 1|
00000170  34 31 3b 0d 00 aa 18 20  e7 20 48 3c 31 30 20 80  |41;.... . H<10 .|
00000180  20 54 3d 30 20 8c 20 f1  3b 30 3b 0d 00 b4 0d 20  | T=0 . .;0;.... |
00000190  f1 3b 48 20 89 20 32 3b  0d 00 be 12 20 e7 20 4d  |.;H . 2;.... . M|
000001a0  3c 31 30 20 8c 20 f1 3b  30 3b 0d 00 c8 0d 20 f1  |<10 . .;0;.... .|
000001b0  3b 4d 20 89 20 32 3b 0d  00 d2 12 20 e7 20 53 3c  |;M . 2;.... . S<|
000001c0  31 30 20 8c 20 f1 3b 30  3b 0d 00 dc 0d 20 f1 3b  |10 . .;0;.... .;|
000001d0  53 20 89 20 32 3b 0d 00  e6 08 20 ed 20 43 0d 00  |S . 2;.... . C..|
000001e0  f0 08 20 fd 20 a3 0d ff                           |.. . ...|
000001e8