I am trying to take a date (11/12/2013) from a string and place it into a UDT memory address. Following is some code to test the concept. The first time through it will move the one or two digits before the / and move them into UDT, and then delete those digits and the /. The second time it turns the not found bit on in the STRFIND instruction. The third time it will work as expected. Whatup??
SG $Main.S0
STR C10
STRFIND SS0 0x2 D2 C0 C1 """/"""
RST C10
STR C0
JMP $Main.S1
RST C0
SG $Main.S1
STRSUB SS0 0 0x0 D2 SS1
STR2INT SS1 10 UDT0.Month DST511
MATH D3 "D2 + 1"
STRDELETE SS0 0 D3
STRTRIM SS0 0x3
JMP $Main.S0
NOP