;------------------------------------------------------------------------------
;BURAK AVCI / 090202395 / HAFTA-7
;Blok Aktarma
;------------------------------------------------------------------------------
sayac .equ r10
indeks .equ r11
indeks2 .equ r12
dizi .equ 0220h
.cdecls C,LIST, "msp430g2231.h"
;------------------------------------------------------------------------------
.text ; Progam Start
;------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
;------------------------------------------------------------------------------
; Blok Aktarma 1. Kısım Derste Yapılan
;------------------------------------------------------------------------------
mov #16,sayac
mov #kaynak, indeks
geri mov sayac,0(indeks)
incd indeks
dec sayac
jnz geri
mov #16,sayac
mov #kaynak, indeks
; mov #varis, indeks2
mov #kaynak, indeks2
incd indeks2
add #30,indeks
add #30,indeks2
geri2 mov 0(indeks),0(indeks2)
decd indeks
decd indeks2
dec sayac
jnz geri2
jmp son
nop
sabit .word 1234
.bss kaynak, 32
.bss bos, 32
.bss varis,32
;------------------------------------------------------------------------------
; Blok Aktarma 2. Kısım
;------------------------------------------------------------------------------
mov #16, r10
mov #0200h, r11
mov #0215h, r12
cmp r11,r12
jnc buyuk
add #0036, r11
add #0036, r12
gt mov 0(r11), 0(r12)
decd r11
decd r12
dec r10
jnz gt
jmp son
buyuk mov 0(r11), 0(r12)
incd r11
incd r12
dec r10
jnz buyuk
son nop
;------------------------------------------------------------------------------
; Interrupt Vectors
;------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET ;
.end
Ders: MikroişlemcilerProf. Dr. Bekir Tevfik Akgün