 |
memcmp |
Function (ROM Call 0x270) |
Compares two blocks of signed chars.
memcmp compares the first len bytes of the blocks s1 and s2 as signed chars.
Since it compares bytes as signed chars, memcmp returns a value
- < 0 if s1 is less than s2
- =0 if s1 is the same as s2
- > 0 if s1 is greater than s2
For example, memcmp("\xFF","\x7F",1)
returns a value greater than 0. More precisely,
the exact return value is the result of subtracting the first pair of values
that differ in the two blocks being compared based on them being signed
chars.
Note: This routine is declared as "short" although the ANSI standard proposes "long". This is important,
because the TIOS memcmp routine puts garbage in the higher half of the d0 register.
Used by: LoadDLL, are_expressions_identical, EV_defaultHandler, ScrRectScroll, GraphOrTableCmd, ScrRectDivide
See also: memucmp