bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assemby code msp430


From: Nick Clifton
Subject: Re: assemby code msp430
Date: Tue, 12 Apr 2005 09:50:03 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Hi Aditya,

i am using the msp430-as assembler with -mmcu=msp430x147. the above
controller has a code address space from 0x8000. but whenever i
include ".org 0x8000" at the beginning of the code and follow it with
a mov  command like mov #0x5A80,0x0120,  i get the output "operand out
of range: 32784 (or a similar number)"

I asked Dmitry, the MSP430 maintainer about this.  He said:

: The actual asm message will be 'region text is full' cause .org
: directive will (as I understand) shift a PC by 0x8000 bytes forward
: from the current location.  The linker script defines ROM_START at
: 0x8000, therefore first instruction will be placed at address 0x8000 +
: 0x8000 == 65536 which is out of range.
:
: The assembler instruction mov #0x5A80,0x0120 will not produce any
: error message unless some of operands over 16 bits value. If they are,
: the error message will suggest how to fix this problem.  Objdump
: output will indicate that mov instruction uses PC relative addressing
: mode and will show an actual address of the destination operand.
:
: I probably know where these question come from: some commercial tools
: treat '.org' directive as an absolute shift within a whole memory
: range. Thus, some people think that there is a bug, then think to read
: documentation  :)

I hope that this helps. Basically, I think that Dmitry is saying that you do not need the ".org 0x8000" directive as this is already handled by the linker script.

Cheers
  Nick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]