SLAU132V October 2004 – February 2020
;******************************************************************************
;* MSP430 C/C++ Codegen Unix v0.2.0 *
;* Date/Time created: Tue Jun 29 14:54:28 2004 *
;******************************************************************************
.compiler_opts --mem_model:code=flat --mem_model:data=flat --symdebug:none
; acp430 -@/var/tmp/TI764/AAAv0aGVG
.sect ".text"
.align 2
.clink
.global main
;-----------------------------------------------------------------------
; 3 | int main()
;-----------------------------------------------------------------------
;******************************************************************************
;* FUNCTION NAME: main *
;* *
;* Regs Modified : SP,SR,r11,r12,r13,r14,r15 *
;* Regs Used : SP,SR,r11,r12,r13,r14,r15 *
;* Local Frame Size : 2 Args + 0 Auto + 0 Save = 2 byte *
;******************************************************************************
main:
;* ---------------------------------------------------------------------------*
SUB.W #2,SP
;-----------------------------------------------------------------------
; 5 | printf("Hello, world\n");
;-----------------------------------------------------------------------
MOV.W #$C$SL1+0,0(SP) ; |5|
CALL #printf ; |5|
; |5|
;-----------------------------------------------------------------------
; 7 | return 0;
;-----------------------------------------------------------------------
MOV.W #0,r12 ; |7|
ADD.W #2,SP ; |7|
RET ; |7|
; |7|
;******************************************************************************
;* STRINGS *
;******************************************************************************
.sect ".const"
.align 2
$C$SL1: .string "Hello, world",10,0
;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES *
;******************************************************************************
.global printf