Z88 Developers' Notes
Contents   Contents of System Calls

GN_Msc, miscellaeneous time operations, convert real time to time to elapse

RST 20H, DEFW $2009

IN:

     A = 0, convert source to time to elapse:
     BHL = source time days
     CDE = source time centiseconds/ticks

     A = 1, Update base time (used over reset):
     BHL = Additional offset in minutes.
     C = offset in seconds.
OUT, if A(in) = 0 and successful:
     Fc = 0
     BHL = minutes still to elapse
     C = seconds still to elapse (only when minutes < 0)
     A = centiseconds still to elapse
OUT, if A(in) = 1:
     -
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_FAIL ($16), time given to routine has already elapsed.
Registers changed after return:
     ......../IXIY same
     AFBCDEHL/.... different
Notes:
Applications should not use this call with A(in) = 1, the system uses the call in this way to help maintain the time over soft reset. The call's function is to indicate how much time there is to elapse between the time given and the current time. This routine subtracts a small offset from the difference between wanted time and current time to allow for the routine processing overhead.
Bugs:
 

Related calls:

GN_Gmt, get (read) machine time in internal format
GN_Gtm, convert an ASCII string to a time in internal format
GN_Pmt, put (set) machine time
GN_Ptm, write internal time as ASCII string
GN_Sdo, send date and time to standard output
OS_Dly, delay a given period