Hi,

If I assemble the attached .S file with

msp430-gcc -g -O2 -mmcu=msp430x449 -D_GNU_ASSEMBLER_ -nostartfiles -nostandartlibs xxx.S

and dump the resulting file with:

msp430-objdump -DS a.out

I get:


a.out:     file format elf32-msp430

Disassembly of section .text:

00001100 <__ctors_end>:
   1100:       33 40           .word   0x4033; ????
   1102:       00 0a           .word   0x0a00; ????

00001104 <StopWDT>:
   1104:       b2 40 80 5a     mov     #23168, &0x0120 ;#0x5a80
   1108:       20 01

0000110a <SetupP1>:
   110a:       e2 d3 32 00     bis.b   #2,     &0x0032 ;r3 As==10

0000110e <Mainloop>:
   110e:       e2 e3 31 00     xor.b   #2,     &0x0031 ;r3 As==10

00001112 <Wait>:
   1112:       3f 40 50 c3     mov     #-15536,r15     ;#0xc350

00001116 <L1>:
   1116:       1f 83           dec     r15             ;
   1118:       fe 23           jnz     $-2             ;abs 0x1116
   111a:       f9 3f           jmp     $-12            ;abs 0x110e
Disassembly of section .data:

Why isn't the first instruction disassembled properly?

Regards,
Steve


#include <io.h>
;******************************************************************************
;   MSP-FET430P440 Demo - Software Toggle P5.1  
;
;   Description; Toggle P5.1 by xor'ing P5.1 inside of a software loop.
;   ACLK = n/a, MCLK = SMCLK = default DCO
;
;                 MSP430F449
;             -----------------
;         /|\|              XIN|-  
;          | |                 |
;          --|RST          XOUT|-
;            |                 |
;            |             P5.1|-->LED
;
;   M.Buccini
;   Texas Instruments, Inc
;   January 2002
;******************************************************************************
            .section    .text
RESET:      mov.w   #0xA00,R3               ; Initialize 'F449 stackpointer
StopWDT:    mov.w   #WDTPW+WDTHOLD,&WDTCTL  ; Stop WDT
SetupP1:    bis.b   #0x02,&P5DIR            ; P5.1 output
                                            ;                     
Mainloop:   xor.b   #0x02,&P5OUT            ; Toggle P5.1
Wait:       mov.w   #50000,R15              ; Delay to R15
L1:         dec.w   R15                     ; Decrement R15
            jnz     L1                      ; Delay over?
            jmp     Mainloop                ; Again
                                            ;
;------------------------------------------------------------------------------ 
;           Interrupt Vectors Used MSP430x44x         
;------------------------------------------------------------------------------ 
            .section    .vectors
            .org    0x1E,0xFF               ; MSP430 RESET Vector
            .word   RESET                   ; 

Reply via email to