Z88 Developers' Notes | ||
---|---|---|
Contents | Contents of System Calls |
GN_Gdt, convert an ASCII string to an internal binary date
RST 20H, DEFW $0609
IN:
HL = source pointer 0 = read from stream whose handle is IX 1 = read from filter whose handle is IX 2 = not allowed > 255 = string pointed to by HL DE = destination pointer 0 = not allowed 1 = not allowed 2 = result returned in ABC >255 = store result at address pointed to by DE A = date format A0 = 1, undefined A1 = 1, undefined A2 = 1, undefined A3 = 1, force American format (MM/DD/YY) A4 = 1, force European format (DD/MM/YY) A5 = 1, force C to be the delimiter A6 = 1, undefined A7 = 1, undefined IX = source handle (if HL = 0,1) B = maximum number of characters to be read C = optional forced delimiter (default is ".")OUT, if call successful:
Fc = 0 HL, if HL(in) = 0, index to last character read HL, if HL(in) > 255, pointer to last/terminating character ABC, if DE(in) = 2, date in internal format ABC, if DE(in) > 255, ABC(in) DE, if DE(in) > 255, DE(in)+3OUT, if call failed:
Fc = 1 A = error code: RC_ROOM ($07), insufficient memory to make conversion. RC_HAND ($08), handles not available for conversion RC_BAD ($04), bad parameters RC_SNTX ($0C), Bad syntaxRegisters changed after return:
......../IXIY same AFBCDEHL/.... differentNotes:
Setting A3=0 and A4=0 will mean that the PANEL settings for the date format will be used. A3=A4=1 will use European format. The routine will return a syntax error (RC_SNTX) if A5=1 and the character passed in C(in) is not the terminator of the string to be converted. Please note that returned internal format is in high byte low byte register sequense (A = high byte, C = low byte).Bugs:
Related calls:
GN_Dei, convert zoned format date to internal format
GN_Die, convert internal format date to zoned format
GN_Gmd, Get (read) machine date in internal format
GN_Pdt, write internal date as ASCII string
GN_Pmd, put (set) machine date