aboutsummaryrefslogtreecommitdiff
path: root/ia32/arithmetic.sts
blob: c9b4bf827df19ffe243de09d0c8c2cf3d9b1d43b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
defasm +
; pop eax
# 58 ?'
; add [esp], eax
# 01 ?' # 04 ?' # 24 ?'
next

defasm -
; pop eax
# 58 ?'
; sub [esp], eax
# 29 ?' # 04 ?' # 24 ?'
next

defasm /
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; xor edx, edx
# 31 ?' # d2 ?'
; div ebx
# f7 ?' # f3 ?'
; push edx
# 52 ?'
; push eax
# 50 ?'
next

defasm =
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; cmp eax, ebx
# 39 ?' # d8 ?'
; sete al
# 0f ?' # 94 ?' # c0 ?'
; movzx eax, al
# 0f ?' # b6 ?' # c0 ?'
; push eax
# 50 ?'
next

defasm !=
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; cmp eax, ebx
# 39 ?' # d8 ?'
; sete al
# 0f ?' # 95 ?' # c0 ?'
; movzx eax, al
# 0f ?' # b6 ?' # c0 ?'
; push eax
# 50 ?'
next

defasm !=
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; cmp eax, ebx
# 39 ?' # d8 ?'
; sete al
# 0f ?' # 95 ?' # c0 ?'
; movzx eax, al
# 0f ?' # b6 ?' # c0 ?'
; push eax
# 50 ?'
next

defasm <
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; cmp eax, ebx
# 39 ?' # d8 ?'
; setb al
# 0f ?' # 92 ?' # c0 ?'
; movzx eax, al
# 0f ?' # b6 ?' # c0 ?'
; push eax
# 50 ?'
next

defasm >
; pop ebx
# 5b ?'
; pop eax
# 58 ?'
; cmp eax, ebx
# 39 ?' # d8 ?'
; seta al
# 0f ?' # 97 ?' # c0 ?'
; movzx eax, al
# 0f ?' # b6 ?' # c0 ?'
; push eax
# 50 ?'
next