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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [15_sub.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 $160, %sp
movw $160, %sp
 
 
# sub word tests
# sub word tests
movw $0x0001, %ax
movw $0x0001, %ax
movw $0x0002, %bx
movw $0x0002, %bx
subw %bx, %ax
subw %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)
subw %dx, (4)
subw %dx, (4)
movw %dx, (6)
movw %dx, (6)
pushf
pushf
 
 
movw $0xffff, %cx
movw $0xffff, %cx
movw $0x0001, (8)
movw $0x0001, (8)
subw (8), %cx
subw (8), %cx
movw %cx, (10)
movw %cx, (10)
pushf
pushf
 
 
movw $0x8000, %ax
movw $0x8000, %ax
subw $0x0001, %ax
subw $0x0001, %ax
movw %ax, (12)
movw %ax, (12)
pushf
pushf
 
 
movw $0x8000, %bp
movw $0x8000, %bp
.byte 0x83,0xed,0xff
.byte 0x83,0xed,0xff
movw %bp, (14)
movw %bp, (14)
pushf
pushf
 
 
movw $0x7f81, %si
movw $0x7f81, %si
subw $0x903c, %si
subw $0x903c, %si
movw %si, (16)
movw %si, (16)
pushf
pushf
 
 
movw $0xefc3, (18)
movw $0xefc3, (18)
subw $0xc664, (18)
subw $0xc664, (18)
pushf
pushf
 
 
movw $0xe933, (20)
movw $0xe933, (20)
.word 0x2e83, 0x0014
.word 0x2e83, 0x0014
.byte 0x64
.byte 0x64
pushf
pushf
 
 
# sub byte tests
# sub byte tests
movb $0x01, (22)
movb $0x01, (22)
subb $0x02, (22)
subb $0x02, (22)
pushf
pushf
 
 
movb $0xff, %dh
movb $0xff, %dh
subb $0xff, %dh
subb $0xff, %dh
movw %dx, (23)
movw %dx, (23)
pushf
pushf
 
 
movb $0xff, %al
movb $0xff, %al
subb $0x01, %al
subb $0x01, %al
movw %ax, (25)
movw %ax, (25)
pushf
pushf
 
 
movb $0x80, (27)
movb $0x80, (27)
movb $0x01, %ch
movb $0x01, %ch
subb (27), %ch
subb (27), %ch
movw %cx, (28)
movw %cx, (28)
pushf
pushf
 
 
movb $0x80, %bl
movb $0x80, %bl
movb $0x7f, (30)
movb $0x7f, (30)
subb %bl, (30)
subb %bl, (30)
movw %bx, (31)
movw %bx, (31)
pushf
pushf
 
 
movb $0xbc, %al
movb $0xbc, %al
movb $0x8e, %ah
movb $0x8e, %ah
subb %al, %ah
subb %al, %ah
movw %ax, (33)
movw %ax, (33)
pushf
pushf
 
 
# sbb word tests
# sbb word tests
movw $0x0001, %ax
movw $0x0001, %ax
movw $0x0002, %bx
movw $0x0002, %bx
sbbw %ax, %bx
sbbw %ax, %bx
movw %ax, (35)
movw %ax, (35)
movw %bx, (37)
movw %bx, (37)
pushf
pushf
 
 
movw $0xffff, %dx
movw $0xffff, %dx
movw $0xffff, (39)
movw $0xffff, (39)
sbbw %dx, (39)
sbbw %dx, (39)
movw %dx, (41)
movw %dx, (41)
pushf
pushf
 
 
movw $0xffff, %cx
movw $0xffff, %cx
movw $0x0001, (43)
movw $0x0001, (43)
sbbw (43), %cx
sbbw (43), %cx
movw %cx, (45)
movw %cx, (45)
pushf
pushf
 
 
movw $0x8000, %ax
movw $0x8000, %ax
sbbw $0x0001, %ax
sbbw $0x0001, %ax
movw %ax, (47)
movw %ax, (47)
pushf
pushf
 
 
movw $0x8000, %bp
movw $0x8000, %bp
.byte 0x83,0xdd,0xff
.byte 0x83,0xdd,0xff
movw %bp, (49)
movw %bp, (49)
pushf
pushf
 
 
movw $0x52c3, %si
movw $0x52c3, %si
sbbw $0xe248, %si
sbbw $0xe248, %si
movw %si, (51)
movw %si, (51)
pushf
pushf
 
 
movw $0xe74c, (53)
movw $0xe74c, (53)
sbbw $0x22c0, (53)
sbbw $0x22c0, (53)
pushf
pushf
 
 
movw $0xfd85, (55)
movw $0xfd85, (55)
.word 0x1e83, 0x0037
.word 0x1e83, 0x0037
.byte 0xf5
.byte 0xf5
pushf
pushf
 
 
# sbb byte tests
# sbb byte tests
movb $0x01, (57)
movb $0x01, (57)
sbbb $0x02, (57)
sbbb $0x02, (57)
pushf
pushf
 
 
movb $0xff, %dh
movb $0xff, %dh
sbbb $0xff, %dh
sbbb $0xff, %dh
movw %dx, (58)
movw %dx, (58)
pushf
pushf
 
 
movb $0xff, %al
movb $0xff, %al
sbbb $0x01, %al
sbbb $0x01, %al
movw %ax, (60)
movw %ax, (60)
pushf
pushf
 
 
movb $0x80, (62)
movb $0x80, (62)
movb $0x01, %ch
movb $0x01, %ch
sbbb (62), %ch
sbbb (62), %ch
movw %cx, (63)
movw %cx, (63)
pushf
pushf
 
 
movb $0x80, %bl
movb $0x80, %bl
movb $0xff, (65)
movb $0xff, (65)
sbbb %bl, (65)
sbbb %bl, (65)
movw %bx, (66)
movw %bx, (66)
pushf
pushf
 
 
movb $0xb9, %al
movb $0xb9, %al
movb $0xd3, %ah
movb $0xd3, %ah
sbbb %al, %ah
sbbb %al, %ah
movw %ax, (68)
movw %ax, (68)
pushf
pushf
 
 
# dec word tests
# dec word tests
movw $0x0000, %di
movw $0x0000, %di
decw %di
decw %di
movw %di, (70)
movw %di, (70)
pushf
pushf
 
 
movw $0x8000, %bp
movw $0x8000, %bp
.byte 0xff, 0xcd
.byte 0xff, 0xcd
movw %bp, (72)
movw %bp, (72)
pushf
pushf
 
 
movw $0x7412, (74)
movw $0x7412, (74)
decw (74)
decw (74)
pushf
pushf
 
 
# dec byte tests
# dec byte tests
movb $0x00, %dl
movb $0x00, %dl
decb %dl
decb %dl
movw %dx, (76)
movw %dx, (76)
pushf
pushf
 
 
movb $0x80, (77)
movb $0x80, (77)
decb (77)
decb (77)
pushf
pushf
 
 
movb $0xb5, (78)
movb $0xb5, (78)
decb (78)
decb (78)
pushf
pushf
hlt
hlt
 
 
.org 65520
.org 65520
jmp start
jmp start
.org 65535
.org 65535
.byte 0xff
.byte 0xff
 
 
 
 

powered by: WebSVN 2.1.0

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