27-Apr-84 John Elkins ML3-2/E4l DTN 223-6646 Command Strings, Date and Time With the DECmate Master Menu This note describes the technique for the operating system programmer to get the command string, date and time from the Master Menu. When Master Menu transfers control to an operating system, it places a command string at a designated place in 6120 memory. The command string has the following format (character positions are decimal offsets). Format of Command String ________________________ 0..6 id string; this is one of the following: COS_cmd CPM_cmd OS8_cmd WPS_cmd DOS_cmd 7..7 null 8..8 binary length of the following command text 9..88 up to 80 characters of text to be interpreted by the operating system as commands typed in 89..89 null 90..97 date: in the format mm/dd/yy 98..98 null 99..99 ??? 100..100 Master Menu version number 101..109 day-of-week: Sunday Monday Tuesday Wednesday Thursday Friday Saturday Page 2 110..110 null 111..118 time-of-day in the form hh:mm:ss. This is a 24 hour clock. 119..119 time-of day, clock low 120..120 time-of day, clock high 121..121 date format: 0 = invalid 1 = mm/dd/yy 2 = yy/mm/dd 3 = dd/mm/yy 122..122 null NOTE: If the command id string contents is not appropriate for the operating system being booted, the command string should be ignored by the operating system. Location of Master Menu Command String ______________________________________ The command string is placed at a location in memory depending upon the operating system being booted. This has not changed since the original description that appeared in the printed documentation. CPM/80: 077600 WPS: 167600 C0S310: 167600 MSDOS: 077600 OS278: 077600 NOTE: the high-order address bit indicates panel or application memory: O = application: 1 = panel. Getting The Current Time from Memory ____________________________________ This is documented only for completeness. Normally, the operating system would have received the date and time from the Master Menu and then maintain it internally rather than make access to the slushware maintained clock/calendar. Slushware is responsible for updating a 2-word memory location every 1/60 seconds. Slushware adds 1 to this 'clock' every 1/60 seconds. Since the clock has 24 bits, it has a capacity of 2**24/60 seconds. This comes out to something like 3.24 days. A double-word value of 1 indicates 1/60 seconds past midnight and so forth. When Master Menu is activated, it accepts the time-of-day from the user at the keyboard. It then translates this into an appropriate double-word number to place in the clock. Page 3 Here is the format of the clock/calendar: 0:0 clock-low 1:1 clock-high 2:2[0:6] binary month (1..12) 2:2[7:12] binary day of month (1..1) 3:3[0:2] binary day-of-week (l..7) (Sunday = 1 ... Saturday =7) 3:3[3:11] binary year-of-century (00..99) These data are found in memory as follows. Panel memory location 4.5 in field 0 contains the address of the CPODT table. Offset 66.67 (octal) of the CPODT table contains the address of the clock/calendar. NOTE: Pointers in panel memory consist of two words. The first word contains the 12-bit address. The second word contains the 6-bit field (00, 10, 20, 30, 40, 50, 60, 70). The field value is in the appropriate form to use when using PRQs to peek at panel memory. Thus, the following code would move the clock/calendar to a place in user memory: Page 4 CLKCAL, ZBLOCK 4 TABADR, 0 ; 0 CLKADR, 0 ; 0 . . . PR3 5000+<0^10>+0 /PANEL FIELD 0 /USER FIELD 0 4 /MOVE FROM HERE IN PANEL MEMORY TABADR /MOVE TO HERE IN USER MEMORY -2 /MINUS #WORDS TO TRANSFER -1 /TERMINATOR / NOW, ADDRESS OF TABLE IS IN TABADR. FIELD OF TABLE IS / IN TABADR+l. CLA TAD TABADR TAD (66 DCA TABADR TAD TABADR DCA INST2 TAD TABADR+l TAD (5000+00+00 DCA INST1 PR3 INST1, 0 INST2, 0 CLKADR -2 -1 TAD CLKADR DCA INST4 TAD CLKADR+1 DCA INST3 PR3 5000+00+00 INST3, 0 INST4, 0 CLKCAL -4 -1 / ALL DONE. NOW THE CLOCK CALENDAR IS IN CLKCAL.