Chapter 6. Service Request Function
6.8 SVC_REQ 7: Read or Change the Time-of-Day Clock
Use SVC_REQ 7 to read or change the time of day clock in the CPU. The function is successful unless:
▪
An invalid number is entered for the requested operation.
▪
An invalid data format is specified.
▪
Data is provided in an unexpected format.
6.8.1
Parameter Block Formats
In the first two words of the parameter block, you specify whether to read or set the time and date,
and which format to use.
Address
2-Digit Year Format
Address
0 = read time and date
(word 1)
1 = set time and date
Address+1
0 = numeric data format
(word 2)
1 = BCD format
2 = unpacked BCD format
3 = packed ASCII format (with embedded spaces and colons) 83h = packed ASCII format
4 = POSIX format
Address+2
Data
(word 3)
to the end
Words 3 to the end of the parameter block contain output data returned by a read function, or new
data being supplied by a change function. In both cases, format of these data words is the same.
When reading the date and time, words (address + 2) to the end of the parameter block are ignored
on input.
The format and length of the parameter block depends on the data format and number of digits
required for the year:
Data Format and N-digit Year Length of parameter block
BCD, 2-digit year
BCD, 4-digit year
POSIX format
Unpacked BCD 2
Unpacked BCD 4
Numeric (2 and 4 digit years)
Packed ASCII, 2-digit year
Packed ASCII, 4-digit year
286
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
4-Digit Year Format
0 = read time and date
1 = set time and date
80h – numeric data format
81h = BCD format
82h = unpacked BCD format
n/a
Data
(number of words)
6
6
6
9
10
9
12
13
GFK-2950C