home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 3 / hamradioversion3.0examsandprograms1992.iso / misc / daytime / daytime.doc < prev   
Text File  |  1988-08-29  |  7KB  |  156 lines

  1. DAYTIME
  2. Copyright (c) 1988
  3.  
  4. By :Richard Tashner N2EO
  5.     163-34 21 Road
  6.     Whitestone New York 11357
  7.  
  8.      Daytime.asm is written in Intel 8088 assembly language
  9. and is intended to be used with the IBM PC/XT/AT and most
  10. compatibles.
  11.      The ARC file you just downloaded contains three files.
  12.  
  13.           1 - DAYTIME.CMD        ( The executable program )
  14.           2 - DAYTIME.ASM        ( The source code )
  15.           3 - DAYTIME.DOC        ( This file )
  16.  
  17.      This program has been tested with the A.E.A. PK-232 and
  18. should work with most if not all TAPR clones as well.
  19. DAYTIME.COM will set the real time clock contained in the TNC
  20. to the proper date and time and display the values on the
  21. screen.
  22.      This is useful as each time the TNC is turned off at the
  23. end of a packet session the data in the TNC,s real time clock
  24. is lost.
  25.      You can load DAYTIME.COM and a program such as YAPP.COM
  26. from a batch file. In this way you automatically set the
  27. TNC.s clock each time you enter your packet communication
  28. program.
  29.      Just be sure and load DAYTIME.COM first then your
  30. communications program (such as YAPP) second.
  31.  
  32. Sample Batch file
  33. -----------------
  34.               The following example batch file shows how to configure
  35. DAYTIME.COM to automatically load with YAPP.COM... Please note everything
  36. shown within the < > are the commands used to write the batch file and are not
  37. actually entered into the batch file... Do not type in the < >!!
  38.  
  39.                    <COPY CON YAPP.BAT>  <ENTER>
  40.                    ECHO OFF
  41.                    CLS
  42.                    DAYTIME.COM
  43.                    YAPP.COM
  44.                    CLS
  45.                    DIR
  46.                    <CTRL Z>
  47.  
  48.               The above example should be typed in from the DOS prompt and the
  49. batch file should be located on the same disk that contains the DAYTIME.COM
  50. and YAPP.COM files (or what ever communications program you are using...)
  51.               Using the above example, when you type 'YAPP', you will see the
  52. DAYTIME.COM screen come up and the TNC,s clock will now be set. Pressing any
  53. key will cause YAPP.COM to come up and load. As an added bonus, when you leave
  54. the Yapp program, the screen will clear and a disk directory will appear. This
  55. is due to the last two lines of the batch file.
  56.               If your using some other communications program other than YAPP
  57. simply substitute the file name of that program in place of YAPP.COM...
  58.  
  59. How the program works
  60. ---------------------
  61.      DAYTIME.COM uses DOS interrupts to check the real time
  62. clock in the IBM computer. These interrupts return the
  63. year,month,day and time in various registers of the
  64. 8088/80286 microprocessor. The values returned in these
  65. registers are in binary. The program then converts these
  66. binary values to "Unpacked B.C.D." and then finally converts
  67. these numbers to their ASCII equivalents. Once converted to
  68. their ASCII equivalents, these numbers are stored in a buffer
  69. inside the computer for future use.
  70.      The program then issues the TAPR command 'DAYTIME'
  71. followed by a space (20 HEX) to the TNC via the serial port.
  72. Next the program spits out the data in the afore-mentioned
  73. buffer. As an example the data stream might look like this:
  74.  
  75.            DAYTIME 8808292310
  76.  
  77.      In this example we would have just set the real time
  78. clock in the TNC to a date of August 29,1988 and the time to
  79. 2310.
  80.      The program also displays the time and date on the
  81. screen just to let you know that it has in fact done its job!
  82.      Finally the program sounds a bell and waits for keyboard
  83. input. Once the program senses keyboard input the program
  84. terminates and returns to DOS. If the program was executed
  85. from inside a batch file then the next command in the batch
  86. file will be executed once the program has terminated. (I.E.
  87. next line could be used to tell the computer to load a
  88. communications program such as YAPP.COM.
  89.  
  90.      To take advantage of the real time clock feature you
  91. must have the commands CONSTAMP,MSTAMP and or DAYSTAMP
  92. turned on in your TNC. This will allow time and date stamping
  93. of connected and or unconnected packets.
  94.      I suggest you read the section in your TNC,s manual that
  95. deals with the commands DAYTIME,CONSTAMP,MSTAMP and DAYSTAMP.
  96.  
  97.      Changing parameters
  98.      -------------------
  99.      The program as supplied is set up to communicate with
  100.      the TNC at 1200 Baud,8 Bit words,No Parity,1 Stop bit
  101.      which is the most popular combination The program is also
  102.      set up to communicate via comm port number 1.
  103.  
  104.      There is no provision to change these parameters from
  105. within the program. However I have included the source code
  106. DAYTIME.ASM. You can change the following equates in the
  107. source code and re-assemble the program using the microsoft
  108. macro assembler. The following information shows how to
  109. change the program to run on comm port 2 and also shows you
  110. how to set the program to other baud rates.
  111.  
  112.  
  113.      At the top of the source code listing you will see the
  114. following equates:
  115.  
  116. BAUDRATE     EQU     083H       ;BAUD RATE SELECT
  117. COMMPORT     EQU     0          ;COMM PORT SELECT
  118. ATTRIB       EQU     07H        ;VIDIO COLOR ATTRIBUTE
  119.  
  120.  
  121. To change to comm port 2 change the '0' to a '1' and re-
  122. assemble the source code..
  123.  
  124. To change the baud rate to other than 1200 baud, 8 bit words,
  125. 1 stop Bit No parity see the following chart..
  126.  
  127.  300 Baud 8 Bit Words 1 Stop Bit No parity =  043H
  128. 1200 Baud 8 Bit Words 1 Stop Bit No parity =  083H
  129. 2400 Baud 8 Bit Words 1 Stop Bit No parity =  0A3H
  130. 4800 Baud 8 Bit Words 1 Stop Bit No parity =  0C3H
  131. 9600 Baud 8 Bit Words 1 Stop Bit No parity =  0E3H
  132.  
  133.      Make the appropriate changes to the BAUDRATE EQU and then
  134. re-assemble the code.
  135.  
  136.      I have set the ATTRIB EQU to a "normal attribute" 07H.
  137. I did this so as to insure compatibility with a monochrome
  138. monitor.
  139.      If you have a color monitor, you can change this equate
  140. to give the program some interesting colors.
  141.      Below is a short list of colors that I have found
  142. pleasing to the eye..
  143.  
  144. 00EH = Black background / Yellow foreground
  145. 00FH = Black background / Bright white foreground
  146. 00BH = Black background / Light cyan foreground
  147. 01FH = Blue background / Bright white foreground
  148.  
  149.  
  150.  
  151.      Any comments/suggestions please feel free to write me.
  152. Enjoy...
  153.  
  154.                                         Richard Tashner N2EO
  155.                                         163-34 21 Road
  156.                                         Whitestone N.Y. 11357