OpenCores
URL https://opencores.org/ocsvn/zet86/zet86/trunk

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [14_add.s] - Blame information for rev 49

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 zeus
.code16
2
start:
3
 
4
movw $160, %sp
5
 
6
# add word tests
7
movw $0xffff, %ax
8
movw $0x0001, %bx
9
addw %ax, %bx        # (1) addw reg16, reg16
10
movw %ax, (0)
11
movw %bx, (2)
12
pushf
13
 
14
movw $0xffff, %dx
15
movw $0xffff, (4)
16
addw %dx, (4)        # (2) addw reg16, mem16
17
movw %dx, (6)
18
pushf
19
 
20
movw $0x0001, %cx
21
movw $0x0002, (8)
22
addw (8), %cx        # (3) addw mem16, reg16
23
movw %cx, (10)
24
pushf
25
 
26
movw $0x0001, %ax
27
addw $0x7fff, %ax    # (4) addw imm16, ac16
28
movw %ax, (12)
29
pushf
30
 
31
movw $0x8000, %bp
32
.byte 0x83,0xc5,0xff # (5) addw imm8, reg16
33
movw %bp, (14)
34
pushf
35
 
36
movw $0xc783, %si
37
addw $0xeb2a, %si    # (6) addw imm16, reg16
38
movw %si, (16)
39
pushf
40
 
41
movw $0x8960, (18)
42
addw $0x0a95, (18)   # (7) addw imm16, mem16
43
pushf
44
 
45
movw $0xf1e1, (20)
46
.word 0x0683, 0x0014 # (8) addw imm8, mem16
47
.byte 0x64
48
pushf
49
 
50
# add byte tests
51
movb $0x01, (22)
52
addb $0xff, (22)     # (9) addb imm8, mem8
53
pushf
54
 
55
movb $0xff, %dh
56
addb $0xff, %dh      # (10) addb imm8, reg8
57
movw %dx, (23)
58
pushf
59
 
60
movb $0x01, %al
61
addb $0x02, %al      # (11) addb imm8, acum8
62
movw %ax, (25)
63
pushf
64
 
65
movb $0x7f, (27)
66
movb $0x01, %ch
67
addb (27), %ch       # (12) addb mem8, reg8
68
movw %cx, (28)
69
pushf
70
 
71
movb $0x80, %bl
72
movb $0xff, (30)
73
addb %bl, (30)       # (13) addb reg8, mem8
74
movw %bx, (31)
75
pushf
76
 
77
movb $0xa6, %al
78
movb $0x86, %ah
79
addb %al, %ah        # (14) addb reg8, reg8
80
movw %ax, (33)
81
pushf
82
 
83
# adc word tests
84
movw $0xffff, %ax
85
movw $0x0001, %bx
86
adcw %ax, %bx        # (15) adcw reg16, reg16
87
movw %ax, (35)
88
movw %bx, (37)
89
pushf
90
 
91
movw $0xffff, %dx
92
movw $0xffff, (39)
93
adcw %dx, (39)       # (16) adcw reg16, mem16
94
movw %dx, (41)
95
pushf
96
 
97
movw $0x0001, %cx
98
movw $0x0002, (43)
99
adcw (43), %cx       # (17) adcw mem16, reg16
100
movw %cx, (45)
101
pushf
102
 
103
movw $0x0001, %ax
104
adcw $0x7fff, %ax    # (18) adcw imm16, ac16
105
movw %ax, (47)
106
pushf
107
 
108
movw $0x8000, %bp
109
.byte 0x83,0xd5,0xff # (19) adcw imm8, reg16
110
movw %bp, (49)
111
pushf
112
 
113
movw $0x77d3, %si
114
adcw $0x8425, %si    # (20) adcw imm16, reg16
115
movw %si, (51)
116
pushf
117
 
118
movw $0xeba0, (53)
119
adcw $0xd3c1, (53)   # (21) adcw imm16, mem16
120
pushf
121
 
122
movw $0x7f50, (55)
123
.word 0x1683, 0x0037
124
.byte 0xf5
125
pushf
126
 
127
# adc byte tests
128
movb $0x01, (57)
129
adcb $0xff, (57)
130
pushf
131
 
132
movb $0xff, %dh
133
adcb $0xff, %dh
134
movw %dx, (58)
135
pushf
136
 
137
movb $0x01, %al
138
adcb $0x02, %al
139
movw %ax, (60)
140
pushf
141
 
142
movb $0x7f, (62)
143
movb $0x01, %ch
144
adcb (62), %ch
145
movw %cx, (63)
146
pushf
147
 
148
movb $0x80, %bl
149
movb $0xff, (65)
150
adcb %bl, (65)
151
movw %bx, (66)
152
pushf
153
 
154
movb $0xb9, %al
155
movb $0xd3, %ah
156
adcb %al, %ah
157
movw %ax, (68)
158
pushf
159
 
160
# inc word tests
161
movw $0xffff, %di
162
incw %di
163
movw %di, (70)
164
pushf
165
 
166
movw $0x7fff, %bp
167
.byte 0xff, 0xc5
168
movw %bp, (72)
169
pushf
170
 
171
movw $0x7412, (74)
172
incw (74)
173
pushf
174
 
175
# inc byte tests
176
movb $0x7f, %dl
177
incb %dl
178
movw %dx, (76)
179
pushf
180
 
181
movb $0xff, (77)
182
incb (77)
183
pushf
184
 
185
movb $0xb5, (78)
186
incb (78)
187
pushf
188
hlt
189
 
190
.org 65520
191
jmp start
192
.org 65535
193
.byte 0xff

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.