> AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64 =AA|=C2w=E4v????d??.?d
> ....
>
> i chopped of the ask to make a hex-only file:
>
> 20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76
> 60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76
> AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64
> ...
xxd -r -p hex > bin
Reply by Grant Edwards●March 14, 20072007-03-14
On 2007-03-14, 4MLA1FN <eff1fan@yahoo.com> wrote:
> On Wed, 14 Mar 2007 14:49:14 -0000, Grant Edwards <grante@visi.com>
> wrote:
>
>>What does your file look like?
>
> the raw captured file like this:
>
> 20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76 1.40�.�ry|y�v�v
> 60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76 `wZw,w.w�v�v�v�v
> AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64 �|�w�v????d??.?d
> ....
>
> i chopped of the ask to make a hex-only file:
>
> 20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76
> 60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76
> AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64
> ...
Here's a converter program:
#!/usr/bin/python
import sys
for hexbyte in sys.stdin.read().split():
sys.stdout.write(chr(int(hexbyte,16)))
Here's how it's used:
$ cat foo.hex
20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76
60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76
AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64
$ ./hextobin.py <foo.hex >foo.bin
$ ls -l foo.bin
-rw-r--r-- 1 grante users 48 2007-03-14 12:38 foo.bin
$ od -tx1 -Ax foo.bin
000000 20 31 2e 34 30 ff 00 ff 72 79 7c 79 f0 76 fe 76
000010 60 77 5a 77 2c 77 04 77 e4 76 f8 76 e4 76 e4 76
000020 aa 7c c2 77 e4 76 9c 80 80 80 64 9c 80 00 80 64
--
Grant Edwards grante Yow! What I want to find
at out is -- do parrots know
visi.com much about Astro-Turf?
Reply by 4MLA1FN●March 14, 20072007-03-14
On Wed, 14 Mar 2007 14:49:14 -0000, Grant Edwards <grante@visi.com>
wrote:
>What does your file look like?
the raw captured file like this:
20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76 1.40�.�ry|y�v�v
60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76 `wZw,w.w�v�v�v�v
AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64 �|�w�v????d??.?d
....
i chopped of the ask to make a hex-only file:
20 31 2E 34 30 FF 00 FF 72 79 7C 79 F0 76 FE 76
60 77 5A 77 2C 77 04 77 E4 76 F8 76 E4 76 E4 76
AA 7C C2 77 E4 76 9C 80 80 80 64 9C 80 00 80 64
...
i also tried chopping off the hex and kept the ascii jibberish with
CR/LFs removed, but i know that doesn't make sense since hex values
like 0x00 show up as '.' or 0x2E.
Reply by Grant Edwards●March 14, 20072007-03-14
On 2007-03-14, 4MLA1FN <eff1fan@yahoo.com> wrote:
> i've got raw msp430 code extracted from a target device. i'd like to
> disassemble it. msp430-objdump requires the file to be in one of many
> file formats; e.g. symbolsrec, srec, tekhex, binary, ihex. i guess i
> need to write a converter, but i can only find a spec for the srec
> format. anyone know where i can find the spec for the other formats?
> or is there a converter that'll take as input my ascii hex file and a
> starting address and produce one of these formats??
What does your file look like?
--
Grant Edwards grante Yow! I am covered with
at pure vegetable oil and I am
visi.com writing a best seller!
Reply by 4MLA1FN●March 14, 20072007-03-14
i've got raw msp430 code extracted from a target device. i'd like to
disassemble it. msp430-objdump requires the file to be in one of many
file formats; e.g. symbolsrec, srec, tekhex, binary, ihex. i guess i
need to write a converter, but i can only find a spec for the srec
format. anyone know where i can find the spec for the other formats?
or is there a converter that'll take as input my ascii hex file and a
starting address and produce one of these formats?? many thanks.