https://github.com/akkartik/mu/blob/master/subx/apps/subx-common.subx
1
2
3 == code
4
5
6
7
8
9
10
11
12
13 write-stream-data:
14
15 55/push-EBP
16 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
17
18 50/push-EAX
19 51/push-ECX
20 56/push-ESI
21
22 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
23
24
25 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
26 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX . 0/r32/EAX 0xc/disp8 .
27 50/push-EAX
28
29 8d/copy-address 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 0xc/disp8 .
30 50/push-EAX
31
32 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
33
34
35 51/push-ECX
36 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
37
38 e8/call write-slice/disp32
39
40 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
41 $write-stream-data:end:
42
43 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
44
45 5e/pop-to-ESI
46 59/pop-to-ECX
47 58/pop-to-EAX
48
49 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
50 5d/pop-to-EBP
51 c3/return
52
53 test-write-stream-data:
54
55 55/push-EBP
56 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
57
58
59
60 68/push _test-output-stream/imm32
61
62 e8/call clear-stream/disp32
63
64 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
65
66
67 b8/copy-to-EAX _test-output-buffered-file/imm32
68 05/add-to-EAX 4/imm32
69 50/push-EAX
70
71 e8/call clear-stream/disp32
72
73 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
74
75
76 68/push _test-input-stream/imm32
77
78 e8/call clear-stream/disp32
79
80 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
81
82
83
84 68/push "abcd"/imm32
85 68/push _test-input-stream/imm32
86
87 e8/call write/disp32
88
89 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
90
91
92 68/push _test-input-stream/imm32
93 68/push _test-output-buffered-file/imm32
94
95 e8/call write-stream-data/disp32
96
97 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
98
99
100
101 68/push _test-output-buffered-file/imm32
102
103 e8/call flush/disp32
104
105 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
106
107
108 68/push "F - test-write-stream-data"/imm32
109 68/push "abcd"/imm32
110 68/push _test-output-stream/imm32
111
112 e8/call check-stream-equal/disp32
113
114 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
115
116 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
117 5d/pop-to-EBP
118 c3/return
119
120 == data
121
122 _test-input-stream:
123
124 0/imm32
125
126 0/imm32
127
128 0x100/imm32
129
130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
131 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
132 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
133 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
134 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
135 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
136 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
137 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
138 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
139 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
141 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
142 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
143 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
144 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
145 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
146
147
148 _test-input-buffered-file:
149
150 _test-input-stream/imm32
151
152 0/imm32
153
154 0/imm32
155
156 6/imm32
157
158 00 00 00 00 00 00
159
160 _test-output-stream:
161
162 0/imm32
163
164 0/imm32
165
166 0x100/imm32
167
168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
169 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
171 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
172 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
173 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
174 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
175 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
176 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
177 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
178 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
179 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
181 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
182 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
183 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
184
185
186 _test-output-buffered-file:
187
188 _test-output-stream/imm32
189
190 0/imm32
191
192 0/imm32
193
194 6/imm32
195
196 00 00 00 00 00 00
197
198