|
#include "msp430x44x.h"
;******************************************************************************
; MSP-Test44x 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
;
; Yang Rui
; Lierda, Inc
; NOVEMBER 2003
; Built with IAR Embedded Workbench Version: 1.26B
;-----------------------------------------------------------------------------
ORG 01100h ; Program Start
;-----------------------------------------------------------------------------
RESET mov.w #0A00h,SP ; Initialize 'F449 stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1 bis.b #002h,&P5DIR ; P5.1 output
;
Mainloop xor.b #002h,&P5OUT ; Toggle P5.1
Wait mov.w #050000,R15 ; Delay to R15
L1 dec.w R15 ; Decrement R15
jnz L1 ; Delay over?
jmp Mainloop ; Again
;
;------------------------------------------------------------------------------
; Interrupt Vectors Used MSP430x44x
;------------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
END
这个是书本上的例子。一模一样写进去,还是编译不通,难道这个只是子程序吗
请教汇编 语言的完整程序格式是什么呢??
|
|