Z88 Developers' Notes | ||
---|---|---|
Contents | Contents of System Calls |
GN_Pmt, put (set) machine time
RST 20H, DEFW $1E09
IN:
HL = 0, not allowed HL = 1, not allowed HL = 2, 3 byte internal time in ABC (A = high byte, C = low byte) HL > 255, HL points to 3 byte internal time (low byte first) E = least significant byte of assumed dateOUT, if call successful:
Fz = 0, if time is inconsistent with assumed date in E(in).Registers changed after return:
..BCDEHL/IXIY same AF....../.... differentNotes:
The time is used throughout the machine and should only be altered if the user of the machine is fully aware of the fact.Bugs:
Flow sequense:
1. Divide by 100 (get set seconds).
2. Read the time in days/seconds.
3. Store base centiseconds.
4. Reset the RTC.
5. X = Days (1 day in seconds)
6. Z = X + Set seconds
7. Store new base time
Call probably crashes if HL points to segment 3.Related calls:
GN_Gmt, get (read) machine time in internal format
GN_Gtm, convert an ASCII string to a time in internal format
GN_Msc, miscellaneous time operations
GN_Ptm, write internal time as ASCII string
GN_Sdo, send date and time to standard output
OS_Dly, delay a given period