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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [13_bcdcnv.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 $1, %bx
5
movw $0, %cx
6
movw $144, %sp
7
 
8
# aaa
9
movw $0x000a, %ax
10
aaa                # (1) adjusted
11
movw %ax, (0)
12
pushf
13
 
14
movw $0xfff9, %ax
15
aaa                # (2) adjusted by AF
16
movw %ax, (2)
17
pushf
18
 
19
push %bx
20
popf
21
movw $0xfff9, %ax
22
aaa                # (3) not adjusted
23
movw %ax, (4)
24
pushf
25
 
26
movw $0x5d50, %ax
27
aaa                # (4) aaa random
28
movw %ax, (6)
29
pushf
30
 
31
movw $0x4726, %ax
32
aaa                # (5) aaa random
33
movw %ax, (8)
34
pushf
35
 
36
# aas
37
movw $0x000a, %ax
38
aas                # (6) adjusted
39
movw %ax, (10)
40
pushf
41
 
42
movw $0xfff9, %ax
43
aas                # (7) adjusted by AF
44
movw %ax, (12)
45
pushf
46
 
47
push %bx
48
popf
49
movw $0xfff9, %ax
50
aas                # (8) not adjusted
51
movw %ax, (14)
52
pushf
53
 
54
movw $0xdcc0, %ax
55
aas                # (9) aas random
56
movw %ax, (16)
57
pushf
58
 
59
movw $0x5ffb, %ax
60
aas                # (10) aas random
61
movw %ax, (18)
62
pushf
63
 
64
# daa
65
movw $0x00ac, %ax
66
daa                # (11) daa, adj 1st & 3rd cond
67
movw %ax, (20)
68
pushf
69
 
70
movw $0xfff9, %ax
71
daa
72
movw %ax, (22)     # (12) daa, adj 2nd & 3rd cond
73
pushf
74
 
75
push %bx
76
popf               # carry set
77
movw $0xfff8, %ax
78
daa                # (13) daa, adj 4th cond
79
movw %ax, (24)
80
pushf
81
 
82
push %cx
83
popf               # zero flags
84
movw $0xff8b, %ax
85
daa                # (14) daa, adj 1st cond
86
movw %ax, (26)
87
pushf
88
 
89
push %cx
90
popf
91
movw $0x0082, %ax
92
daa                # (15) daa, not adjusted
93
movw %ax, (28)
94
pushf
95
 
96
movw $cd3c, %ax
97
daa                # (16) daa, random
98
movw %ax, (30)
99
pushf
100
 
101
movw $0x3f00, %ax
102
daa                # (17) daa, random
103
movw %ax, (32)
104
pushf
105
 
106
# das
107
movw $0x00ac, %ax
108
das                # (18) das, adj 1st & 3rd cond
109
movw %ax, (34)
110
pushf
111
 
112
movw $0xfff9, %ax
113
das
114
movw %ax, (36)     # (19) das, adj 2nd & 3rd cond
115
pushf
116
 
117
push %bx
118
popf               # carry set
119
movw $0xfff8, %ax
120
das                # (20) das, adj 4th cond
121
movw %ax, (38)
122
pushf
123
 
124
push %cx
125
popf               # zero flags
126
movw $0xff8b, %ax
127
das                # (21) das, adj 1st cond
128
movw %ax, (40)
129
pushf
130
 
131
push %cx
132
popf
133
movw $0x0082, %ax
134
das                # (22) das, not adjusted
135
movw %ax, (42)
136
pushf
137
 
138
movw $0x059a, %ax
139
das                # (23) das, random
140
movw %ax, (44)
141
pushf
142
 
143
movw $0x54f6, %ax
144
das                # (24) das, random
145
movw %ax, (46)
146
pushf
147
 
148
# cbw
149
movw $0xff7f, %ax
150
cbw                # (25) cbw, positive
151
movw %ax, (48)
152
movw %dx, (50)
153
pushf
154
 
155
movw $0x0080, %ax
156
cbw                # (26) cbw, negative
157
movw %ax, (52)
158
movw %dx, (54)
159
pushf
160
 
161
movw $0xf1ed, %ax
162
cbw                # (27) cbw, random
163
movw %ax, (56)
164
movw %dx, (58)
165
pushf
166
 
167
# cwd
168
movw $0x8000, %ax
169
cwd                # (28) cwd, negative
170
movw %ax, (60)
171
movw %dx, (62)
172
pushf
173
 
174
movw $0x7fff, %ax
175
cwd                # (29) cwd, positive
176
movw %ax, (64)
177
movw %dx, (66)
178
pushf
179
 
180
movw $0x43f1, %ax
181
cwd                # (30) cwd, random
182
movw %ax, (68)
183
movw %dx, (70)
184
pushf
185
 
186
hlt
187
 
188
.org 65520
189
jmp start
190
 
191
.org 65535
192
.byte 0xff

powered by: WebSVN 2.1.0

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