GN_Gtm, Convert an ASCII string to a time in internal format

Register parameters

RST 20H, DEFW $0A09
IN:
     HL = source pointer
          0 = read from stream IX handle
          1 = read from filter IX handle
          2 = not allowed
          >255 = read string at (HL)

     DE = destination pointer
          0 = not allowed
          1 = not allowed
          2 = result returned in ABC
          >255 = store result at (DE)
     IX = source handle (if HL = 0,1)

OUT, if call successful:
     Fc = 0
     HL, HL(in) < 2, HL(in)
     HL, HL(in) > 255, HL points to terminating character
     ABC, DE(in) = 2, result
     ABC, DE(in) > 255, ABC(in)

OUT, if call failed:
     Fc = 1
     A = error code:
          RC_SNTX ($0C), Bad syntax

Registers changed after return:
     ....DE../IXIY same
     AFBC..HL/.... different 

Notes

The string can be of the form HH(:)MM(:SS)(:CC). For example five to two might be represented as "13:54:43:04". The () are optional.

Related calls

GN_Gmt, get (read) machine time in internal format
GN_Msc, miscellaeneous time operations
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

web analytics