Home » CEEFAX disks » telesoftware16.adl » 03-06-89/Clock

03-06-89/Clock

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 » CEEFAX disks » telesoftware16.adl
Filename: 03-06-89/Clock
Read OK:
File size: 0CBB bytes
Load address: FFFF0E00
Exec address: FFFF802B
File contents
   10 REM     Clock
   20 REM     Ian Rickards, October 1988
   30 
   40 MODE 1
   50 DIM b% 13
   60 osbyte% = &FFF4
   70 osword% = &FFF1
   80 A% = &EB
   90 X% = 0
  100 Y% = &FF
  110 !b% = USR osbyte%
  120 ok% = b%?1
  130 X% = b% MOD 256
  140 Y% = b% DIV 256
  150 PROCreset
  160 IF ok% PRINT TAB( 9, 30 ) "Press SPACE for speech"
  170 VDU 5
  180 VDU 29, 640; 512;
  190 GCOL 3, 3
  200 PROCcircle( 28 )
  210 PROCcircle( 400 )
  220 PROCcircle( 420 )
  230 GCOL 0, 3
  240 FOR phi% = 0 TO 359 STEP 30
  250 c = COS RAD phi%
  260 s = SIN RAD phi%
  270 PROCbar( 15 )
  280 NEXT
  290 A% = 12
  300 back% = 4
  310 fore% = 2
  320 PROCset( 3, fore% )
  330 PROCset( 0, back% )
  340 PROCset( 1, back% )
  350 ?b% = 2
  360 col% = 1
  370 old% = TIME DIV 100
  380 REPEAT
  390 ready% = FALSE
  400 REPEAT
  410 REPEAT
  420 REPEAT
  430 new% = TIME DIV 100
  440 UNTIL new% > old%
  450 PROCdraw( 1, new% )
  460 SOUND 0, -9, 1, 1
  470 b%!1 = back%
  480 CALL osword%
  490 ?b% = col%
  500 b%!1 = fore%
  510 CALL osword%
  520 PROCdraw( 2, old% )
  530 old% = new%
  540 col% = 3 EOR col%
  550 UNTIL ok%
  560 IF NOT INKEY -99 LET ready% = TRUE
  570 UNTIL ready% AND INKEY -99
  580 time% = new% DIV 60 + 660
  590 h% = time% DIV 60 MOD 12 + 1
  600 m% = time% MOD 60
  610 PROCsay( 267 )
  620 PROCsay( 271 )
  630 PROCsay( 209 )
  640 PROCsay( 228 )
  650 PROCspeak( h% )
  660 IF m% > 0 PROCminutes ELSE PROCsay( 231 )
  670 UNTIL FALSE
  680 END
  690 
  700 DEF PROCcircle( radius% )
  710 square% = ( radius% + 4 ) ^ 2
  720 FOR loop% = 4 TO radius% STEP 4
  730 width% = SQR ( square% - loop% ^ 2 )
  740 MOVE 3 - width%, loop% - 2
  750 DRAW width% - 4, loop% - 2
  760 MOVE 3 - width%, 2 - loop%
  770 DRAW width% - 4, 2 - loop%
  780 NEXT
  790 ENDPROC
  800 
  810 DEF PROCbar( size% )
  820 u% = size% * c
  830 v% = size% * s
  840 PROCplot( 404, 4 )
  850 PROCplot( 388 - size%, 85 )
  860 ENDPROC
  870 
  880 DEF PROCplot( radius%, k% )
  890 x% = radius% * s AND -4
  900 y% = radius% * c AND -4
  910 PLOT k%, x% - u%, y% + v%
  920 PLOT k%, x% + u%, y% - v%
  930 ENDPROC
  940 
  950 DEF PROCdraw( mode%, time% )
  960 GCOL mode%, col%
  970 PROChand( 260, 15, time% DIV 120 )
  980 PROChand( 340, 11, time% DIV 10 MOD 360 )
  990 PROChand( 360, 7, time% MOD 60 * 6 )
 1000 ENDPROC
 1010 
 1020 DEF PROChand( radius%, width%, phi% )
 1030 c = COS RAD phi%
 1040 s = SIN RAD phi%
 1050 u% = width% * c
 1060 v% = width% * s
 1070 PROCplot( radius%, 4 )
 1080 PROCplot( 80, 85 )
 1090 ENDPROC
 1100 
 1110 DEF PROCset( logical%, actual% )
 1120 ?b% = logical%
 1130 b%!1 = actual%
 1140 CALL osword%
 1150 ENDPROC
 1160 
 1170 DEF PROCreset
 1180 A% = &7A
 1190 ?b% = 17
 1200 b%?1 = 1
 1210 CALL osword%
 1220 IF b%?1 = 0 PROCtsdp ELSE PROCrtc
 1230 TIME = 100 * ( 60 * ( 60 * h% + m% ) + s% )
 1240 ENDPROC
 1250 
 1260 DEF PROCrtc
 1270 A% = 14
 1280 ?b% = 1
 1290 b%?3 = 0
 1300 CALL osword%
 1310 IF b%?3 > 0 PROCtime ELSE PROCask
 1320 ENDPROC
 1330 
 1340 DEF PROCask
 1350 PRINT SPC 6 "Please enter the current time"
 1360 INPUT TAB( 16, 10 ) "Hours", h%
 1370 INPUT TAB( 14, 13 ) "Minutes", m%
 1380 INPUT TAB( 14, 16 ) "Seconds", s%
 1390 CLS
 1400 ENDPROC
 1410 
 1420 DEF PROCtsdp
 1430 *ch1
 1440 ?b% = 15
 1450 REPEAT
 1460 CALL osword%
 1470 UNTIL b%?1 < 8
 1480 *ttxoff
 1490 h% = FNbcd( 11 ) + b%?7 DIV 4 MOD 2
 1500 m% = FNbcd( 12 )
 1510 s% = FNbcd( 13 )
 1520 ENDPROC
 1530 
 1540 DEF PROCtime
 1550 h% = FNbcd( 4 )
 1560 m% = FNbcd( 5 )
 1570 s% = FNbcd( 6 )
 1580 ENDPROC
 1590 
 1600 DEF FNbcd( at% ) = VAL STR$ ~b%?at%
 1610 
 1620 DEF PROCminutes
 1630 IF m% < 10 PROCsay( 79 )
 1640 PROCspeak( m% )
 1650 ENDPROC
 1660 
 1670 DEF PROCsay( code% )
 1680 SOUND -1, code%, 0, 0
 1690 ENDPROC
 1700 
 1710 DEF PROCspeak( n% )
 1720 i% = n% DIV 10
 1730 j% = n% MOD 10
 1740 IF i% > 1 PROCtens
 1750 IF i% = 1 PROCodd ELSE IF j% > 0 PROCsay( 48 + j% )
 1760 ENDPROC
 1770 
 1780 DEF PROCtens
 1790 PROCsay( 32 + i% )
 1800 PROCsay( 137 )
 1810 ENDPROC
 1820 
 1830 DEF PROCodd
 1840 IF j% = 0 PROCsay( 33 )
 1850 IF j% = 1 PROCsay( 190 )
 1860 IF j% = 2 PROCsay( 273 )
 1870 IF j% > 2 PROCteen
 1880 ENDPROC
 1890 
 1900 DEF PROCteen
 1910 PROCsay( 32 + j% )
 1920 PROCsay( 135 )
 1930 ENDPROC

 �     Clock
