[comp.binaries.atari.st] v13i032: mclock -- Corner clock for mono systems

koreth@panarthea.ebay.sun.com (Steven Grimm) (12/27/90)

Submitted-by: fischer-robert@CS.YALE.EDU (Robert Fischer)
Posting-number: Volume 13, Issue 32
Archive-name: mclock


MCLOCK was written by:
	Robert Fischer \\80 Killdeer Road \\Hamden, CT   06517   USA
	(203) 288-9599        fischer-robert@cs.yale.edu
MCLOCK is in the public domain.

MCLOCK is yet another corner clock which serves two main purposes:

* It doesn't use Line-A, but writes directly into screen memory.  This
way, you can use it with the blitter on a Mega without interference.

* In addition to being able to display the time in 12 and 24 hour
formats, MCLOCK can display it in a 100-hour format (actually, 100-hur
format), where each hur is 1/100 of a day.  The clock simply tells you
how many hurs (up to three decimal places) have passed since last
midnight.  For example, 50.000 is 12:00 noon, and 75.000 is 6:00 PM.
One hur equals exactly 14:24 minutes, and one thousanth of a hur
equals exactly .864 seconds.

Imagine the advantages of this system of time.  Much of the world uses
the metric system of measurement because of the obvious advantages in
measuring things in one unit.  For example, kilometers and meters are
much easier to add, subtract, multiply and divide than miles and feet.
But the archaic system of time which we use today brings needless
complication into everyday life, even for those using the metric
system.  For example, we still get the fun of converting between km/hr
and m/sec, with a conversion factor of 3.6.  If speedometers were
calibrated in km/hur, that would be the same as calibrating them in
m/milli-hur, eliminating any conversion factor at all!  If you were
traveling 10 km/hur (about 40 km/hr), you'd know instantly that you'd
hit that point 100 m off in 10 milli-hurs. 

The Metric mode of MCLOCK is made to demonstrate this new system of
measuring time.  The accompanying program HURCLOCK.BAS, which runs in
Omikron BASIC, demonstrates such a clock in the analog format.

MCLOCK runs as a desk accessory, and automatically reads the current
system time and displays it in the corner.  Every few seconds, MCLOCK
checks the current system and if it's too far off, MCLOCK recalibrates
itself.  If you change the time with the control panel, you should see
MCLOCK change in a few seconds.  You can set three options (pretty
obvious).  MCLOCK reads them from the file MCLOCK.INF (in the root
directory of your startup drive) when it starts.  MCLOCK.INF has one
line, with up to three letters, as follows:

	m : Display metric time
	o : Display old time
	2 : Use 24-hour format (defaults to 12-hour)

For example, the line 'mo' would tell MCLOCK to display 12-hour
old-style time _and_ Metric time.

MCLOCK was written in MWC and MADmac assembler, using LynxLib (my
library, which I posted recently).  Enjoy!

------- cut here --------
table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 mclkbin.arc
M&@A-0TQ/0TLN04-#    S@H  )<5.07:#W(/   ,8#0  ," U<  W@8B$ 4 z
MT@ 8#16XX#/0@B(GN0828"?DC),@3JS\T_>B@0HW ! ( 0*A!8 &/8#\\\< y
M" ! ;QS X!&@(0 W,V/.!$- "%":* G,9&, #@&A_F"XF#D.";0V "S\ ""5x
MJE6L%+;"<"D!TL^98EU",'MT:\>.8[.* W(5@(2T "C,K0MAZP\7!)WH2N#'w
M&S^[*KXX\>*D3LB!'5_HL !&\#\P7)Z\/;/Y!T\ D2<C$9Q GF$ $$);T$&:v
M4^9@AS&  !)-GP450M  4 !GP%;)%CQ8]I 9#I09P 8ZP %!1P,99Q# 28)<u
M.7/G)LY0() '0 +KS1MH,&/@2G< RQETAV*=O)#SRT'HJ4 -!@H L@38## At
M.7H9]@&@CWX \.>? S38%X 0!!JHG V+-1;2/^@@<0T &,!QP59..$'%$RW(s
MA \.4PU(!  ?($&$$$2H. XC</#P E<EJH,$@3\@ <1*.LXHF *Z0/&$"0 @r
M 1\$7>D##A+FW&A3BCL"T2, /V(B)#2#0$-(B/_P8^1  X#Q)0 #H..C+@KPq
M\8)-!&#Q!&FR",DE/2#H4($*9KGR#SU<PL, ( T-,( ;"/SYCT/]L*'#".[Lp
M.= %("2Y9),$?E!=5O75Z"0 /UQZ@0=)5EK5I19(P\2%&$3HF$C\O'  ##HLo
MX,T9(I#JB'H L)>5(VPP  <('.I2 !D?@J'.>]:!@ ,!NL"B"P4JC#$0/%)Dn
M! "D!E@;YJ,DP%' C))1( AI* @Y@G\6P-+< H"<,1 Q<"AAZY@G0! N%H(Am
M((V0!M@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