GN_Pmt, Put (set) machine time

Register parameters

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 date

OUT, if call successful:
     Fz = 0, if time is inconsistent with assumed date in E(in).

Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different 

Notes

The time is used throughout the machine and should only be altered if the user of the machine is fully aware of the fact. Flow sequence:

  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

Bugs

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_Pmd, Put (set) machine date
GN_Sdo, send date and time to standard output
OS_Dly, delay a given period

web analytics