new \ <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> TARGET \ <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> \ ---------------------------------------------------------------------------- \ Timer interrupt handler flashes LED \ ---------------------------------------------------------------------------- : impulse ( -- ) 16 p1out cbis! 16 p1out cbic! ; \ ---------------------------------------------------------------------------- \ Hello World \ ---------------------------------------------------------------------------- : blinky ( -- ) \ Pin & Clock initialisation \ Disable crystal oscillator, set P2.6 and P2.7 as low outputs 0 p2sel c! 0 p2out c! %11000000 p2dir c! \ No special functions, set P1.3 input, all others low outputs 0 p1sel c! 0 p1out c! %11110111 p1dir c! 0 DCOCTL c! 0 BCSCTL1 c! %00001000 BCSCTL2 c! \ SELS: VLO --> SMCLK %00100000 BCSCTL3 c! \ LFXT1S VLO, 12 kHz --> SMCLK, ACLK \ Timer initialisation $10 TACCTL0 ! \ CCIE 12000 TACCR0 ! \ VLO/12 / 1000 = 12 kHz / 12 / 1000 = 1 Hz $110 TACTL ! \ ACLK, Up Mode begin lpm3 again ; \ <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> HOST \ <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> $FFF2 vector impulse \ Timer A0 $FFFE vector blinky \ Reset vector crosscompile disimage-file helloworld.asm hexdump-file helloworld.hex bye