Hey there.
I'm trying to make a program that reads and prints out the information contained in the object files that come out of the A51 assembler. It's going to read the records and output it all in some kind of readable manner.
However I have already banged my head against the first of possibly many problems:
My program is written in C++ and opens a file in binary mode and as input. It then uses the get() function associated with the ifstream to read byte after byte.
Right now I have it print it all out in hexadecimal format. BUT -
As I can see from the OMF51 specification, the first part of the .OBJ file should be 02h (meaning record type MODULE HEADER RECORD). However, the first byte is showing 70h.
When I print it out as characters in ASCII I can see that a bit further down the road there are ASCII characters showing names of some files.
Is the OMF51 specification I have wrong, or does the A51 assembler output a different file format? There also is no record type with the specification 70h. So I am a bit confused now.
Any help?
- Rune
Keil adds own extensions that the haven't - to my knowledge - published the documentation for.
That makes sense. The problem is, that after reverse engineering a bit, that they put the data in a record type called 07H instead of 06H. And the format is a bit different, where as in 06H there are 3 bytes of data before the actual code data (instructions). In 07H there are 4 bytes of data.
So I dont think it is possible to actually read anything from the file, unless I can somehow get the specification from the actual Keil OMF51 format...
In the good old days, when I was involved with the use of Keil products, I frequently used an INTEL OMF-51 viewer plugin for total commander. You might want to try and find the author to see if he could give you details.
The only link I could find is: www.totalcmd.net/.../ObjView.html
if you have the OMF51 format, you 'must' have the source. if you do not have the source 'reverse engineering' is illegal
Erik
Note that the laws of reverse engineering varies a lot depending on where you live.
Next thing, is that reverse engineering of file formats can be allowed even when reverse engineering of program code isn't.
View all questions in Keil forum