https://github.com/akkartik/mu/blob/main/102test.subx
1
2
3 == code
4
5
6
7
8 Entry:
9
10
11 68/push "error in check-ints-equal"/imm32
12 68/push 34/imm32
13 68/push 34/imm32
14
15 e8/call check-ints-equal/disp32
16
17 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
18
19 bb/copy-to-ebx 0/imm32
20 e8/call syscall_exit/disp32
21
22
23 check-ints-equal:
24
25 55/push-ebp
26 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
27
28 50/push-eax
29 51/push-ecx
30 53/push-ebx
31
32 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 .
33 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 3/r32/ebx 0xc/disp8 .
34
35 39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . .
36 75/jump-if-unequal $check-ints-equal:else/disp8
37
38
39 68/push "."/imm32
40 68/push 2/imm32/stderr
41
42 e8/call _write/disp32
43
44 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
45
46 eb/jump $check-ints-equal:end/disp8
47
48 $check-ints-equal:else:
49
50
51 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
52 51/push-ecx
53 68/push 2/imm32/stderr
54
55 e8/call _write/disp32
56
57 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
58
59
60 68/push Newline/imm32
61 68/push 2/imm32/stderr
62
63 e8/call _write/disp32
64
65 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
66
67 ff 0/subop/increment 0/mod/indirect 5/rm32/.disp32 . . . Num-test-failures/disp32
68 $check-ints-equal:end:
69
70 5b/pop-to-ebx
71 59/pop-to-ecx
72 58/pop-to-eax
73
74 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
75 5d/pop-to-ebp
76 c3/return
77
78 == data
79
80
81
82 Newline:
83
84 1/imm32
85
86 0a/newline
87
88
89 Num-test-failures:
90 0/imm32
91
92
93 Space:
94
95 1/imm32
96
97 20/space
98
99
100 Slash:
101
102 1/imm32
103
104 2f/slash
105
106