Continue to Site

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.

public hex to asm possible to get

Status
Not open for further replies.

radium98

Full Member level 2
Full Member level 2
Joined
Jul 19, 2009
Messages
129
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
leb
Activity points
2,291
Hello.
how possible to read or to convert an already public Hex file to asm file ,already i saw it done ,but i really dont know how
i need to put my name at the start up if possible to help me ?
i attach the file it goes to a pic16f876a
thanks.
 

Attachments

  • milliwat 104 beta.rar
    11.4 KB · Views: 108

You need a "disassembler". Many assember packages also include one. You could try the demo Oshonsoft BASIC IDE for example. Note that a dissassembled file will show you the instructions but not the program structure and it will not name variables or show comments as they may have been in the original source file as these are lost during assembly.

Brian.
 
than how he did it ? you need the video that show his name instead of OZ2CPU ?
 

I'm sorry but I am away on vacation at the moment using a mobile phone and it can't open .rar files.

In theory, if you disassemble a file it should be easy to see what is instructions and what is embedded text. If you edit the text then run the file through an assembler it will convert it back to a hex file with your changes in it. Note that the new hex file might be quite different to the one you started with but it should still function properly. The reason is that different assemblers and linkers may optimize the code in different ways.

Brian.
 
Thank you ,As you helped me before i hope when you are back from vacation you can do it for me i need to put
REVE FM at start up thanks
 

i need to put my name at the start up if possible to help me ?

Say it displays "XYZABC" at the start. You want that string to change "ABRACA", right?

It is easy if the new string is smaller than the old string (no of chars) and they display ASCII (char set).

You open any hex editor and look for the string XYZABC and replace that with ABRACA.

If the program after modifying gives a checksum error, you need to add a few NOP at the end (this is left as an exercise).

If the current string is longer than the older string, but there is sufficient RAM left, you need to store the new string at some free area.

Next you need to identify the calling routine: here some skill is needed. You need to change the address from the old string to the new string.
 
let me test and reply thanks .

- - - Updated - - -

@Zasto can you lead me where i have to read to change the reading i need to put

REVE FM

and compile it with mplab
 

@c_mitra: No text is visible in given hex.

@radium98: You have .asm, read it and modify per your needs. I have no intention to reverse engineer the code further. You were advised to search for any kind of disassembler for PIC uC. Use your logic to find in the .asm file where you have to make changes. That way you will also LEARN assembler.
 
I would be very surprised if the text was directly readable. Look for the ASCII codes of the original text to locate it. You can then substitute the characters with the ASCII code of your new text.

Brian.
 
Sorry for mistaken ,or understood,my problem is what software do i need steps to read the asm file and make change ,is it only a hex editor eg. NEO ? so i can learn
 

An asm file is plain text so use any text editor you wish. The problem is not the type of file, it is how to recognize what is inside it.
When creating the original source code, the author would have given meaningful names (labels) to the routines and variables in it. For example if they wrote routine to update a display they might call it 'show_me' and from there on they would use the instruction 'show_me' to update it with new characters. However, an assembler or compiler has no need to know the routine names or the names of variables because it translates them to real memory addresses that the target processor understands. The resulting hex file contains the addresses, not the names so a degree of manual 'decoding' is needed to follow the program flow and work out which addresses hold instructions and which hold data.
What you should look for is consecutive addresses holding the hex values corresponding to the ASCII characters in the original text and edit those.

Question: have you tried contacting the original author, they may be willing to give you the source code.

Brian.
 

I would be very surprised if the text was directly readable. Look for the ASCII codes of the original text to locate it. You can then substitute the characters with the ASCII code of your new text.

You are right. But I use hexedit (great for editing hex files) and it shows both ASCII and hex side by side. For hexcodes that do not have a printable representation, it just shows a dot (period).

You can edit binary (hex files) with vim too but the learning curve is rather steep.

My personal opinion is that most of the disassemblers do not work for most modern compilers: it is impossible to figure out the compiler directives that have been used in the process of compilation. If you recompile the disassembler output (hoping that it will cleanly compile), it will rarely get the working program.

Something like the chinese whispers game children play.
 

@c_mitra: open hex from first post and you will see no text. In disassembled, quite visible :)
Screenshot from 2019-11-04 14-36-03.png

Screenshot from 2019-11-04 14-38-08.png
 

First thank you all for the really clarifiyng ways and discussion to me .In the time i have pm the author Thomas Scherrer but he does not reply it was a long time but today i think i have found the source code and everything ,is it now possible to someone to put my name ?if yes to upload the code
 

Hi again
i tried and failed , so i will attach the source file maybe someone can give me a try and help ,thanks .
// change this to your own callsign and name if you like.
const char TEXT6[] = "REVE FM LEBANON";

[moderator action: links removed]
 
Last edited by a moderator:

here it is again uploaded in the forum source file
 

Attachments

  • Clipboard01.jpg
    Clipboard01.jpg
    80.4 KB · Views: 128
  • oz2cpu.zip
    28.9 KB · Views: 91

here it is again uploaded in the forum source file

The default text strings are present in tex.h file; change them as appropriate and recompile.
 

recompile not working with me did you see the photo
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top