15-Dec-85 DAYLOG.TXT V3 Page 1/4 Gary F. Sallee (714-970-2864) Set the RT-11 time and date the easy way with DAYLOG.SAV. The DAYLOG.SAV program for RT-11 is yet another variation of the DATIM functionality, but with a twist. DAYLOG is easy to use by computer ignorant people. But DAYLOG also has built in shortcuts the knowledgeable person. DAYLOG maintains a .LOG file to form defaults for all of the questions. DAYLOG is intended to run from the STARTx.COM file, but can be run at any time. Copy DAYLOG.(SAV,LOG) to SY: and RUN DAYLOG. It should work. DAYLOG can be run on any PDP-11, LSI-11, or chip-11 processor. It does not use the EIS or MARK or SOB instructions. DAYLOG will run under RT-11, V4 or V5. V3 is untried, but requires use of .DATE, .GTIM and .SDTTM macro EMT's. ---------------------------------------------------------- A sample of the DAYLOG run is shown below: The last DAYLOG was at 8:01 on 5-DEC-85 by GARY F. SALLEE Are you a different person [No]? Y What is your name? B. GINNER Thank you, B. GINNER The system time is 8:01:09. Would you like to change it [No]? Y Please tell me the time: 8;32 Is this time, 8:32:00, in the PM [No]? N The system date is 5-DEC-85. Would you like to change it [No]? Y What is the day [ 5] : 6 What is the month [DEC] : What is the year [85] : Thanks for the year 1985... Thanks for the month. -DEC-. This DAYLOG time is 8:32 on 6-DEC-85 by B. GINNER Before we go on to other things, Would you like to change anything [No]? ---------------------------------------------------------- Note that a is required after each response, but is shown above only when the default is being requested. 15-Dec-85 DAYLOG.TXT V3 Page 2/4 Gary F. Sallee (714-970-2864) ---------------------------------------------------------- A sample of the DAYLOG run using shortcuts: The last DAYLOG was at 8:01:00 on 5-DEC-85 by GARY F. SALLEE Are you a different person [No]? G. O. FAST Thank you, G. O. FAST The system time is 8:01:23. Would you like to change it [No]? 832A The system date is 5-DEC-85. Would you like to change it [No]? 6 What is the month [DEC] : What is the year [85] : Thanks for the year 1985... Thanks for the month. -DEC-. This DAYLOG time is 8:32 on 6-DEC-85 by G. O. FAST Before we go on to other things, Would you like to change anything [No]? ---------------------------------------------------------- A is required after each response, but is shown above only when the default is being requested. Note that it is possible to bypass the "hand holding" beginner questions by simply anticipating the next question, and typing the next answer. ---------------------------------------------------------- For the seventeenth time today you've crashed the system ... Just four 's will get the time and date set: The last DAYLOG was at 11:56 on 6-DEC-85 by G. O. FAST Are you a different person [No]? Thank you, G. O. FAST The system time is 11:56:06. Would you like to change it [No]? The system date is 6-DEC-85. Would you like to change it [No]? This DAYLOG time is 11:56 on 6-DEC-85 by G. O. FAST Before we go on to other things, Would you like to change anything [No]? ---------------------------------------------------------- Thus four 's will get the system time and date set. 15-Dec-85 DAYLOG.TXT V3 Page 3/4 Gary F. Sallee (714-970-2864) OPERATING DESCRIPTION When the program is run, the operator is prompted with questions which lead to the proper setting of the time and date. Almost any unambiguous answer by the operator will be accepted and used properly. For instance a time of "20 dark 30" or "830pm" would be converted to 20:30:00. DEFAULT TIME The default time comes from the present system time for software boot: if the system time is not within 5 minutes after 00:00:00. The default time comes from the LOG file for hardware boot: if the system time is within 5 minutes after 00:00:00. AM, PM A time typed as "8:12" is considered ambiguous so DAYLOG will ask if this am or pm, with the default being am. A time types as "812a" is converted to 8:12:00. A time typed as "812p" is converted to 20:12:00 with no further prompts from the program. DATE FORMAT A date typed as "December 25, 1985" or "85D25" would be converted to 25-DEC-85. The whole date need not be entered. If the LOG date was 19-DEC-85, then a date typed as "25" will change the date to 25-DEC-85. MONTH NUMBERS The month may be typed as a number with any separator character[s] around it. Thus a date typed as either "12/25/85" or "85 - 12;\.25" will be converted to 25-DEC-85. The ambiguous date typed as "3/4/85" will be converted to 3-APR-85, but "3/13/85" will be converted to 13-MAR-85. MONTH NAMES Months may be typed as one or more characters; only the first three characters are used. Thus "Decunber" or "D" will be converted to -DEC-; "J" will always be -JAN-; "JU" will always be -JUN-; and "JUL" will be -JUL-. YEARS ALLOWED The years allowed are 1973 to 2003. a year entered as 2003 will display as 19:3, just as RT-11 will display 25-DEC-:3. The year may be entered as "1985" or as "85". OPERATOR'S NAME DAYLOG also asks and logs the name of the person at the terminal. There is no checking of this name. It is for information only. INSTALLATION The file DAYLOG.LOG (1 block) must be on SY:. The file DAYLOG.SAV (10 blocks) may be anywhere. To run DAYLOG as a startup process, simply put a RUN DAYLOG line into the STARTx.COM file. The program has been run under RT-11 V4 AND V5, and TSX+ V5. If you loose DAYLOG.LOG, just use KED to create a file with 3 lines of 64 blank () characters each. FILES DAYLOG.TXT 18 BLOCKS THIS DESCRIPTION DAYLOG.SAV 10 BLOCKS EXECUTION FILE DAYLOG.LOG 1 BLOCK LOG FILE DAYLOG.LST 204 BLOCKS ASSEMBLY LISTING DAYLOG.MAC 89 BLOCKS MACRO FILE DAYLOG.OBJ 12 BLOCKS OBJECT 15-Dec-85 DAYLOG.TXT V3 Page 4/4 Gary F. Sallee (714-970-2864) TECHNICAL DESCRIPTION The program tries to protect itself and the operation system as much as possible. It will issue error comments if it receives bad data from a file or from the operating system. Invalid data from the operator is simply requested again. EIS, SOB, MARK MARK is not needed. SOB is simulated with DEC .. BNE. MUL is simulated with a subroutine that returns exactly the same data and condition codes as the MUL instruction. Other EIS instructions are not needed. The program has not been tried on a PDP11/05 etc., but it is intended to run ok on that family group. CTRL-C The is not locked out. If the program is hung with line clock message, then the LOG file is open but has not been written into. If the program is at the final "... change anything?" question, then the LOG file has been written with new information. DAYLOG.LOG The LOG file is an ASCII file with fixed fields. The field positions are defined in the OFFSETS definition at the beginning of the MAC file. LINE TIME CLOCK The program looks at the CONFIG word in the operating system to determine if there is a line clock and what it's frequency is. The time calculations will be based on this information. If the CONFIG word does indicate a line clock is present then the program will require that it be running. A request message will be made to the console and the program will not proceed until the clock ticks. PROGRAM ALTERATION SUBROUTINES Most subroutine parameters are passed in and out in the registers. Most subroutines list the used registers at the top of the routine. Many subroutines have multiple exits to facilitate branching after the RTS. The multiple exit is often used to facilitate error handling. OPERATOR NAME This part is nice straight line code with straight line subroutines. TIME INPUT This part is nice straight line code with straight line subroutines. DATE INPUT This part uses a coded data array with implied meanings, DATBUF, and uses a coded program parameter array with implied loops, BTABL0. These techniques cut the program size in half. If you are going to touch this part of the program, make sure that you understand what it is doing. DATE INPUT ARRAY There is a two dimension array for the day-month-year input data. This array, called DATBUF, is used to determine the most likely meaning of data which may come in any order. The zero row is the least likely and the three row is the must-be position. The fourth row is scratch pad. The rows are defined with STROFF and the column positions are defined with DAYC, MONTHC, and YEARC. PARAMETER ARRAY This array, BTABL0, is actually part of the program. The parameters are in the exact order that the program needs them. The array is accessed with R5 and fixed offsets that are in the program code. R5 must be maintained throughout this section of the program.