|B2h||UT$CMPB||case dependent compare|
|Input||X register - Address of one string.
UTW_S0 - Address of other string.
A register - length of string at X.
B register - length of string at UTW_S0.
N flag - according to B register.
Case independent buffer compare.
The bytes are compared from low to high memory. If the strings match but are of different lengths, the shorter string precedes the other alphabetically. So,
The X register is preserved.
See also UT$ICPB.
Compares BUF1, length LENBUF1, with BUF2, length LENBUF2, branching
according to the return value.
LDX #BUF1 ; point to buffer BUF1 LDD #BUF2 STD UTW_S0 ; point to buffer BUF2 LDAA #LENBUF1 LDAB #LENBUF2 OS UT$CMPB BEQ MATCHED ; branch to code for matched strings BMI BUF1FIRST ; branch to code for BUF1 first BUF2FIRST: ; here if BUF2 first
|Errors||- none -|