% �     Ian Rickards, October 1988
 
( � 1
2 � b% 13
< osbyte% = &FFF4
F osword% = &FFF1
P
 A% = &EB
Z X% = 0
d
 Y% = &FF
n !b% = � osbyte%
x ok% = b%?1
� X% = b% � 256
� Y% = b% � 256
� �reset
�/ � ok% � � 9, 30 ) "Press SPACE for speech"
� � 5
� � 29, 640; 512;
� � 3, 3
� �circle( 28 )
� �circle( 400 )
� �circle( 420 )
� � 0, 3
� � phi% = 0 � 359 � 30
� c = � � phi%
 s = � � phi%
 �bar( 15 )
 �
" A% = 12
, back% = 4
6 fore% = 2
@ �set( 3, fore% )
J �set( 0, back% )
T �set( 1, back% )
^ ?b% = 2
h
 col% = 1
r old% = � � 100
| �
� ready% = �
� �
� �
� �
� new% = � � 100
� � new% > old%
� �draw( 1, new% )
� � 0, -9, 1, 1
� b%!1 = back%
� � osword%
� ?b% = col%
� b%!1 = fore%
� � osword%
 �draw( 2, old% )
 old% = new%
 col% = 3 � col%
&
 � ok%
0 � � � -99 � ready% = �
: � ready% � � -99
D time% = new% � 60 + 660
N h% = time% � 60 � 12 + 1
X m% = time% � 60
b �say( 267 )
l �say( 271 )
v �say( 209 )
� �say( 228 )
� �speak( h% )
�$ � m% > 0 �minutes � �say( 231 )
� � �
� �
� 
� � �circle( radius% )
�" square% = ( radius% + 4 ) ^ 2
� � loop% = 4 � radius% � 4
�' width% = � ( square% - loop% ^ 2 )
� � 3 - width%, loop% - 2
� � width% - 4, loop% - 2
� � 3 - width%, 2 - loop%
 � width% - 4, 2 - loop%
 �
 �
  
* � �bar( size% )
4 u% = size% * c
> v% = size% * s
H �plot( 404, 4 )
R �plot( 388 - size%, 85 )
\ �
f 
p � �plot( radius%, k% )
z x% = radius% * s � -4
� y% = radius% * c � -4
� � k%, x% - u%, y% + v%
� � k%, x% + u%, y% - v%
� �
� 
� � �draw( mode%, time% )
� � mode%, col%
�" �hand( 260, 15, time% � 120 )
�' �hand( 340, 11, time% � 10 � 360 )
�$ �hand( 360, 7, time% � 60 * 6 )
� �
� 
�% � �hand( radius%, width%, phi% )
 c = � � phi%
 s = � � phi%
 u% = width% * c
