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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [tests/] [16_cmpneg.s] - Blame information for rev 54

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 $96, %sp
5
 
6
# cmp word tests
7
movw $0x0001, %ax
8
movw $0x0002, %bx
9
cmpw %bx, %ax
10
movw %ax, (0)
11
movw %bx, (2)
12
pushf
13
 
14
movw $0xffff, %dx
15
movw $0xffff, (4)
16
cmpw %dx, (4)
17
movw %dx, (6)
18
pushf
19
 
20
movw $0xffff, %cx
21
movw $0x0001, (8)
22
cmpw (8), %cx
23
movw %cx, (10)
24
pushf
25
 
26
movw $0x8000, %ax
27
cmpw $0x0001, %ax
28
movw %ax, (12)
29
pushf
30
 
31
movw $0x8000, %bp
32
.byte 0x83,0xfd,0xff
33
movw %bp, (14)
34
pushf
35
 
36
movw $0x7f81, %si
37
cmpw $0x903c, %si
38
movw %si, (16)
39
pushf
40
 
41
movw $0xefc3, (18)
42
cmpw $0xc664, (18)
43
pushf
44
 
45
movw $0xe933, (20)
46
.word 0x3e83, 0x0014
47
.byte 0x64
48
pushf
49
 
50
# cmp byte tests
51
movb $0x01, (22)
52
cmpb $0x02, (22)
53
pushf
54
 
55
movb $0xff, %dh
56
cmpb $0xff, %dh
57
movw %dx, (23)
58
pushf
59
 
60
movb $0xff, %al
61
cmpb $0x01, %al
62
movw %ax, (25)
63
pushf
64
 
65
movb $0x80, (27)
66
movb $0x01, %ch
67
cmpb (27), %ch
68
movw %cx, (28)
69
pushf
70
 
71
movb $0x80, %bl
72
movb $0x7f, (30)
73
cmpb %bl, (30)
74
movw %bx, (31)
75
pushf
76
 
77
movb $0xbc, %al
78
movb $0x8e, %ah
79
cmpb %al, %ah
80
movw %ax, (33)
81
pushf
82
 
83
# neg word tests
84
movw $0x0, %cx
85
negw %cx
86
movw %cx, (34)
87
pushf
88
 
89
movw $0x7fff, (36)
90
negw (36)
91
pushf
92
 
93
movw $0x8000, %bp
94
negw %bp
95
movw %bp, (38)
96
pushf
97
 
98
movw $0xace9, (40)
99
negw (40)
100
pushf
101
 
102
# neg byte tests
103
movb $0x0, %ah
104
negb %ah
105
movw %ax, (42)
106
pushf
107
 
108
movb $0x7f, (44)
109
negb (44)
110
pushf
111
 
112
movb $0xc9, %cl
113
negb %cl
114
movw %cx, (45)
115
pushf
116
 
117
movb $0x80, (47)
118
negb (47)
119
pushf
120
hlt
121
 
122
.org 65520
123
jmp start
124
.org 65535
125
.byte 0xff
126
 

powered by: WebSVN 2.1.0

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