2
« on: May 02, 2018, 01:54:37 pm »
FellippeHeitor,
Thanks for the response. Alas, it did not work.
After thinking about it, if I create a string that contains "000C," the string itself is 4 bytes long, with each byte containing the ASCII numeric value that corresponds to each alphnumeric character: 30 (zero), 30 (zero), 30 (zero), and 43 (the letter C).
In my case, however, the 2-byte hex integer fields are further subdivided into 4-bit (i.e., nibble) pieces, with each 4-bit chunk being able to contain a hex value from 0 - F.
By prefixing a string I create with the &H, the VAL command will, in fact, convert it correctly to a base-10 value.
But prefixing my 2-byte hex integer field with the &H yields incorrect results, because VAL is expecting to find valid ASCII values for the alphanumeric digits 0 - 9.
It looks like what I really need to be able to do is to break an 8-bit byte into 2 x 4-bit pieces, and then analyze each 4-bit piece.
I'm not sure QB64 can manipulate things down to a 4-bit level. I may end up having to take up assembler in order to process my file.
Thanks again for any help!