$ v% = width% * s
. �plot( radius%, 4 )
8 �plot( 80, 85 )
B �
L 
V  � �set( logical%, actual% )
` ?b% = logical%
j b%!1 = actual%
t � osword%
~ �
� 
�
 � �reset
�
 A% = &7A
�
 ?b% = 17
�
 b%?1 = 1
� � osword%
� � b%?1 = 0 �tsdp � �rtc
�- � = 100 * ( 60 * ( 60 * h% + m% ) + s% )
� �
� 
� � �rtc
� A% = 14
 ?b% = 1


 b%?3 = 0
 � osword%
 � b%?3 > 0 �time � �ask
( �
2 
< � �ask
F* � � 6 "Please enter the current time"
P � � 16, 10 ) "Hours", h%
Z � � 14, 13 ) "Minutes", m%
d � � 14, 16 ) "Seconds", s%
n �
x �
� 
� � �tsdp
�	 *ch1
�
 ?b% = 15
� �
� � osword%
� � b%?1 < 8
� *ttxoff
�# h% = �bcd( 11 ) + b%?7 � 4 � 2
� m% = �bcd( 12 )
� s% = �bcd( 13 )
� �
� 
 � �time
 h% = �bcd( 4 )
 m% = �bcd( 5 )
" s% = �bcd( 6 )
, �
6 
@  � �bcd( at% ) = � � ~b%?at%
J 
T � �minutes
^ � m% < 10 �say( 79 )
h �speak( m% )
r �
| 
� � �say( code% )
� � -1, code%, 0, 0
� �
� 
� � �speak( n% )
� i% = n% � 10
� j% = n% � 10
� � i% > 1 �tens
�- � i% = 1 �odd � � j% > 0 �say( 48 + j% )
� �
� 
� � �tens
� �say( 32 + i% )
 �say( 137 )
 �
 
& � �odd
0 � j% = 0 �say( 33 )
: � j% = 1 �say( 190 )
D � j% = 2 �say( 273 )
N � j% > 2 �teen
X �
b 
l � �teen
v �say( 32 + j% )
� �say( 135 )
� �
�
00000000  0d 00 0a 10 20 f4 20 20  20 20 20 43 6c 6f 63 6b  |.... .     Clock|
00000010  0d 00 14 25 20 f4 20 20  20 20 20 49 61 6e 20 52  |...% .     Ian R|
00000020  69 63 6b 61 72 64 73 2c  20 4f 63 74 6f 62 65 72  |ickards, October|
00000030  20 31 39 38 38 0d 00 1e  05 20 0d 00 28 08 20 eb  | 1988.... ..(. .|
00000040  20 31 0d 00 32 0c 20 de  20 62 25 20 31 33 0d 00  | 1..2. . b% 13..|
00000050  3c 14 20 6f 73 62 79 74  65 25 20 3d 20 26 46 46  |<. osbyte% = &FF|
00000060  46 34 0d 00 46 14 20 6f  73 77 6f 72 64 25 20 3d  |F4..F. osword% =|
00000070  20 26 46 46 46 31 0d 00  50 0d 20 41 25 20 3d 20  | &FFF1..P. A% = |
00000080  26 45 42 0d 00 5a 0b 20  58 25 20 3d 20 30 0d 00  |&EB..Z. X% = 0..|
00000090  64 0d 20 59 25 20 3d 20  26 46 46 0d 00 6e 14 20  |d. Y% = &FF..n. |
000000a0  21 62 25 20 3d 20 ba 20  6f 73 62 79 74 65 25 0d  |!b% = . osbyte%.|
000000b0  00 78 0f 20 6f 6b 25 20  3d 20 62 25 3f 31 0d 00  |.x. ok% = b%?1..|
000000c0  82 12 20 58 25 20 3d 20  62 25 20 83 20 32 35 36  |.. X% = b% . 256|
000000d0  0d 00 8c 12 20 59 25 20  3d 20 62 25 20 81 20 32  |.... Y% = b% . 2|
000000e0  35 36 0d 00 96 0b 20 f2  72 65 73 65 74 0d 00 a0  |56.... .reset...|
000000f0  2f 20 e7 20 6f 6b 25 20  f1 20 8a 20 39 2c 20 33  |/ . ok% . . 9, 3|
00000100  30 20 29 20 22 50 72 65  73 73 20 53 50 41 43 45  |0 ) "Press SPACE|
00000110  20 66 6f 72 20 73 70 65  65 63 68 22 0d 00 aa 08  | for speech"....|
00000120  20 ef 20 35 0d 00 b4 14  20 ef 20 32 39 2c 20 36  | . 5.... . 29, 6|
00000130  34 30 3b 20 35 31 32 3b  0d 00 be 0b 20 e6 20 33  |40; 512;.... . 3|
00000140  2c 20 33 0d 00 c8 12 20  f2 63 69 72 63 6c 65 28  |, 3.... .circle(|
00000150  20 32 38 20 29 0d 00 d2  13 20 f2 63 69 72 63 6c  | 28 ).... .circl|
00000160  65 28 20 34 30 30 20 29  0d 00 dc 13 20 f2 63 69  |e( 400 ).... .ci|
00000170  72 63 6c 65 28 20 34 32  30 20 29 0d 00 e6 0b 20  |rcle( 420 ).... |
00000180  e6 20 30 2c 20 33 0d 00  f0 1a 20 e3 20 70 68 69  |. 0, 3.... . phi|
00000190  25 20 3d 20 30 20 b8 20  33 35 39 20 88 20 33 30  |% = 0 . 359 . 30|
000001a0  0d 00 fa 11 20 63 20 3d  20 9b 20 b2 20 70 68 69  |.... c = . . phi|
000001b0  25 0d 01 04 11 20 73 20  3d 20 b5 20 b2 20 70 68  |%.... s = . . ph|
000001c0  69 25 0d 01 0e 0f 20 f2  62 61 72 28 20 31 35 20  |i%.... .bar( 15 |
000001d0  29 0d 01 18 06 20 ed 0d  01 22 0c 20 41 25 20 3d  |).... ...". A% =|
000001e0  20 31 32 0d 01 2c 0e 20  62 61 63 6b 25 20 3d 20  | 12..,. back% = |
000001f0  34 0d 01 36 0e 20 66 6f  72 65 25 20 3d 20 32 0d  |4..6. fore% = 2.|
00000200  01 40 15 20 f2 73 65 74  28 20 33 2c 20 66 6f 72  |.@. .set( 3, for|
00000210  65 25 20 29 0d 01 4a 15  20 f2 73 65 74 28 20 30  |e% )..J. .set( 0|
00000220  2c 20 62 61 63 6b 25 20  29 0d 01 54 15 20 f2 73  |, back% )..T. .s|
00000230  65 74 28 20 31 2c 20 62  61 63 6b 25 20 29 0d 01  |et( 1, back% )..|
00000240  5e 0c 20 3f 62 25 20 3d  20 32 0d 01 68 0d 20 63  |^. ?b% = 2..h. c|
00000250  6f 6c 25 20 3d 20 31 0d  01 72 13 20 6f 6c 64 25  |ol% = 1..r. old%|
00000260  20 3d 20 91 20 81 20 31  30 30 0d 01 7c 06 20 f5  | = . . 100..|. .|
00000270  0d 01 86 0f 20 72 65 61  64 79 25 20 3d 20 a3 0d  |.... ready% = ..|
00000280  01 90 06 20 f5 0d 01 9a  06 20 f5 0d 01 a4 06 20  |... ..... ..... |
00000290  f5 0d 01 ae 13 20 6e 65  77 25 20 3d 20 91 20 81  |..... new% = . .|
000002a0  20 31 30 30 0d 01 b8 12  20 fd 20 6e 65 77 25 20  | 100.... . new% |
000002b0  3e 20 6f 6c 64 25 0d 01  c2 15 20 f2 64 72 61 77  |> old%.... .draw|
000002c0  28 20 31 2c 20 6e 65 77  25 20 29 0d 01 cc 12 20  |( 1, new% ).... |
000002d0  d4 20 30 2c 20 2d 39 2c  20 31 2c 20 31 0d 01 d6  |. 0, -9, 1, 1...|
000002e0  11 20 62 25 21 31 20 3d  20 62 61 63 6b 25 0d 01  |. b%!1 = back%..|
000002f0  e0 0e 20 d6 20 6f 73 77  6f 72 64 25 0d 01 ea 0f  |.. . osword%....|
00000300  20 3f 62 25 20 3d 20 63  6f 6c 25 0d 01 f4 11 20  | ?b% = col%.... |
00000310  62 25 21 31 20 3d 20 66  6f 72 65 25 0d 01 fe 0e  |b%!1 = fore%....|
00000320  20 d6 20 6f 73 77 6f 72  64 25 0d 02 08 15 20 f2  | . osword%.... .|
00000330  64 72 61 77 28 20 32 2c  20 6f 6c 64 25 20 29 0d  |draw( 2, old% ).|
00000340  02 12 10 20 6f 6c 64 25  20 3d 20 6e 65 77 25 0d  |... old% = new%.|
00000350  02 1c 14 20 63 6f 6c 25  20 3d 20 33 20 82 20 63  |... col% = 3 . c|
00000360  6f 6c 25 0d 02 26 0a 20  fd 20 6f 6b 25 0d 02 30  |ol%..&. . ok%..0|
00000370  1b 20 e7 20 ac 20 a6 20  2d 39 39 20 e9 20 72 65  |. . . . -99 . re|
00000380  61 64 79 25 20 3d 20 b9  0d 02 3a 15 20 fd 20 72  |ady% = ...:. . r|
00000390  65 61 64 79 25 20 80 20  a6 20 2d 39 39 0d 02 44  |eady% . . -99..D|
000003a0  1c 20 74 69 6d 65 25 20  3d 20 6e 65 77 25 20 81  |. time% = new% .|
000003b0  20 36 30 20 2b 20 36 36  30 0d 02 4e 1d 20 68 25  | 60 + 660..N. h%|
000003c0  20 3d 20 74 69 6d 65 25  20 81 20 36 30 20 83 20  | = time% . 60 . |
000003d0  31 32 20 2b 20 31 0d 02  58 14 20 6d 25 20 3d 20  |12 + 1..X. m% = |
000003e0  74 69 6d 65 25 20 83 20  36 30 0d 02 62 10 20 f2  |time% . 60..b. .|
000003f0  73 61 79 28 20 32 36 37  20 29 0d 02 6c 10 20 f2  |say( 267 )..l. .|
00000400  73 61 79 28 20 32 37 31  20 29 0d 02 76 10 20 f2  |say( 271 )..v. .|
00000410  73 61 79 28 20 32 30 39  20 29 0d 02 80 10 20 f2  |say( 209 ).... .|
00000420  73 61 79 28 20 32 32 38  20 29 0d 02 8a 11 20 f2  |say( 228 ).... .|
00000430  73 70 65 61 6b 28 20 68  25 20 29 0d 02 94 24 20  |speak( h% )...$ |
00000440  e7 20 6d 25 20 3e 20 30  20 f2 6d 69 6e 75 74 65  |. m% > 0 .minute|
00000450  73 20 8b 20 f2 73 61 79  28 20 32 33 31 20 29 0d  |s . .say( 231 ).|
00000460  02 9e 08 20 fd 20 a3 0d  02 a8 06 20 e0 0d 02 b2  |... . ..... ....|
00000470  05 20 0d 02 bc 19 20 dd  20 f2 63 69 72 63 6c 65  |. .... . .circle|
00000480  28 20 72 61 64 69 75 73  25 20 29 0d 02 c6 22 20  |( radius% )..." |
00000490  73 71 75 61 72 65 25 20  3d 20 28 20 72 61 64 69  |square% = ( radi|
000004a0  75 73 25 20 2b 20 34 20  29 20 5e 20 32 0d 02 d0  |us% + 4 ) ^ 2...|
000004b0  1e 20 e3 20 6c 6f 6f 70  25 20 3d 20 34 20 b8 20  |. . loop% = 4 . |
000004c0  72 61 64 69 75 73 25 20  88 20 34 0d 02 da 27 20  |radius% . 4...' |
000004d0  77 69 64 74 68 25 20 3d  20 b6 20 28 20 73 71 75  |width% = . ( squ|
000004e0  61 72 65 25 20 2d 20 6c  6f 6f 70 25 20 5e 20 32  |are% - loop% ^ 2|
000004f0  20 29 0d 02 e4 1c 20 ec  20 33 20 2d 20 77 69 64  | ).... . 3 - wid|
00000500  74 68 25 2c 20 6c 6f 6f  70 25 20 2d 20 32 0d 02  |th%, loop% - 2..|
00000510  ee 1c 20 df 20 77 69 64  74 68 25 20 2d 20 34 2c  |.. . width% - 4,|
00000520  20 6c 6f 6f 70 25 20 2d  20 32 0d 02 f8 1c 20 ec  | loop% - 2.... .|
00000530  20 33 20 2d 20 77 69 64  74 68 25 2c 20 32 20 2d  | 3 - width%, 2 -|
00000540  20 6c 6f 6f 70 25 0d 03  02 1c 20 df 20 77 69 64  | loop%.... . wid|
00000550  74 68 25 20 2d 20 34 2c  20 32 20 2d 20 6c 6f 6f  |th% - 4, 2 - loo|
00000560  70 25 0d 03 0c 06 20 ed  0d 03 16 06 20 e1 0d 03  |p%.... ..... ...|
00000570  20 05 20 0d 03 2a 14 20  dd 20 f2 62 61 72 28 20  | . ..*. . .bar( |
00000580  73 69 7a 65 25 20 29 0d  03 34 13 20 75 25 20 3d  |size% )..4. u% =|
00000590  20 73 69 7a 65 25 20 2a  20 63 0d 03 3e 13 20 76  | size% * c..>. v|
000005a0  25 20 3d 20 73 69 7a 65  25 20 2a 20 73 0d 03 48  |% = size% * s..H|
000005b0  14 20 f2 70 6c 6f 74 28  20 34 30 34 2c 20 34 20  |. .plot( 404, 4 |
000005c0  29 0d 03 52 1d 20 f2 70  6c 6f 74 28 20 33 38 38  |)..R. .plot( 388|
000005d0  20 2d 20 73 69 7a 65 25  2c 20 38 35 20 29 0d 03  | - size%, 85 )..|
000005e0  5c 06 20 e1 0d 03 66 05  20 0d 03 70 1b 20 dd 20  |\. ...f. ..p. . |
000005f0  f2 70 6c 6f 74 28 20 72  61 64 69 75 73 25 2c 20  |.plot( radius%, |
00000600  6b 25 20 29 0d 03 7a 1a  20 78 25 20 3d 20 72 61  |k% )..z. x% = ra|
00000610  64 69 75 73 25 20 2a 20  73 20 80 20 2d 34 0d 03  |dius% * s . -4..|
00000620  84 1a 20 79 25 20 3d 20  72 61 64 69 75 73 25 20  |.. y% = radius% |
00000630  2a 20 63 20 80 20 2d 34  0d 03 8e 1b 20 f0 20 6b  |* c . -4.... . k|
00000640  25 2c 20 78 25 20 2d 20  75 25 2c 20 79 25 20 2b  |%, x% - u%, y% +|
00000650  20 76 25 0d 03 98 1b 20  f0 20 6b 25 2c 20 78 25  | v%.... . k%, x%|
00000660  20 2b 20 75 25 2c 20 79  25 20 2d 20 76 25 0d 03  | + u%, y% - v%..|
00000670  a2 06 20 e1 0d 03 ac 05  20 0d 03 b6 1c 20 dd 20  |.. ..... .... . |
00000680  f2 64 72 61 77 28 20 6d  6f 64 65 25 2c 20 74 69  |.draw( mode%, ti|
00000690  6d 65 25 20 29 0d 03 c0  12 20 e6 20 6d 6f 64 65  |me% ).... . mode|
000006a0  25 2c 20 63 6f 6c 25 0d  03 ca 22 20 f2 68 61 6e  |%, col%..." .han|
000006b0  64 28 20 32 36 30 2c 20  31 35 2c 20 74 69 6d 65  |d( 260, 15, time|
000006c0  25 20 81 20 31 32 30 20  29 0d 03 d4 27 20 f2 68  |% . 120 )...' .h|
000006d0  61 6e 64 28 20 33 34 30  2c 20 31 31 2c 20 74 69  |and( 340, 11, ti|
000006e0  6d 65 25 20 81 20 31 30  20 83 20 33 36 30 20 29  |me% . 10 . 360 )|
000006f0  0d 03 de 24 20 f2 68 61  6e 64 28 20 33 36 30 2c  |...$ .hand( 360,|
00000700  20 37 2c 20 74 69 6d 65  25 20 83 20 36 30 20 2a  | 7, time% . 60 *|
00000710  20 36 20 29 0d 03 e8 06  20 e1 0d 03 f2 05 20 0d  | 6 ).... ..... .|
00000720  03 fc 25 20 dd 20 f2 68  61 6e 64 28 20 72 61 64  |..% . .hand( rad|
00000730  69 75 73 25 2c 20 77 69  64 74 68 25 2c 20 70 68  |ius%, width%, ph|
00000740  69 25 20 29 0d 04 06 11  20 63 20 3d 20 9b 20 b2  |i% ).... c = . .|
00000750  20 70 68 69 25 0d 04 10  11 20 73 20 3d 20 b5 20  | phi%.... s = . |
00000760  b2 20 70 68 69 25 0d 04  1a 14 20 75 25 20 3d 20  |. phi%.... u% = |
00000770  77 69 64 74 68 25 20 2a  20 63 0d 04 24 14 20 76  |width% * c..$. v|
00000780  25 20 3d 20 77 69 64 74  68 25 20 2a 20 73 0d 04  |% = width% * s..|
00000790  2e 18 20 f2 70 6c 6f 74  28 20 72 61 64 69 75 73  |.. .plot( radius|
000007a0  25 2c 20 34 20 29 0d 04  38 14 20 f2 70 6c 6f 74  |%, 4 )..8. .plot|
000007b0  28 20 38 30 2c 20 38 35  20 29 0d 04 42 06 20 e1  |( 80, 85 )..B. .|
000007c0  0d 04 4c 05 20 0d 04 56  20 20 dd 20 f2 73 65 74  |..L. ..V  . .set|
000007d0  28 20 6c 6f 67 69 63 61  6c 25 2c 20 61 63 74 75  |( logical%, actu|
000007e0  61 6c 25 20 29 0d 04 60  13 20 3f 62 25 20 3d 20  |al% )..`. ?b% = |
000007f0  6c 6f 67 69 63 61 6c 25  0d 04 6a 13 20 62 25 21  |logical%..j. b%!|
00000800  31 20 3d 20 61 63 74 75  61 6c 25 0d 04 74 0e 20  |1 = actual%..t. |
00000810  d6 20 6f 73 77 6f 72 64  25 0d 04 7e 06 20 e1 0d  |. osword%..~. ..|
00000820  04 88 05 20 0d 04 92 0d  20 dd 20 f2 72 65 73 65  |... .... . .rese|
00000830  74 0d 04 9c 0d 20 41 25  20 3d 20 26 37 41 0d 04  |t.... A% = &7A..|
00000840  a6 0d 20 3f 62 25 20 3d  20 31 37 0d 04 b0 0d 20  |.. ?b% = 17.... |
00000850  62 25 3f 31 20 3d 20 31  0d 04 ba 0e 20 d6 20 6f  |b%?1 = 1.... . o|
00000860  73 77 6f 72 64 25 0d 04  c4 1c 20 e7 20 62 25 3f  |sword%.... . b%?|
00000870  31 20 3d 20 30 20 f2 74  73 64 70 20 8b 20 f2 72  |1 = 0 .tsdp . .r|
00000880  74 63 0d 04 ce 2d 20 d1  20 3d 20 31 30 30 20 2a  |tc...- . = 100 *|
00000890  20 28 20 36 30 20 2a 20  28 20 36 30 20 2a 20 68  | ( 60 * ( 60 * h|
000008a0  25 20 2b 20 6d 25 20 29  20 2b 20 73 25 20 29 0d  |% + m% ) + s% ).|
000008b0  04 d8 06 20 e1 0d 04 e2  05 20 0d 04 ec 0b 20 dd  |... ..... .... .|
000008c0  20 f2 72 74 63 0d 04 f6  0c 20 41 25 20 3d 20 31  | .rtc.... A% = 1|
000008d0  34 0d 05 00 0c 20 3f 62  25 20 3d 20 31 0d 05 0a  |4.... ?b% = 1...|
000008e0  0d 20 62 25 3f 33 20 3d  20 30 0d 05 14 0e 20 d6  |. b%?3 = 0.... .|
000008f0  20 6f 73 77 6f 72 64 25  0d 05 1e 1c 20 e7 20 62  | osword%.... . b|
00000900  25 3f 33 20 3e 20 30 20  f2 74 69 6d 65 20 8b 20  |%?3 > 0 .time . |
00000910  f2 61 73 6b 0d 05 28 06  20 e1 0d 05 32 05 20 0d  |.ask..(. ...2. .|
00000920  05 3c 0b 20 dd 20 f2 61  73 6b 0d 05 46 2a 20 f1  |.<. . .ask..F* .|
00000930  20 89 20 36 20 22 50 6c  65 61 73 65 20 65 6e 74  | . 6 "Please ent|
00000940  65 72 20 74 68 65 20 63  75 72 72 65 6e 74 20 74  |er the current t|
00000950  69 6d 65 22 0d 05 50 1d  20 e8 20 8a 20 31 36 2c  |ime"..P. . . 16,|
00000960  20 31 30 20 29 20 22 48  6f 75 72 73 22 2c 20 68  | 10 ) "Hours", h|
00000970  25 0d 05 5a 1f 20 e8 20  8a 20 31 34 2c 20 31 33  |%..Z. . . 14, 13|
00000980  20 29 20 22 4d 69 6e 75  74 65 73 22 2c 20 6d 25  | ) "Minutes", m%|
00000990  0d 05 64 1f 20 e8 20 8a  20 31 34 2c 20 31 36 20  |..d. . . 14, 16 |
000009a0  29 20 22 53 65 63 6f 6e  64 73 22 2c 20 73 25 0d  |) "Seconds", s%.|
000009b0  05 6e 06 20 db 0d 05 78  06 20 e1 0d 05 82 05 20  |.n. ...x. ..... |
000009c0  0d 05 8c 0c 20 dd 20 f2  74 73 64 70 0d 05 96 09  |.... . .tsdp....|
000009d0  20 2a 63 68 31 0d 05 a0  0d 20 3f 62 25 20 3d 20  | *ch1.... ?b% = |
000009e0  31 35 0d 05 aa 06 20 f5  0d 05 b4 0e 20 d6 20 6f  |15.... ..... . o|
000009f0  73 77 6f 72 64 25 0d 05  be 0f 20 fd 20 62 25 3f  |sword%.... . b%?|
00000a00  31 20 3c 20 38 0d 05 c8  0c 20 2a 74 74 78 6f 66  |1 < 8.... *ttxof|
00000a10  66 0d 05 d2 23 20 68 25  20 3d 20 a4 62 63 64 28  |f...# h% = .bcd(|
00000a20  20 31 31 20 29 20 2b 20  62 25 3f 37 20 81 20 34  | 11 ) + b%?7 . 4|
00000a30  20 83 20 32 0d 05 dc 14  20 6d 25 20 3d 20 a4 62  | . 2.... m% = .b|
00000a40  63 64 28 20 31 32 20 29  0d 05 e6 14 20 73 25 20  |cd( 12 ).... s% |
00000a50  3d 20 a4 62 63 64 28 20  31 33 20 29 0d 05 f0 06  |= .bcd( 13 )....|
00000a60  20 e1 0d 05 fa 05 20 0d  06 04 0c 20 dd 20 f2 74  | ..... .... . .t|
00000a70  69 6d 65 0d 06 0e 13 20  68 25 20 3d 20 a4 62 63  |ime.... h% = .bc|
00000a80  64 28 20 34 20 29 0d 06  18 13 20 6d 25 20 3d 20  |d( 4 ).... m% = |
00000a90  a4 62 63 64 28 20 35 20  29 0d 06 22 13 20 73 25  |.bcd( 5 )..". s%|
00000aa0  20 3d 20 a4 62 63 64 28  20 36 20 29 0d 06 2c 06  | = .bcd( 6 )..,.|
00000ab0  20 e1 0d 06 36 05 20 0d  06 40 20 20 dd 20 a4 62  | ...6. ..@  . .b|
00000ac0  63 64 28 20 61 74 25 20  29 20 3d 20 bb 20 c3 20  |cd( at% ) = . . |
00000ad0  7e 62 25 3f 61 74 25 0d  06 4a 05 20 0d 06 54 0f  |~b%?at%..J. ..T.|
00000ae0  20 dd 20 f2 6d 69 6e 75  74 65 73 0d 06 5e 19 20  | . .minutes..^. |
00000af0  e7 20 6d 25 20 3c 20 31  30 20 f2 73 61 79 28 20  |. m% < 10 .say( |
00000b00  37 39 20 29 0d 06 68 11  20 f2 73 70 65 61 6b 28  |79 )..h. .speak(|
00000b10  20 6d 25 20 29 0d 06 72  06 20 e1 0d 06 7c 05 20  | m% )..r. ...|. |
00000b20  0d 06 86 14 20 dd 20 f2  73 61 79 28 20 63 6f 64  |.... . .say( cod|
00000b30  65 25 20 29 0d 06 90 16  20 d4 20 2d 31 2c 20 63  |e% ).... . -1, c|
00000b40  6f 64 65 25 2c 20 30 2c  20 30 0d 06 9a 06 20 e1  |ode%, 0, 0.... .|
00000b50  0d 06 a4 05 20 0d 06 ae  13 20 dd 20 f2 73 70 65  |.... .... . .spe|
00000b60  61 6b 28 20 6e 25 20 29  0d 06 b8 11 20 69 25 20  |ak( n% ).... i% |
00000b70  3d 20 6e 25 20 81 20 31  30 0d 06 c2 11 20 6a 25  |= n% . 10.... j%|
00000b80  20 3d 20 6e 25 20 83 20  31 30 0d 06 cc 13 20 e7  | = n% . 10.... .|
00000b90  20 69 25 20 3e 20 31 20  f2 74 65 6e 73 0d 06 d6  | i% > 1 .tens...|
00000ba0  2d 20 e7 20 69 25 20 3d  20 31 20 f2 6f 64 64 20  |- . i% = 1 .odd |
00000bb0  8b 20 e7 20 6a 25 20 3e  20 30 20 f2 73 61 79 28  |. . j% > 0 .say(|
00000bc0  20 34 38 20 2b 20 6a 25  20 29 0d 06 e0 06 20 e1  | 48 + j% ).... .|
00000bd0  0d 06 ea 05 20 0d 06 f4  0c 20 dd 20 f2 74 65 6e  |.... .... . .ten|
00000be0  73 0d 06 fe 14 20 f2 73  61 79 28 20 33 32 20 2b  |s.... .say( 32 +|
00000bf0  20 69 25 20 29 0d 07 08  10 20 f2 73 61 79 28 20  | i% ).... .say( |
00000c00  31 33 37 20 29 0d 07 12  06 20 e1 0d 07 1c 05 20  |137 ).... ..... |
00000c10  0d 07 26 0b 20 dd 20 f2  6f 64 64 0d 07 30 18 20  |..&. . .odd..0. |
00000c20  e7 20 6a 25 20 3d 20 30  20 f2 73 61 79 28 20 33  |. j% = 0 .say( 3|
00000c30  33 20 29 0d 07 3a 19 20  e7 20 6a 25 20 3d 20 31  |3 )..:. . j% = 1|
00000c40  20 f2 73 61 79 28 20 31  39 30 20 29 0d 07 44 19  | .say( 190 )..D.|
00000c50  20 e7 20 6a 25 20 3d 20  32 20 f2 73 61 79 28 20  | . j% = 2 .say( |
00000c60  32 37 33 20 29 0d 07 4e  13 20 e7 20 6a 25 20 3e  |273 )..N. . j% >|
00000c70  20 32 20 f2 74 65 65 6e  0d 07 58 06 20 e1 0d 07  | 2 .teen..X. ...|
00000c80  62 05 20 0d 07 6c 0c 20  dd 20 f2 74 65 65 6e 0d  |b. ..l. . .teen.|
00000c90  07 76 14 20 f2 73 61 79  28 20 33 32 20 2b 20 6a  |.v. .say( 32 + j|
00000ca0  25 20 29 0d 07 80 10 20  f2 73 61 79 28 20 31 33  |% ).... .say( 13|
00000cb0  35 20 29 0d 07 8a 06 20  e1 0d ff                 |5 ).... ...|
00000cbb
03-06-89/Clock.m0
03-06-89/Clock.m1
03-06-89/Clock.m2
03-06-89/Clock.m4
03-06-89/Clock.m5