Z88 Developers' Notes
Contents   Contents of System Calls

GN_Die, convert internal format date to zoned format

RST 20H, DEFW $1409

IN:

     ABC = internal format date (as returned by GN_Gmd)
     (A is most significant byte, C is less significant byte)
OUT, if call successful:
     Fc = 0
     A = number of days in month (eg. 28 if date is in Feb 1989)
     B = month (1 = January, 12 = December)
     C =
          C7 to C5: day of the week (1=Monday, 7=Sunday)
          C4 to C0: day of the month (1 to 31)
     DE = Signed year number (relative to 0 A.D.).
     B.C. years are negative numbers.
OUT, if call failed:
     Fc = 1 (no error code)
     Date out of range (eg. beyond 32767 A.D.)
Registers changed after return:
     ......HL/IXIY same
     AFBCDE../.... different
Notes:

Bugs:
 

Related calls:

GN_Dei, convert zoned external format date to internal format
GN_Gdt, convert an ASCII string to an internal binary date
GN_Gmd, Get (read) machine date in internal format
GN_Pdt, write internal date as ASCII string
GN_Pmd, put (set) machine date