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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [17_mul.s] - Blame information for rev 55

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 $192, %sp
5
 
6
# mul word
7
movw $0x0003, %bx
8
movw $0x0007, %ax
9
movw $0xffff, %dx
10
mulw %bx
11
 
12
movw %ax, (0)
13
movw %dx, (2)
14
pushf
15
 
16
movw $0xa320, %dx
17
movw $0xffff, %ax
18
mulw %dx
19
movw %ax, (4)
20
movw %dx, (6)
21
pushf
22
 
23
movw $0xffff, %ax
24
movw $0x1, (8)
25
mulw (8)
26
movw %ax, (10)
27
movw %dx, (12)
28
pushf
29
 
30
movw $0xffff, %ax
31
movw $0xffff, (14)
32
mulw (14)
33
movw %ax, (16)
34
movw %dx, (18)
35
pushf
36
 
37
movw $0x46db, %ax
38
movw $0x0000, %bp
39
mulw %bp
40
movw %bp, (20)
41
movw %ax, (22)
42
movw %dx, (24)
43
pushf
44
 
45
movw $0x46db, %ax
46
movw $0xeeeb, %si
47
mulw %si
48
movw %si, (26)
49
movw %ax, (28)
50
movw %dx, (30)
51
pushf
52
 
53
# mul byte
54
movb $0x14, %bl
55
movw $0xff07, %ax
56
movw $0xffff, %dx
57
mulb %bl
58
 
59
movw %ax, (32)
60
movw %dx, (34)
61
pushf
62
 
63
movb $0x24, %ch
64
movw $0x00ff, %ax
65
mulb %ch
66
movw %ax, (36)
67
movw %dx, (38)
68
pushf
69
 
70
movw $0xff, %ax
71
movb $0x1, (40)
72
mulb (40)
73
movw %ax, (41)
74
movw %dx, (43)
75
pushf
76
 
77
movw $0xffff, %ax
78
movb $0xff, (45)
79
mulb (45)
80
movw %ax, (46)
81
movw %dx, (46)
82
pushf
83
 
84
movw $0xc5, %ax
85
movw $0x00, %dx
86
mulb %dl
87
movw %dx, (48)
88
movw %ax, (50)
89
pushf
90
 
91
movb $0xb5, %al
92
movb $0xf9, %dh
93
mulb %dh
94
movw %si, (52)
95
movw %ax, (54)
96
movw %dx, (56)
97
pushf
98
 
99
# imul word
100
movw $0x0003, %bx
101
movw $0x0007, %ax
102
movw $0xffff, %dx
103
imulw %bx
104
 
105
movw %ax, (60)
106
movw %dx, (62)
107
pushf
108
 
109
movw $0xa320, %dx
110
movw $0xffff, %ax
111
imulw %dx
112
movw %ax, (64)
113
movw %dx, (66)
114
pushf
115
 
116
movw $0xffff, %ax
117
movw $0x1, (68)
118
imulw (68)
119
movw %ax, (70)
120
movw %dx, (72)
121
pushf
122
 
123
movw $0xffff, %ax
124
movw $0xffff, (74)
125
imulw (74)
126
movw %ax, (76)
127
movw %dx, (78)
128
pushf
129
 
130
movw $0x46db, %ax
131
movw $0x0000, %bp
132
imulw %bp
133
movw %bp, (80)
134
movw %ax, (82)
135
movw %dx, (84)
136
pushf
137
 
138
movw $0x46db, %ax
139
movw $0xeeeb, %si
140
imulw %si
141
movw %si, (86)
142
movw %ax, (88)
143
movw %dx, (90)
144
pushf
145
 
146
# imul byte
147
movb $0x14, %bl
148
movw $0xff07, %ax
149
movw $0xffff, %dx
150
imulb %bl
151
 
152
movw %ax, (92)
153
movw %dx, (94)
154
pushf
155
 
156
movb $0x24, %ch
157
movw $0x00ff, %ax
158
imulb %ch
159
movw %ax, (96)
160
movw %dx, (98)
161
pushf
162
 
163
movw $0xff, %ax
164
movb $0x1, (100)
165
imulb (100)
166
movw %ax, (101)
167
movw %dx, (103)
168
pushf
169
 
170
movw $0xffff, %ax
171
movb $0xff, (105)
172
imulb (105)
173
movw %ax, (106)
174
movw %dx, (106)
175
pushf
176
 
177
movw $0xc5, %ax
178
movw $0x00, %dx
179
imulb %dl
180
movw %dx, (108)
181
movw %ax, (110)
182
pushf
183
 
184
movb $0xb5, %al
185
movb $0xf9, %dh
186
imulb %dh
187
movw %si, (112)
188
movw %ax, (114)
189
movw %dx, (116)
190
pushf
191
 
192
# aad tests
193
movw $0xff00, %ax
194
aad
195
movw %ax, (118)
196
pushf
197
 
198
movw $0xffff, %ax
199
aad $0x12
200
movw %ax, (120)
201
pushf
202
 
203
movw $0x00ff, %ax
204
aad $0xff
205
movw %ax, (122)
206
pushf
207
 
208
movw $0x532d, %ax
209
aad $0x39
210
movw %ax, (124)
211
pushf
212
 
213
hlt
214
 
215
.org 65520
216
jmp start
217
 
218
.org 65535
219
.byte 0xff

powered by: WebSVN 2.1.0

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