CPMDATE 11/18/86 This program is a Turbo Pascal version of the CP/M "Date" utility. It is not intended as a replacement, but only as a source of code for the different procedures and functions it uses. When compiled it requires 12k of disk space. The program will do the following: 1. Get the date from the system clock and display it in day of week, month, day of month, and year. 2. Get the time from the system clock and display it in HH:MM:SS format. 3. Get the date, time, or both in any order from the command line, parse out the appropriate values, and set the date and/or time. For example: date 11/5/86,14:30:20 4. Prompt for the date and time if the user types "date set" at the command line. 5. Display the date and time continuously until a key is pressed if the user types "date " . My appreciation goes to Ken Kroninger for supplying the code that showed how the BDOS calls are made. The code that Ken supplied was written by Milton Hicks and J. Bauernschub Jr. It was lightly revised by Jim LaSalle. Requirements: Turbo Pascal v2.0 or higher. CP/M 3.0 (CP/M plus) - banked version. Please address any comments or questions to Ben Diss. On Qlink address mail to "Duque", on GEnie address mail to "BDiss". The Following information will prove useful in understanding this program: BDOS 105 gets the date and time from the system clock and puts the information in a four byte data structure beginning at the address passed in the DE register pair. This program uses two integers to input that data: DateInt, and TimeInt. These two integers are declared next to each other and so that DateInt will reside higher in memory so that the data will be passed to the appropriate variables. BDOS uses this four byte structure both in setting and in getting the date and time. BDOS 104 is used to set the time. Byte 0 - 1: Date field as an integer representing the number of days since January 1, 1978. Byte 2: Hours field in BCD. Byte 3: Minutes field in BCD. In getting the time the BDOS passes the seconds in register A in BCD. Turbo Pascal returns the A register when the BDOS statement is used as a function. BCD stands for Binary Coded Decimal. An array was declared that is used to transfer the BCD value to an integer value. A BCD number in hexidecimal form when written appears as the integer equivalent. For example 12h has an integer value of 18 yet its BCD value is 12. A hexidecimal number that does not display integers has no BCD equivalent.