41: We place the data into the array based upon the address we pulled from the line (address1 + address2) and the byte number.39: Here, we move the line of data from the buffer into the final array.34: We check to see if we actually got data from our attempt.We store this flag to make sure we got something. If the function was got data, it will return true. The hex file we want to parse (file), the buffer we hold the line data in, the int array which will serve to hold the address of this line of data, a variable to hold the number of bytes in this line. 33: We pass read_line_from_hex() our variables we wish to fill.Another, older console application: hex2bin.zip. Cleaned input: Name of file to create: For larger (over few MBs) data sets hextofile.exe might be more useful. We loop until the we have read through all the lines we counted. Hex string: Note: all characters outside hex set will be ignored, thus '12AB34' '12 AB 34' '12, AB, 34', etc. 23: We count the number of lines in the file we wish to extract data.C int main ( int argc, char * argv ) // End hex_file_to_array
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |