;*******************************************************************************
; BURAK AVCI 090202395
;*******************************************************************************
.cdecls C,LIST, "msp430g2231.h"
;------------------------------------------------------------------------------
.text ; Program Start
;------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
;---------- Birinci Toplama Örneği
mov #1234h, r5
mov #11, r6
add r5,r6
nop
;---------- İkinci Toplama Örneği
mov #0ffffh, r5
mov #0ffffh, r6
inc.w r5
dec r5
inc.b r6
dec.b r6
inc.b r6
mov.b r6,r5
nop
;---------- Üçüncü Toplama Örneği
mov #5, r5
mov #6, r6
mov #7, r7
mov #8, r8
mov #9, r9
mov #10, r10
mov r5,r11
add r6,r11
add r7,r11
add r8,r11
add r9,r11
add r10,r11
nop
;------------------------------------------------------------------------------
; Interrupt Vectors
;------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET ;
.end
Ders: MikroişlemcilerProf. Dr. Bekir Tevfik Akgün