UT_CSTR/UT_CSTR - Vector $E6
This vector compares two strings.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | Comparison type. | D0.L | -1, 0 or +1 |
A0.L | Pointer to string 0. | A0.L | Preserved. |
A1.L | Pointer to string 1. | A1.L | Preserved. |
A6.L | Base address. | A6.L | Preserved. |
Errors
No errors are returned by this vector call.
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- The addresses in A0 and A1 are relative to A6.L.
- The strings are compared and the result recorded in D0.L. If string 0 < string 1 the result is -1. If the strings are the same the result is 0. Otherwise the result is +1.
- There are four types of comparison obtained by setting one of 0 to 3 in D0.B. The types are given below.
- The comparison is carried out given a specific order of characters.
- SPACE !"#$%'()*+,-/:;⇔?@[\]^_£{|}~Copyright.
- 0123456789
- AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
- other non printing characters in ASCII order
- The order of the first line is nearly ASCII except that the full stop comes at the end.
Type of Comparison
Code | Meaning |
---|---|
0 | Characters are compared directly |
1 | The case of characters is ignored |
2 | Embedded numbers are taken into account (see below) |
3 | A combination of types 1 and 2 |
Embedded Number
An embedded number is a set of numerical digits possibly containing a decimal point. In the case of types 2 and 3, embedded numbers are sorted by their value not character by character. This means that "Lim4_asm" would come before "Lim10_asm".