On Fri, 2004-07-30 at 21:41, Tony Duell wrote:
I know that when I wanted to convert some ROM dumps
to/from Intel-hex
format, it didn't take me long to knock up a rough-and-ready pair of
programs to do this (rough-and-ready meaning that they assumed that
intelhex lines were less than 256 characters long -- which is certainly
the case with my (commercial) EPROM programmer), etc).
That's what I've ended up with actually - at least for going from hex to
binary. Hexdump handles the other way around quite happily!
I dislike writing C, but I dislike writing Perl even more :-)
I couldn't figure out a good way of doing this with awk - I'm capable of
writing some awk to format output, but not to actual interpret data, do
calculations with it, and spit it out in a different format...
Anyway, problem solved. It's a stop-gap measure as the comms software I
have under Linux doesn't like capturing binary data from the EPROM
programmer, so I have to dump stuff in hex format (but would rather have
stored on the PC in binary format). I'll sort out a better method
sometime ('cat /dev/serialport > file' would be nice!)
cheers
Jules