Datasheet

117
MSP430 Macro Assembler Version 1.08 [09/96] Tue Jun 30 07:20:38 1998
Copyright (C) 1995, 1996 Texas Instruments Incorporated
c:\adt430\stk\examples\gs_stk1.asm Page 1
1;***************************************************************************
2;Getting Started 1 Demo Program (C) TEXAS INSTRUMENTS on 2/96
3;***************************************************************************
4
5;*** Set this variable to 1 for the use on the Simulator***
6 00 SIM .set 0 ; 1 = Simulator
7 ; 0 = STK/EVK
8 0240 RAM_orig .set 00240h ; Free Memory startadress
9 03de SP_orig .set 003DEh ; stackpointer
10
11 ;––– Control register definitions
12
13 00 IE1 .equ 0h
14 01 IE2 .equ 01h
15 02 IFG1 .equ 02h
16 03 IFG2 .equ 03h
17 04 ME1 .equ 04h
18 05 ME2 .equ 05h
19
20 0120 WDTCTL .equ 0120h
21 80 WDTHold .equ 80h
22 5a00 WDT_wrkey .equ 05A00h
23
24 08 GIE .equ 08h
25
26;**************************************************************************
27; ; Reset : Initialize processor
28;**************************************************************************
29 0240 .sect MAIN ,RAM_orig
30 0240 RESET
31 0240 403103de MOV #SP_orig,SP ; initialize stackpointer
32 0244 40b25a800120 MOV # (WDTHold+WDT_wrkey) , &WDTCTL
; Stop Watchdog Timer
33
34 ;––– Clear Special Function Registers
35 024a 42f20000 MOV.B #08h,IE1 ; ! Monitor !
36 024e 43c20001 CLR.B IE2
37 0252 43c20002 CLR.B IFG1
38 0256 43c20003 CLR.B IFG2
39
40 025a +3fff JMP $ ; Endless Loop
No Errors, No Warnings
gs_stk1.lst
Figure 114. gs_stk1.asm