URL
https://opencores.org/ocsvn/zet86/zet86/trunk
[/] [zet86/] [trunk/] [tests/] [16_cmpneg.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 $96, %sp
|
movw $96, %sp
|
|
|
# cmp word tests
|
# cmp word tests
|
movw $0x0001, %ax
|
movw $0x0001, %ax
|
movw $0x0002, %bx
|
movw $0x0002, %bx
|
cmpw %bx, %ax
|
cmpw %bx, %ax
|
movw %ax, (0)
|
movw %ax, (0)
|
movw %bx, (2)
|
movw %bx, (2)
|
pushf
|
pushf
|
|
|
movw $0xffff, %dx
|
movw $0xffff, %dx
|
movw $0xffff, (4)
|
movw $0xffff, (4)
|
cmpw %dx, (4)
|
cmpw %dx, (4)
|
movw %dx, (6)
|
movw %dx, (6)
|
pushf
|
pushf
|
|
|
movw $0xffff, %cx
|
movw $0xffff, %cx
|
movw $0x0001, (8)
|
movw $0x0001, (8)
|
cmpw (8), %cx
|
cmpw (8), %cx
|
movw %cx, (10)
|
movw %cx, (10)
|
pushf
|
pushf
|
|
|
movw $0x8000, %ax
|
movw $0x8000, %ax
|
cmpw $0x0001, %ax
|
cmpw $0x0001, %ax
|
movw %ax, (12)
|
movw %ax, (12)
|
pushf
|
pushf
|
|
|
movw $0x8000, %bp
|
movw $0x8000, %bp
|
.byte 0x83,0xfd,0xff
|
.byte 0x83,0xfd,0xff
|
movw %bp, (14)
|
movw %bp, (14)
|
pushf
|
pushf
|
|
|
movw $0x7f81, %si
|
movw $0x7f81, %si
|
cmpw $0x903c, %si
|
cmpw $0x903c, %si
|
movw %si, (16)
|
movw %si, (16)
|
pushf
|
pushf
|
|
|
movw $0xefc3, (18)
|
movw $0xefc3, (18)
|
cmpw $0xc664, (18)
|
cmpw $0xc664, (18)
|
pushf
|
pushf
|
|
|
movw $0xe933, (20)
|
movw $0xe933, (20)
|
.word 0x3e83, 0x0014
|
.word 0x3e83, 0x0014
|
.byte 0x64
|
.byte 0x64
|
pushf
|
pushf
|
|
|
# cmp byte tests
|
# cmp byte tests
|
movb $0x01, (22)
|
movb $0x01, (22)
|
cmpb $0x02, (22)
|
cmpb $0x02, (22)
|
pushf
|
pushf
|
|
|
movb $0xff, %dh
|
movb $0xff, %dh
|
cmpb $0xff, %dh
|
cmpb $0xff, %dh
|
movw %dx, (23)
|
movw %dx, (23)
|
pushf
|
pushf
|
|
|
movb $0xff, %al
|
movb $0xff, %al
|
cmpb $0x01, %al
|
cmpb $0x01, %al
|
movw %ax, (25)
|
movw %ax, (25)
|
pushf
|
pushf
|
|
|
movb $0x80, (27)
|
movb $0x80, (27)
|
movb $0x01, %ch
|
movb $0x01, %ch
|
cmpb (27), %ch
|
cmpb (27), %ch
|
movw %cx, (28)
|
movw %cx, (28)
|
pushf
|
pushf
|
|
|
movb $0x80, %bl
|
movb $0x80, %bl
|
movb $0x7f, (30)
|
movb $0x7f, (30)
|
cmpb %bl, (30)
|
cmpb %bl, (30)
|
movw %bx, (31)
|
movw %bx, (31)
|
pushf
|
pushf
|
|
|
movb $0xbc, %al
|
movb $0xbc, %al
|
movb $0x8e, %ah
|
movb $0x8e, %ah
|
cmpb %al, %ah
|
cmpb %al, %ah
|
movw %ax, (33)
|
movw %ax, (33)
|
pushf
|
pushf
|
|
|
# neg word tests
|
# neg word tests
|
movw $0x0, %cx
|
movw $0x0, %cx
|
negw %cx
|
negw %cx
|
movw %cx, (34)
|
movw %cx, (34)
|
pushf
|
pushf
|
|
|
movw $0x7fff, (36)
|
movw $0x7fff, (36)
|
negw (36)
|
negw (36)
|
pushf
|
pushf
|
|
|
movw $0x8000, %bp
|
movw $0x8000, %bp
|
negw %bp
|
negw %bp
|
movw %bp, (38)
|
movw %bp, (38)
|
pushf
|
pushf
|
|
|
movw $0xace9, (40)
|
movw $0xace9, (40)
|
negw (40)
|
negw (40)
|
pushf
|
pushf
|
|
|
# neg byte tests
|
# neg byte tests
|
movb $0x0, %ah
|
movb $0x0, %ah
|
negb %ah
|
negb %ah
|
movw %ax, (42)
|
movw %ax, (42)
|
pushf
|
pushf
|
|
|
movb $0x7f, (44)
|
movb $0x7f, (44)
|
negb (44)
|
negb (44)
|
pushf
|
pushf
|
|
|
movb $0xc9, %cl
|
movb $0xc9, %cl
|
negb %cl
|
negb %cl
|
movw %cx, (45)
|
movw %cx, (45)
|
pushf
|
pushf
|
|
|
movb $0x80, (47)
|
movb $0x80, (47)
|
negb (47)
|
negb (47)
|
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.