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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [15_sub.s] - Blame information for rev 54

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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