Skip to content

Instantly share code, notes, and snippets.

@blakewrege
Last active August 29, 2015 14:08
Show Gist options
  • Save blakewrege/4c80d968748681425d90 to your computer and use it in GitHub Desktop.
Save blakewrege/4c80d968748681425d90 to your computer and use it in GitHub Desktop.
#include <msp430.h>
.text
RESET mov.w #__STACK_END,SP
MOV #WDTPW+WDTHOLD, &WDTCTL
MOV #__stack, R1
CLR.B &DCOCTL
MOV.B &CALBC1_1MHZ, &BCSCTL1
MOV.B &CALDCO_1MHZ, &DCOCTL
MOV #1, r15 ; print 'A'
MOV #1, r14 ; Main loop here
Loop: ADD #0x0001, r15
ADD #0x0001, r14
JMP Loop
.global __STACK_END
.sect .stack
.sect ".reset" ;reset vector
.short RESET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment