private int CheckMap(int t, byte[] allBytes, SymbolCollection newSymbols, List<CodeBlock> newCodeBlocks)
{
int retval = 0;
// read LL LL
int len1 = Convert.ToInt32(allBytes[t]) * 256 + Convert.ToInt32(allBytes[t + 1]);
int len2 = Convert.ToInt32(allBytes[t + 2]) * 256 + Convert.ToInt32(allBytes[t + 3]);
if (len1 < 32 && len2 < 32 && len1 > 0 && len2 > 0)
{
SymbolHelper sh = new SymbolHelper();
sh.X_axis_address = t + 4;
sh.X_axis_length = len1;
sh.Y_axis_address = sh.X_axis_address + sh.X_axis_length * 2;
sh.Y_axis_length = len2;
sh.Flash_start_address = sh.Y_axis_address + sh.Y_axis_length * 2;
sh.Length = sh.X_axis_length * sh.Y_axis_length * 2;
if (sh.X_axis_length > 1 && sh.Y_axis_length > 1)
{
sh.Varname = "3D " + sh.Flash_start_address.ToString("X8");
}
else
{
sh.Varname = "2D " + sh.Flash_start_address.ToString("X8");
}
AddToSymbolCollection(newSymbols, sh, newCodeBlocks);
retval = (len1 + len2) * 2 + sh.Length ;
}
return retval;
}