Download TR0109 TSK3000 Embedded Tools Reference
Transcript
TSK3000 Embedded Tools Reference
@STRCMP(string1,string2)
Compares string1 with string2 by comparing the characters in the string. The function returns the
difference between the characters at the first position where they disagree, or zero when the strings are
equal:
<0
if string1 < string2
0
if string1 == string2
>0
if string1 > string2
Example:
.IF (@STRCMP(STR,'MAIN'))==0
; does STR equal 'MAIN'?
@STRLEN(string)
Returns the length of string as an integer.
Example:
SLEN SET @STRLEN('string')
; SLEN = 6
@STRPOS(string1,string2[,start])
Returns the position of string2 in string1 as an integer. If string2 does not occur in string1, the last string
postition + 1 is returned.
With start you can specify the starting position of the search. If you do not specify start, the search is
started from the beginning of string1.
Example:
ID .set @STRPOS('TASKING','ASK')
ID .set @STRPOS('TASKING','BUG')
3-4
; ID = 1
; ID = 7
Related documents
TR0109 TSK3000 Embedded Tools Reference
v1.1 ARM Tools Reference
GU0111 Using the TSK3000 Embedded Tools
GU0111 Using the TSK3000 Embedded Tools
TR0130 Nios II Embedded Tools Reference
TR0129 MicroBlaze Embedded Tools Reference
TR0131 ARM Embedded Tools Reference
C-to-Hardware Compiler User Manual
Tytron & Tytron Software User Manual
AQ-300-U - Stillnewt.org