Remember that it's all just numbers, if you want to check if a byte contains 'I' either of these will work
Code:
IF myByte = 73 THEN....
If myByte = "I" THEN....
IF myByte = $49 THEN....
IF myByte = %00110001 THEN...
They all do the same thing - they compare the content of myByte with the decimal value 73, which is the ASCII code for the letter 'I'.
Instead of using AND you might try something like:
Code:
IF Buffer[0] = "I" THEN
IF Buffer[1] = "N" THEN
IF Buffer[2] = "V" THEN
IF Buffer[3] = "A" THEN
GOTO Freeze
ENDIF
ENDIF
ENDIF
ENDIF
There's nothing wrong with the AND approach but I think using multiple IF statements will produce smaller code.
/Henrik.
Bookmarks