Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 231

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

Advertisement

Technical Information
STCMP
String Comparison (function code 22)
This routine compares two strings to determine their collating sequence.
Entry Conditions
(DE)
=
First string
(HL)
=
Second string
BC
=
Number of characters to compare
A
=
22
Exit Conditions
Status bits indicate results, as follows:
Z flag set indicates strings are identical.
NZ indicates strings not identical.
Carry flag set indicates first string (pointed to by DE) precedes second string
(pointed to by HL) in collating sequence.
Other register contents:
A
=
First non-matching character in first string
When strings are not equal, you can get further information from the prime
registers, as follows:
HL'
=
Address of first non-matching character in second string
DE'
=
Address of first non-matching character in first string
BC'
=
Number of characters remaining, including the non-matching
character
267

Advertisement

loading