View Full Version : How do I use a string stored in a 8 byte array to...

07-25-2005, 02:45 AM
to make a comparison.· Suppose I have the string FORWARD_· already stored·in a 8 byte array called keyboard_data.· Now I want to retreive that whole string to make a comparison:

IF (8 byte array...keyboard_data) =·"forward_" then
· GOSUB robo_forward

I have the string in the array in eeprom, but I can't figure out how to get it out in one piece to make the above comparison.

I am trying to use the ezKEYER from Multilabs to control "robo child".


07-25-2005, 11:05 PM
As far as I know, there isn't any way to do it all at once.· You have to check each byte individually.· Here's some pseudocode which assumes you have two arrays that you want to compare between (I know this isn't exactly your situation, but I assume you can figure out how to replace the second array with reading the appropriate character from eeprom or however you wish to store it).

for n = 0 to 8

if keyboard_data(n) <> comparison_string(n) then goto no_match


' if execution reaches here, the strings are the same


' if this label is jumped to, the strings aren't the same