aboutsummaryrefslogtreecommitdiff
path: root/ia32/math.sts
blob: 1864a93c32a486e0f189d267b91ec89f304fefa9 (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
defasm +
    # 58 ?'                    ; pop eax
    # 01 ?' # 04 ?' # 24 ?'    ; add [esp], eax
next

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

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

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

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

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

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

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