How to go to label depending on string

Hey all,

Having a bit of a problem. Using basic micro studio and programing an ARC32. I want to be able to go to a specified label depending on one of 20 strings. For instance I receive a 6 character string into an array then depending on one of 20 strings I want to go to one of 20 labels. Not sure If I am handling it correctly because I cant get it to work. Here is what I have for just one of the possible strings. It prints correctly to the terminal.

ircode var byte(6)

main
serin p16, i9600, [str ircode\6]
serout s_out,i9600,[13, str ircode\6]; prints to terminal
pause 500
if ircode = "FD50AF" then rampmove
goto main

Thanks!
Smitty

I haven’t used basic micro studio for a while, but that code generally seems good. Are there any compilation errors? Do you get the right output on the serial terminal?

I am also rusty…
don’t think you can do simple string compares like that. You probably have to compare byte by byte…