📄 msp430x24x_mpy_03.s43
字号:
;******************************************************************************
; MSP430x24x Demo - 16x16 Signed Multiply
;
; Description: Hardware multiplier is used to multiply two numbers.
; The calculation is automatically initiated after the second operand is
; loaded. Results are stored in RESLO, RESHI and SUMEXT = FFFF if result is
; negative, SUMEXT = 0 otherwise.
;
; ACLK = 32.768kHz, MCLK = SMCLK = default DCO
;
; MSP430x249
; -----------------
; /|\| |
; | | |
; --|RST |
; | |
; | |
;
; B. Nisarga
; Texas Instruments Inc.
; September 2007
; Built with IAR Embedded Workbench Version: 3.42A
;******************************************************************************
#include <msp430x24x.h>
;-------------------------------------------------------------------------------
RSEG CSTACK ; Define stack segment
;-------------------------------------------------------------------------------
RSEG CODE ; Assemble to Flash memory
;-----------------------------------------------------------------------------
RESET mov.w #SFE(CSTACK),SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
mov.w #01234h,&MPYS ; Load first operand -signed mult
mov.w #05678h,&OP2 ; Load second operand
bis.w #LPM4,SR ; LPM4
nop ; set BREAKPOINT here
;------------------------------------------------------------------------------
COMMON INTVEC ; Interrupt Vectors
;------------------------------------------------------------------------------
ORG RESET_VECTOR ; MSP430 RESET Vector
DW RESET ;
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -