Implementation Details
5-49
Code Development Tools
-
Unsigned comparison of a and b. (a is in A0, b is in A0~)
Assembly
Test
Condition
_ult
a < b
AULT
_ule
a <= b
!AUGT
_uge
a >= b
!AULT
_ugt
a > b
AUGT
The small number of comparisons was an invitation to use them as vector
calls. We return a 1 or 0 in A0 as the result of the comparison, and also set flag
2 if the comparison is true. The flag is not currently used by the compiler.
It is important to note that functions return their results via A0, but there is no
guarantee that the
absolute value of the A0 pointer is not changed by the
function. To compare integers a and b: after loading a in A0, and b in A0~, do
a vector call to the appropriate comparison routine:
Assembly
Vector
_eq
0
_ne
1
_lt
2
_le
3
_ge
4
_gt
5
_ult
6
_ule
7
_uge
8
_ugt
9
_lneg
10
We return the result of the comparison in Flag 2 ( set for TRUE, reset for
FALSE), and in A0 (1 for TRUE, 0 for FALSE). We have also implemented
vector calls for string comparisons. There are a few C callable routines that
make use of those calls. (
test_string
,
or_string
,
and_string
,
xor_string
,
neg_string
,
not_string
)
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...