??? 11/05/07 11:35 Read: times |
#146601 - Still not got it! Responding to: ???'s previous message |
Shehryar Shaukat said:
i have been told "here" to convert the HEX file from my MMC into an executable binary format. Absolutely! Here: http://www.8052.com/forum/read.phtml?id=146452 And here: http://www.8052.com/forum/read.phtml?id=146589 would that only require me to strip off the Number of data bytes value, the address info and the checksum bytes from the HEX file and hex file would be converted to executable binary format. That is necessary - but not sufficient Having stripped-off all that "overhead", you would then need to convert the character pairs that you're left with back to single-byte values. See: http://www.8052.com/forum/read.phtml?id=146452 The single-byte values would then have to be loaded into the appropriate CODE space addresses, from where the 8051 could fetch and execute them. And do remember: the records in an Intel Hex file are not necessarily in order...! As I said before, you should experiment with HEX2BIN to see how it all works: http://www.keil.com/download/docs/7.asp Get a Hex file - try to view it in Notepad, or TYPE it at a DOS prompt; Run it through HEX2BIN to convert it to Binary; Now try viewing the Binary file in Notepad, or TYPEing it at a DOS prompt... Get yourself a viewer that can display the raw contents of files in hex format - use that to view both the Hex file and the Binary file... |