-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4.4.4.ASM
73 lines (47 loc) · 833 Bytes
/
4.4.4.ASM
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ORG 0000H
; first
MOV DPTR,#9001H
MOVX A,@DPTR
MOV R0,A
INC DPTR
MOVX A,@DPTR
MOV R1,A
INC DPTR
MOVX A,@DPTR
MOV R2,A
INC DPTR
MOVX A,@DPTR
MOV R3,A
;last
MOV DPTR,#9011H
MOVX A,@DPTR
MOV R4,A
INC DPTR
MOVX A,@DPTR
MOV R5,A
INC DPTR
MOVX A,@DPTR
MOV R6,A
INC DPTR
MOVX A,@DPTR
MOV R7,A
; DPTR SUM
MOV DPTR,#9024H
MOV A,R3
ADDC A,R7
MOVX @DPTR,A
MOV DPTR,#9023H
MOV A,R2
ADDC A,R6
MOVX @DPTR,A
MOV DPTR,#9022H
MOV A,R1
ADDC A,R5
MOVX @DPTR,A
MOV DPTR,#9021H
MOV A,R0
ADDC A,R4
MOVX @DPTR,A
MOV DPTR,#9020H
JMP $
END