Re: Different hex file generated by gpasm and mpasm

Craig Franklin <[email protected]> Thu, 22 Sep 2005 19:41:41 -0500
Newsgroups gmane.comp.hardware.microcontrollers.gnupic
Message-ID <[email protected]>
Chen Xiao Fan wrote:

>There should be an one-to-one relationship between the assembly 
>source and the machine instruction and indeed there is.
>
>I check the list file and find out they are indeed almost the same. 
>The only difference is that the code section starts with 0x07 for
>MPASM/MPLINK and 0x05 for the gpasm/gplink. There is two word
>not used by MPASM/MPLINK, a bit strange. The linker scripts are 
>exactly the same.
>
>  
>
mplink always reserves space for .cinit even if no initialized data 
sections exist.  Run mplink with the /m option and you will see it.  
gplink only creates the symbol if an initialized section is present.

The lesson here is map files are your friend.  If anything looks strange 
look there.

>Regards,
>Xiaofan
>
>-----Original Message-----
>From: Rob Hamerling
>Sent: Tuesday, September 20, 2005 6:07 PM
>To: [email protected]
>Subject: Re: [gnupic] Different hex file generated by gpasm and mpasm
>
>An assembler is not a compiler! With an assembler there is a one-to-one 
>relationship between a source statement and a machine instruction. A 
>compiler must translate the high level symbolic language to a machine 
>instructions and it has much freedom how it wants to reach the goal.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
>
>  
>