Мигание светодиодом на ассемблере MSP430 не используя прерывания

;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio ; ; Blink the LED using no interrupts. ; Rob Frohne, 2014 ;------------------------------------------------------------------------------- .cdecls C,LIST,"msp430.h" ; Include device header file ;------------------------------------------------------------------------------- .text ; Assemble into program memory .global RESET .retain ; Override ELF conditional linking ; and retain current section .retainrefs ; Additionally retain any sections ; that have references to current ; section ;------------------------------------------------------------------------------- RESET mov.w #__STACK_END,SP ; Initialize stackpointer StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer ;------------------------------------------------------------------------------- ; Main loop here ;------------------------------------------------------------------------------- ; This program is to blink the red LED on the MSP430F5529 LaunchPad. bis.b #1,&PADIR outer xor.b #1,&PAOUT mov.w #0x2710,r5 inner dec.w r5 tst.w r5 jne inner jmp outer ;------------------------------------------------------------------------------- ; Stack Pointer definition ;------------------------------------------------------------------------------- .global __STACK_END .sect .stack ;------------------------------------------------------------------------------- ; Interrupt Vectors ;------------------------------------------------------------------------------- .sect ".reset" ; MSP430 RESET Vector .short RESET
Написать: