??? 02/22/06 08:00 Modified: 02/22/06 08:05 Read: times |
#110462 - Hex bloat and Swiss Army Knives Responding to: ???'s previous message |
Craig Steiner said:
Kunaal Lagwankar said:
Also, can it be that the code size of the obj files generated by the A51 assembler be larger than the hex/binary files generated by other standard assemblers ? If the OBJ files of this assembler are really hex files then, yes, it's possible they could be larger than those generated by other assemblers. Each line of a hex file contains about 10 bytes of overhead and then 1-16 bytes of data. It's up to the assembler how many bytes of data it wants to put on each hex line. If it only puts one byte per line, your file size could be about 10 times as large as an assembler that more-efficiently puts 2-16 bytes of data on each line. Additionally, other assemblers may be doing some jump optimization that your assembler isn't doing. There is no guarantee that an Intel Hex record only contains 16 bytes of data. The RECLEN field is one byte, and the Intel Hex Format Specification allows it to be up to 255. In practice, it's usually a lot less than that though, typically in the range you suggest. Note that in addition to the overhead associated with the non-data fields and newlines, each data byte is represented with two ASCII characters. Thus, the size overhead factor of an Intel Hex file must always be greater than 2, but as you point, out, could be much larger. In any case, I think it's an awfully poor choice that the assembler would choose to give the OBJ extension to a hex file. The term "object" has a very well-undertood definition in the assembler / comiler / linker industry and it generally refers to an intermediate file that is created between reading the source file and before creating the output (hex) file. Why they chose to call their hex file an "OBJ" file is beyond me.
Regards, Craig Steiner Yes, it is a very poor choice, and as you suggest, abuse of widely accepted terminology. This assembler is something of a Swiss Army Knife of 8051 tools: it tries to replace a lot of big tools with a single integrated compact one, but doesn't really excel in any area. The big problem with the abuse of the OBJ extension though is that some device programmer software automatically attempts to interpret such files as raw binary data, rather than as the Intel Hex files they are. Thus, when dealing with them, I always either rename them to have a HEX extension or check the buffer before I program the chip. Humor aside, Erik is correct in referring to this tool as "pseudo-professional". This tool is just that: reasonably solid, but not really suitable for more than trivial projects at the professional level. It's about as barebones as you can get in an 8051 assembler, and is appropriate for small tasks or those who choose to pass on the features provided by a more advanced tool chain. --Sasha Jevtic |
Topic | Author | Date |
Using obj files for programming | 01/01/70 00:00 | |
most probably | 01/01/70 00:00 | |
Not really | 01/01/70 00:00 | |
What assembler? | 01/01/70 00:00 | |
A51 details | 01/01/70 00:00 | |
That is usually the case when you own an | 01/01/70 00:00 | |
PseudoSam Assembler | 01/01/70 00:00 | |
Manual | 01/01/70 00:00 | |
Throw it away! | 01/01/70 00:00 | |
Psuedo-Sam | 01/01/70 00:00 | |
Keep what you got. It's very good. | 01/01/70 00:00 | |
Not "WRONG" | 01/01/70 00:00 | |
Where I was wrong | 01/01/70 00:00 | |
not necessarily | 01/01/70 00:00 | |
Back to the question | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
obj files | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
Hex bloat and Swiss Army Knives | 01/01/70 00:00 | |
True enough | 01/01/70 00:00 | |
File size vs Code size | 01/01/70 00:00 | |
Maybe, but... | 01/01/70 00:00 | |
any old UNIX guys? | 01/01/70 00:00 | |
OBJ context | 01/01/70 00:00 | |
from here | 01/01/70 00:00 | |
Ok![]() | 01/01/70 00:00 | |
Link to documentation for A51.EXE | 01/01/70 00:00 | |
From the manual... | 01/01/70 00:00 | |
How very amazing | 01/01/70 00:00 | |
that link | 01/01/70 00:00 |