Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 237

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

(HL)
/ ~
B
A
C
D
E
Technical Information
You can also define terminators, which will stop the parse regardless of
whether a field has been found. Unless you specifically define these,
PARSE
will only stop on non-blank separators.
Separators and terminators have the same effect on a parse; the only difference
is in how they affect the F (Flag) register on exit.
To re-define the field, separator, and terminator
sets
If you need to change the field and separator sets, or define terminators, you
can provide three change-lists via a List Address Block, explained later.
Entry Conditions
(HL)
=
Text buffer
(DE)
=
List Address Block
DE
=
0 indicates no lists are to be used
C
=
Maximum length of parse
A
=
48
Exit Conditions
=
Field-position:
(HL)
=
First byte of field, if a delimited field was found
(HL) = Terminator or non-blank separator if no field was found
(HL) = Last byte of buffer if parse reached maximum length
=
Actual lengths of field, excluding leading and trailing blanks
=
Character preceding the field just found.
If
B
=
0, A
= X'FF'
=
Number of bytes remaining to parse after terminator or separator.
Note that trailing blanks have been parsed.
= Separator or terminator at end of field.
If
D
= X'FF'
then parse
stopped without finding a non-blank separator or terminator.
=
Displacement pointer for next parse call. Add E to HL to get:
a) Beginning address of next field, or
b) Address of byte following the last byte parsed. Note that if
parse reached maximum length, then E
+
HL = Address
following end of text buffer.
If
parse did not reach maximum
length, andE
=
1, thenE
+
HL = Address following separator
or terminator.
273

Advertisement

loading