home *** CD-ROM | disk | FTP | other *** search
/ The CIA World Factbook 1992 / k3bimage.iso / sel / 12 / 0097 / cgclock.doc < prev    next >
Encoding:
Text File  |  1991-12-02  |  3.7 KB  |  105 lines

  1.                            CGCLOCK.COM
  2.  
  3.                            Version 1.6
  4.  
  5.               A real time clock display for color/graphics
  6.               display.  Adapted from CLOCK.ASM found on one of
  7.               the PC-Bulletin Board Systems in Chicago, Illinois.
  8.  
  9. Source available from Dan O'Brien upon request via message on GENE PLANTZ's
  10. PC-Bulletin Board System in Chicago, Illinois or write to Dan O'Brien
  11. utilizing the following address:
  12.  
  13.                      Mr. Dan M. O'Brien
  14.                      646 Jonquil Avenue
  15.                      Lisle, Illinois  60532
  16.  
  17. Allows any color for time by patching color value using DEBUG.  Look for
  18.   
  19.                "Color value of time display="
  20.  
  21. and set byte follow "=" to BASIC color value.  Currently set to YELLOW
  22. (color number is 14 decimal).
  23.  
  24. Displays time in human format, not computer, i.e., AM/PM format, not
  25. 24-hour military time.
  26.  
  27. To enable military time (24-hour format) display, patch using DEBUG and
  28. debug the statement that says:
  29.  
  30.                "Military time=N"
  31.  
  32. from "N" to "Y".
  33.  
  34. Also beeps the speaker every quarter hour.  To disable beeping on the
  35. quarter hour, patch using DEBUG and debug the statement that says:
  36.  
  37.                "Beep=Y"
  38.  
  39. from "Y" to "N".
  40.  
  41. Timer display is refreshed every N tics as defined by a patchable area;
  42. patch using DEBUG.  Look for
  43.  
  44.                 "Timer tics before time display refresh="
  45.  
  46. and the value after the "=" is binary 4.  Patch to higher or lower value
  47. as you wish to lengthen or shorten interval between refreshes.  Tics occur
  48. 18.5 times a second, and after 4 (default) the display is refreshed with
  49. the time.  This keeps overhead of running CGCLOCK to about 4 percent.
  50.  
  51. To start CGCLOCK just enter "CGCLOCK".
  52.  
  53. To toggle off and on enter "CGCLOCK" repeatedly.
  54.  
  55. NOTES:
  56.  
  57. 1. Uses user timer exit int 1Ch for timer display.
  58. 2. Defines int 60h to toggle time off and on.
  59. 3. Displays time without annoying "snow"!  Technique from PC-Technical
  60.      Journal Premier Issue.
  61. 4. Developed under DOS 2.0. Not tested under DOS 1.1 but should work.
  62.  
  63. Adapted from CGCLOCK.ASM by Daniel M. O'Brien - 9 July 83 (Version 1.0)
  64.  
  65.  1) Meaningful labels added.
  66.  2) Made to work on color/graphics.
  67.  3) Use user timer exit int 1ch instead of 08h directly - slows down
  68.       disk drives, also allows BASIC to gain direct control of timer.
  69.       And use int 60h instead of 44h (44h defined by DOS 2.0)!
  70.  4) Allows patching of time display color using DEBUG (Version 1.1).
  71.  5) Meaningful comments added.
  72.  6) Included salutation.
  73.  
  74. DMO - 10 July 83 (Version 1.2)
  75.  7) Beep on quarter hour and allowed patching on or off.
  76.  8) 12 hour clock with AM and PM indicator and allow patching for
  77.       military time.
  78.  
  79. DMO - 21 July 83 (Version 1.3)
  80.  9) Keep counter and update screen only after specified tics count.
  81.       Currently set to 4 which yields an overhead of about 4 percent.
  82.       If set to 1, i.e., update every clock tic, then CGCLOCK has a
  83.       overhead of about 20 percent.
  84.  
  85. DMO - 31 July 83 (Version 1.4)
  86. 10) Move some temporary data areas below init routine for less
  87.       resident space requirements.
  88.  
  89. DMO - 12 September 83 (Version 1.5)
  90. 11) Try different algorithm to stuff display into memory to reduce
  91.       possible interference with BASIC display to terminal.
  92. 12) Fix bug whereby BX was not being saved and restored when BEEP occurred.
  93. 13) Fix bug whereby direction flag not set causing stray characters on
  94.      display.
  95. 14) Speedup entry and exit when not time to display.
  96.  
  97. DMO - 29 December 83 (Version 1.6)
  98. 15) Do not disable interrupts for beeper - just disable entry to CGCLOCK.
  99. 16) Also use private stack area to prevent stack overflow.
  100.  
  101. Future work
  102. 1) date
  103. 2) alarm clock
  104. 3) any suggestions?
  105.