-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEven_Odd.ewp
More file actions
44 lines (22 loc) · 828 Bytes
/
Even_Odd.ewp
File metadata and controls
44 lines (22 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "msp430.h" ; #define controlled include file
ORG 0X3010
DW 0X2010
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
CLR.W R4
MOV.W 0X3010(R4),R5
MOV.W 0X3010(R4),R6
CLRC
RRC.W R5
JNC DOWN
MOV.W #0XFFFF,0X3020(R4)
JMP $
END