Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to convert .hex file to .asm file?

Status
Not open for further replies.

bergkamp

Newbie level 5
Joined
Jun 29, 2005
Messages
8
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,353
help BEGINNER
i have a .hex file for a micorcontroller and i want to turn it into the assambler code. do you know any application that can do this?
thanks!
 

wek

Full Member level 4
Joined
Dec 21, 2004
Messages
239
Helped
28
Reputation
56
Reaction score
2
Trophy points
1,298
Activity points
1,991
disassembler hex to asm

This kind of tool is called "disassembler". Of course, it is dumb, and you might need to reconstruct data areas etc.
Which kind of microcontroller is your hexfile for?

wek
 

    bergkamp

    Points: 2
    Helpful Answer Positive Rating

wek

Full Member level 4
Joined
Dec 21, 2004
Messages
239
Helped
28
Reputation
56
Reaction score
2
Trophy points
1,298
Activity points
1,991
18f2620 disassembler

If your microcontroller is 386-based, then yes.
But I think it is not too probable.
Again: what is you microcontroller?

Jan Waclawek
 

metal

Full Member level 6
Joined
Dec 21, 2004
Messages
364
Helped
19
Reputation
38
Reaction score
6
Trophy points
1,298
Activity points
3,833
desasembler hex para asm

Hello

If you are using PICs MCUs, then you can use ICProg disassembler.

Regards
 

bergkamp

Newbie level 5
Joined
Jun 29, 2005
Messages
8
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,353
how to open hex file as asm

i am using 8051
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,310
Reputation
4,622
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
pic disassemblers icprog

There is no simple solution here. You can obviously use disassembler but it will be up to you how to interpret the file created by a disassembler.
Regards,
IanP
 

wek

Full Member level 4
Joined
Dec 21, 2004
Messages
239
Helped
28
Reputation
56
Reaction score
2
Trophy points
1,298
Activity points
1,991
hex code disassemble

How do you mean?
It is full with sources.
All you need to start is d52.exe (or the d52 elf, it you do Linux), but have a look also at the example (test.ctl and test.hex).
What, if a piece of software today does not have xxxMB it's suspiciously small? :)
The windows GUI is kind of experimental, I don't use it.

Oh, and you may want to read the manual :-o

wek
 

ful babu

Full Member level 3
Joined
Nov 11, 2004
Messages
174
Helped
13
Reputation
26
Reaction score
3
Trophy points
1,298
Location
Singapore
Activity points
1,634
.hex to .asm

any one kno any PIC18F dassembler ?

thx
 

asahin11

Member level 3
Joined
Jun 20, 2005
Messages
57
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,767
386 hex to asm

ful babu said:
any one kno any PIC18F dassembler ?

thx

You can use ICPROG for PIC disassembler.
 

ful babu

Full Member level 3
Joined
Nov 11, 2004
Messages
174
Helped
13
Reputation
26
Reaction score
3
Trophy points
1,298
Location
Singapore
Activity points
1,634
pic hex decompiler 18f4550

asahin11 said:
You can use ICPROG for PIC disassembler.

i m afraid icprog dassembler doesn't support 18F series
 

VVV

Advanced Member level 5
Joined
Nov 26, 2004
Messages
1,582
Helped
384
Reputation
768
Reaction score
88
Trophy points
1,328
Activity points
19,971
pic18 import hex file

For PIC's, just open MPLAB, click File.. Import and import the hex. Then click View. Program memory. You will see the disassembled code.

Right click on the tabs at the top and uncheck them all, except "Disassembly".

Select the first line of code, right-click on it and select "Output to file" to save the file as text. Then you open that file and edit it, but again, you need to figure out many unknowns.
 

ful babu

Full Member level 3
Joined
Nov 11, 2004
Messages
174
Helped
13
Reputation
26
Reaction score
3
Trophy points
1,298
Location
Singapore
Activity points
1,634
disassembler pic18f252

VVV said:
For PIC's, just open MPLAB, click File.. Import and import the hex. Then click View. Program memory. You will see the disassembled code.

Right click on the tabs at the top and uncheck them all, except "Disassembly".

Select the first line of code, right-click on it and select "Output to file" to save the file as text. Then you open that file and edit it, but again, you need to figure out many unknowns.

i did as u told so but wen i try to import a hex file it gives a message like "The format of the file cannot be read or written because its extension was not recognised" though the file was compiled by tat MPLAB itself !
 

VVV

Advanced Member level 5
Joined
Nov 26, 2004
Messages
1,582
Helped
384
Reputation
768
Reaction score
88
Trophy points
1,328
Activity points
19,971
disassembler bin to asm

I do this every day and it works just fine. That is how you program a PIC when you are only given the .hex file, for example.

The fact that it did not work means that the file is corrupted or is the wrong file. Try creating a new one, with only a few instructions, assemble it and then import the hex file. It should work.
 

Duby

Junior Member level 2
Joined
Feb 13, 2008
Messages
24
Helped
10
Reputation
20
Reaction score
0
Trophy points
1,281
Activity points
1,392
converting hex file back to asm

I don't have any problem with Importing hex file

....thanks to VVV
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top