URL
https://opencores.org/ocsvn/zet86/zet86/trunk
[/] [zet86/] [trunk/] [tests/] [13_bcdcnv.s] - Diff between revs 39 and 49
Only display areas with differences |
Details |
Blame |
View Log
Rev 39 |
Rev 49 |
.code16
|
.code16
|
start:
|
start:
|
|
|
movw $1, %bx
|
movw $1, %bx
|
movw $0, %cx
|
movw $0, %cx
|
movw $144, %sp
|
movw $144, %sp
|
|
|
# aaa
|
# aaa
|
movw $0x000a, %ax
|
movw $0x000a, %ax
|
aaa # (1) adjusted
|
aaa # (1) adjusted
|
movw %ax, (0)
|
movw %ax, (0)
|
pushf
|
pushf
|
|
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
aaa # (2) adjusted by AF
|
aaa # (2) adjusted by AF
|
movw %ax, (2)
|
movw %ax, (2)
|
pushf
|
pushf
|
|
|
push %bx
|
push %bx
|
popf
|
popf
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
aaa # (3) not adjusted
|
aaa # (3) not adjusted
|
movw %ax, (4)
|
movw %ax, (4)
|
pushf
|
pushf
|
|
|
movw $0x5d50, %ax
|
movw $0x5d50, %ax
|
aaa # (4) aaa random
|
aaa # (4) aaa random
|
movw %ax, (6)
|
movw %ax, (6)
|
pushf
|
pushf
|
|
|
movw $0x4726, %ax
|
movw $0x4726, %ax
|
aaa # (5) aaa random
|
aaa # (5) aaa random
|
movw %ax, (8)
|
movw %ax, (8)
|
pushf
|
pushf
|
|
|
# aas
|
# aas
|
movw $0x000a, %ax
|
movw $0x000a, %ax
|
aas # (6) adjusted
|
aas # (6) adjusted
|
movw %ax, (10)
|
movw %ax, (10)
|
pushf
|
pushf
|
|
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
aas # (7) adjusted by AF
|
aas # (7) adjusted by AF
|
movw %ax, (12)
|
movw %ax, (12)
|
pushf
|
pushf
|
|
|
push %bx
|
push %bx
|
popf
|
popf
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
aas # (8) not adjusted
|
aas # (8) not adjusted
|
movw %ax, (14)
|
movw %ax, (14)
|
pushf
|
pushf
|
|
|
movw $0xdcc0, %ax
|
movw $0xdcc0, %ax
|
aas # (9) aas random
|
aas # (9) aas random
|
movw %ax, (16)
|
movw %ax, (16)
|
pushf
|
pushf
|
|
|
movw $0x5ffb, %ax
|
movw $0x5ffb, %ax
|
aas # (10) aas random
|
aas # (10) aas random
|
movw %ax, (18)
|
movw %ax, (18)
|
pushf
|
pushf
|
|
|
# daa
|
# daa
|
movw $0x00ac, %ax
|
movw $0x00ac, %ax
|
daa # (11) daa, adj 1st & 3rd cond
|
daa # (11) daa, adj 1st & 3rd cond
|
movw %ax, (20)
|
movw %ax, (20)
|
pushf
|
pushf
|
|
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
daa
|
daa
|
movw %ax, (22) # (12) daa, adj 2nd & 3rd cond
|
movw %ax, (22) # (12) daa, adj 2nd & 3rd cond
|
pushf
|
pushf
|
|
|
push %bx
|
push %bx
|
popf # carry set
|
popf # carry set
|
movw $0xfff8, %ax
|
movw $0xfff8, %ax
|
daa # (13) daa, adj 4th cond
|
daa # (13) daa, adj 4th cond
|
movw %ax, (24)
|
movw %ax, (24)
|
pushf
|
pushf
|
|
|
push %cx
|
push %cx
|
popf # zero flags
|
popf # zero flags
|
movw $0xff8b, %ax
|
movw $0xff8b, %ax
|
daa # (14) daa, adj 1st cond
|
daa # (14) daa, adj 1st cond
|
movw %ax, (26)
|
movw %ax, (26)
|
pushf
|
pushf
|
|
|
push %cx
|
push %cx
|
popf
|
popf
|
movw $0x0082, %ax
|
movw $0x0082, %ax
|
daa # (15) daa, not adjusted
|
daa # (15) daa, not adjusted
|
movw %ax, (28)
|
movw %ax, (28)
|
pushf
|
pushf
|
|
|
movw $cd3c, %ax
|
movw $cd3c, %ax
|
daa # (16) daa, random
|
daa # (16) daa, random
|
movw %ax, (30)
|
movw %ax, (30)
|
pushf
|
pushf
|
|
|
movw $0x3f00, %ax
|
movw $0x3f00, %ax
|
daa # (17) daa, random
|
daa # (17) daa, random
|
movw %ax, (32)
|
movw %ax, (32)
|
pushf
|
pushf
|
|
|
# das
|
# das
|
movw $0x00ac, %ax
|
movw $0x00ac, %ax
|
das # (18) das, adj 1st & 3rd cond
|
das # (18) das, adj 1st & 3rd cond
|
movw %ax, (34)
|
movw %ax, (34)
|
pushf
|
pushf
|
|
|
movw $0xfff9, %ax
|
movw $0xfff9, %ax
|
das
|
das
|
movw %ax, (36) # (19) das, adj 2nd & 3rd cond
|
movw %ax, (36) # (19) das, adj 2nd & 3rd cond
|
pushf
|
pushf
|
|
|
push %bx
|
push %bx
|
popf # carry set
|
popf # carry set
|
movw $0xfff8, %ax
|
movw $0xfff8, %ax
|
das # (20) das, adj 4th cond
|
das # (20) das, adj 4th cond
|
movw %ax, (38)
|
movw %ax, (38)
|
pushf
|
pushf
|
|
|
push %cx
|
push %cx
|
popf # zero flags
|
popf # zero flags
|
movw $0xff8b, %ax
|
movw $0xff8b, %ax
|
das # (21) das, adj 1st cond
|
das # (21) das, adj 1st cond
|
movw %ax, (40)
|
movw %ax, (40)
|
pushf
|
pushf
|
|
|
push %cx
|
push %cx
|
popf
|
popf
|
movw $0x0082, %ax
|
movw $0x0082, %ax
|
das # (22) das, not adjusted
|
das # (22) das, not adjusted
|
movw %ax, (42)
|
movw %ax, (42)
|
pushf
|
pushf
|
|
|
movw $0x059a, %ax
|
movw $0x059a, %ax
|
das # (23) das, random
|
das # (23) das, random
|
movw %ax, (44)
|
movw %ax, (44)
|
pushf
|
pushf
|
|
|
movw $0x54f6, %ax
|
movw $0x54f6, %ax
|
das # (24) das, random
|
das # (24) das, random
|
movw %ax, (46)
|
movw %ax, (46)
|
pushf
|
pushf
|
|
|
# cbw
|
# cbw
|
movw $0xff7f, %ax
|
movw $0xff7f, %ax
|
cbw # (25) cbw, positive
|
cbw # (25) cbw, positive
|
movw %ax, (48)
|
movw %ax, (48)
|
movw %dx, (50)
|
movw %dx, (50)
|
pushf
|
pushf
|
|
|
movw $0x0080, %ax
|
movw $0x0080, %ax
|
cbw # (26) cbw, negative
|
cbw # (26) cbw, negative
|
movw %ax, (52)
|
movw %ax, (52)
|
movw %dx, (54)
|
movw %dx, (54)
|
pushf
|
pushf
|
|
|
movw $0xf1ed, %ax
|
movw $0xf1ed, %ax
|
cbw # (27) cbw, random
|
cbw # (27) cbw, random
|
movw %ax, (56)
|
movw %ax, (56)
|
movw %dx, (58)
|
movw %dx, (58)
|
pushf
|
pushf
|
|
|
# cwd
|
# cwd
|
movw $0x8000, %ax
|
movw $0x8000, %ax
|
cwd # (28) cwd, negative
|
cwd # (28) cwd, negative
|
movw %ax, (60)
|
movw %ax, (60)
|
movw %dx, (62)
|
movw %dx, (62)
|
pushf
|
pushf
|
|
|
movw $0x7fff, %ax
|
movw $0x7fff, %ax
|
cwd # (29) cwd, positive
|
cwd # (29) cwd, positive
|
movw %ax, (64)
|
movw %ax, (64)
|
movw %dx, (66)
|
movw %dx, (66)
|
pushf
|
pushf
|
|
|
movw $0x43f1, %ax
|
movw $0x43f1, %ax
|
cwd # (30) cwd, random
|
cwd # (30) cwd, random
|
movw %ax, (68)
|
movw %ax, (68)
|
movw %dx, (70)
|
movw %dx, (70)
|
pushf
|
pushf
|
|
|
hlt
|
hlt
|
|
|
.org 65520
|
.org 65520
|
jmp start
|
jmp start
|
|
|
.org 65535
|
.org 65535
|
.byte 0xff
|
.byte 0xff
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.