#include "msp430.h" ; #define controlled include file
NAME main ; module name
PUBLIC main ; make the main label vissible
; outside this module
ORG 0FFFEh
DC16 init ; set reset vector to 'init' label
RSEG CSTACK ; pre-declaration of segment
RSEG CODE ; place program in 'CODE' segment
init: MOV #SFE(CSTACK), SP ; set up stack
main: NOP ; main program
MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
mov #30h,r4
mov #40h,r5
mov #7,r6
up: mov.b @r4,r7
mov.b @r5,r8
mov.b r7,0(r5)
mov.b r8,0(r4)
inc r4
inc r5
dec r6
jnz up
JMP $ ; jump to current location '$'
; (endless loop)
END
Comments
Post a Comment