https://github.com/akkartik/mu/blob/master/subx/072slice.subx
1
2
3
4 == code
5
6
7
8
9
10
11
12
13
14
15
16
17 slice-empty?:
18
19 55/push-EBP
20 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
21
22 51/push-ECX
23
24 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 8/disp8 .
25
26
27 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
28
29 39/compare 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
30 b8/copy-to-EAX 1/imm32/true
31 74/jump-if-equal $slice-empty?:end/disp8
32 b8/copy-to-EAX 0/imm32/false
33 $slice-empty?:end:
34
35 59/pop-to-ECX
36
37 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
38 5d/pop-to-EBP
39 c3/return
40
41 test-slice-empty-true:
42
43 55/push-EBP
44 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
45
46 68/push 34/imm32/end
47 68/push 34/imm32/start
48 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
49
50
51 51/push-ECX
52
53 e8/call slice-empty?/disp32
54
55 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
56
57
58 68/push "F - test-slice-empty-true"/imm32
59 68/push 1/imm32
60 50/push-EAX
61
62 e8/call check-ints-equal/disp32
63
64 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
65
66 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
67 5d/pop-to-EBP
68 c3/return
69
70 test-slice-empty-false:
71
72 55/push-EBP
73 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
74
75 68/push 23/imm32/end
76 68/push 34/imm32/start
77 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
78
79
80 51/push-ECX
81
82 e8/call slice-empty?/disp32
83
84 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
85
86
87 68/push "F - test-slice-empty-false"/imm32
88 68/push 0/imm32
89 50/push-EAX
90
91 e8/call check-ints-equal/disp32
92
93 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
94
95 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
96 5d/pop-to-EBP
97 c3/return
98
99 slice-equal?:
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119 55/push-EBP
120 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
121
122 51/push-ECX
123 52/push-EDX
124 53/push-EBX
125 56/push-ESI
126
127 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
128
129 8b/copy 0/mod/indirect 6/rm32/ESI . . . 2/r32/EDX . .
130
131 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 6/r32/ESI 4/disp8 .
132
133 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 3/r32/EBX 0xc/disp8 .
134
135 89/copy 3/mod/direct 0/rm32/EAX . . . 6/r32/ESI . .
136 29/subtract 3/mod/direct 0/rm32/EAX . . . 2/r32/EDX . .
137
138 39/compare 0/mod/indirect 3/rm32/EBX . . . 0/r32/EAX . .
139 75/jump-if-not-equal $slice-equal?:false/disp8
140
141 81 0/subop/add 3/mod/direct 3/rm32/EBX . . . . . 4/imm32
142
143 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
144 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . .
145 $slice-equal?:loop:
146
147 39/compare 3/mod/direct 2/rm32/EDX . . . 6/r32/ESI . .
148 7d/jump-if-greater-or-equal $slice-equal?:true/disp8
149
150 8a/copy-byte 0/mod/indirect 3/rm32/EBX . . . 0/r32/AL . .
151
152 8a/copy-byte 0/mod/indirect 2/rm32/EDX . . . 1/r32/CL . .
153
154 39/compare 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
155 75/jump-if-not-equal $slice-equal?:false/disp8
156
157 43/increment-EBX
158
159 42/increment-EDX
160 eb/jump $slice-equal?:loop/disp8
161 $slice-equal?:false:
162 b8/copy-to-EAX 0/imm32
163 eb/jump $slice-equal?:end/disp8
164 $slice-equal?:true:
165 b8/copy-to-EAX 1/imm32
166 $slice-equal?:end:
167
168 5e/pop-to-ESI
169 5b/pop-to-EBX
170 5a/pop-to-EDX
171 59/pop-to-ECX
172
173 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
174 5d/pop-to-EBP
175 c3/return
176
177 test-slice-equal:
178
179
180 55/push-EBP
181 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
182
183 68/push _test-slice-data-3/imm32/end
184 68/push _test-slice-data-0/imm32/start
185 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
186
187
188 68/push "Abc"/imm32
189 51/push-ECX
190
191 e8/call slice-equal?/disp32
192
193 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
194
195
196 68/push "F - test-slice-equal"/imm32
197 68/push 1/imm32
198 50/push-EAX
199
200 e8/call check-ints-equal/disp32
201
202 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
203
204 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
205 5d/pop-to-EBP
206 c3/return
207
208 test-slice-equal-false:
209
210
211 55/push-EBP
212 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
213
214 68/push _test-slice-data-4/imm32/end
215 68/push _test-slice-data-1/imm32/start
216 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
217
218
219 68/push "Abc"/imm32
220 51/push-ECX
221
222 e8/call slice-equal?/disp32
223
224 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
225
226
227 68/push "F - test-slice-equal-false"/imm32
228 68/push 0/imm32
229 50/push-EAX
230
231 e8/call check-ints-equal/disp32
232
233 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
234
235 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
236 5d/pop-to-EBP
237 c3/return
238
239 test-slice-equal-too-long:
240
241
242 55/push-EBP
243 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
244
245 68/push _test-slice-data-4/imm32/end
246 68/push _test-slice-data-0/imm32/start
247 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
248
249
250 68/push "Abc"/imm32
251 51/push-ECX
252
253 e8/call slice-equal?/disp32
254
255 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
256
257
258 68/push "F - test-slice-equal-too-long"/imm32
259 68/push 0/imm32
260 50/push-EAX
261
262 e8/call check-ints-equal/disp32
263
264 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
265
266 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
267 5d/pop-to-EBP
268 c3/return
269
270 test-slice-equal-too-short:
271
272
273 55/push-EBP
274 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
275
276 68/push _test-slice-data-1/imm32/end
277 68/push _test-slice-data-0/imm32/start
278 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
279
280
281 68/push "Abc"/imm32
282 51/push-ECX
283
284 e8/call slice-equal?/disp32
285
286 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
287
288
289 68/push "F - test-slice-equal-too-short"/imm32
290 68/push 0/imm32
291 50/push-EAX
292
293 e8/call check-ints-equal/disp32
294
295 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
296
297 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
298 5d/pop-to-EBP
299 c3/return
300
301 test-slice-equal-empty:
302
303
304 55/push-EBP
305 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
306
307 68/push _test-slice-data-0/imm32/end
308 68/push _test-slice-data-0/imm32/start
309 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
310
311
312 68/push "Abc"/imm32
313 51/push-ECX
314
315 e8/call slice-equal?/disp32
316
317 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
318
319
320 68/push "F - test-slice-equal-empty"/imm32
321 68/push 0/imm32
322 50/push-EAX
323
324 e8/call check-ints-equal/disp32
325
326 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
327
328 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
329 5d/pop-to-EBP
330 c3/return
331
332 test-slice-equal-with-empty:
333
334
335 55/push-EBP
336 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
337
338 68/push _test-slice-data-2/imm32/end
339 68/push _test-slice-data-0/imm32/start
340 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
341
342
343 68/push ""/imm32
344 51/push-ECX
345
346 e8/call slice-equal?/disp32
347
348 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
349
350
351 68/push "F - test-slice-equal-with-empty"/imm32
352 68/push 0/imm32
353 50/push-EAX
354
355 e8/call check-ints-equal/disp32
356
357 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
358
359 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
360 5d/pop-to-EBP
361 c3/return
362
363 test-slice-equal-empty-with-empty:
364
365
366 55/push-EBP
367 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
368
369 68/push _test-slice-data-0/imm32/end
370 68/push _test-slice-data-0/imm32/start
371 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
372
373
374 68/push ""/imm32
375 51/push-ECX
376
377 e8/call slice-equal?/disp32
378
379 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
380
381
382 68/push "F - test-slice-equal-empty-with-empty"/imm32
383 68/push 1/imm32
384 50/push-EAX
385
386 e8/call check-ints-equal/disp32
387
388 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
389
390 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
391 5d/pop-to-EBP
392 c3/return
393
394 slice-starts-with?:
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417 55/push-EBP
418 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
419
420 51/push-ECX
421 52/push-EDX
422 53/push-EBX
423 56/push-ESI
424 57/push-EDI
425
426 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
427
428 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
429 2b/subtract 0/mod/indirect 6/rm32/ESI . . . 1/r32/ECX . .
430
431 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0xc/disp8 .
432
433 8b/copy 0/mod/indirect 7/rm32/EDI . . . 2/r32/EDX . .
434
435 39/compare 3/mod/direct 2/rm32/EDX . . . 1/r32/ECX . .
436 7f/jump-if-greater $slice-starts-with?:false/disp8
437
438 8b/subtract 0/mod/indirect 6/rm32/ESI . . . 6/r32/ESI . .
439
440 81 0/subop/add 3/mod/direct 7/rm32/EDI . . . . . 4/imm32
441
442 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . .
443
444 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
445 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
446 $slice-starts-with?:loop:
447
448 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
449 7d/jump-if-greater-or-equal $slice-starts-with?:true/disp8
450
451 8a/copy-byte 0/mod/indirect 6/rm32/ESI . . . 0/r32/AL . .
452
453 8a/copy-byte 0/mod/indirect 7/rm32/EDI . . . 3/r32/BL . .
454
455 39/compare 3/mod/direct 0/rm32/EAX . . . 3/r32/EBX . .
456 75/jump-if-not-equal $slice-starts-with?:false/disp8
457
458 41/increment-ECX
459
460 46/increment-ESI
461
462 47/increment-EDI
463 eb/jump $slice-starts-with?:loop/disp8
464 $slice-starts-with?:true:
465 b8/copy-to-EAX 1/imm32
466 eb/jump $slice-starts-with?:end/disp8
467 $slice-starts-with?:false:
468 b8/copy-to-EAX 0/imm32
469 $slice-starts-with?:end:
470
471 5f/pop-to-EDI
472 5e/pop-to-ESI
473 5b/pop-to-EBX
474 5a/pop-to-EDX
475 59/pop-to-ECX
476
477 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
478 5d/pop-to-EBP
479 c3/return
480
481 test-slice-starts-with-single-character:
482
483
484 55/push-EBP
485 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
486
487 68/push _test-slice-data-3/imm32/end
488 68/push _test-slice-data-0/imm32/start
489 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
490
491
492 68/push "A"/imm32
493 51/push-ECX
494
495 e8/call slice-starts-with?/disp32
496
497 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
498
499
500 68/push "F - test-slice-starts-with-single-character"/imm32
501 68/push 1/imm32
502 50/push-EAX
503
504 e8/call check-ints-equal/disp32
505
506 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
507
508 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
509 5d/pop-to-EBP
510 c3/return
511
512 test-slice-starts-with-empty-string:
513
514
515 55/push-EBP
516 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
517
518 68/push _test-slice-data-3/imm32/end
519 68/push _test-slice-data-0/imm32/start
520 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
521
522
523 68/push ""/imm32
524 51/push-ECX
525
526 e8/call slice-starts-with?/disp32
527
528 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
529
530
531 68/push "F - test-slice-starts-with-empty-string"/imm32
532 68/push 1/imm32
533 50/push-EAX
534
535 e8/call check-ints-equal/disp32
536
537 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
538
539 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
540 5d/pop-to-EBP
541 c3/return
542
543 test-slice-starts-with-multiple-characters:
544
545
546 55/push-EBP
547 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
548
549 68/push _test-slice-data-3/imm32/end
550 68/push _test-slice-data-0/imm32/start
551 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
552
553
554 68/push "Ab"/imm32
555 51/push-ECX
556
557 e8/call slice-starts-with?/disp32
558
559 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
560
561
562 68/push "F - test-slice-starts-with-multiple-characters"/imm32
563 68/push 1/imm32
564 50/push-EAX
565
566 e8/call check-ints-equal/disp32
567
568 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
569
570 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
571 5d/pop-to-EBP
572 c3/return
573
574 test-slice-starts-with-entire-string:
575
576
577 55/push-EBP
578 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
579
580 68/push _test-slice-data-3/imm32/end
581 68/push _test-slice-data-0/imm32/start
582 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
583
584
585 68/push "Abc"/imm32
586 51/push-ECX
587
588 e8/call slice-starts-with?/disp32
589
590 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
591
592
593 68/push "F - test-slice-starts-with-entire-string"/imm32
594 68/push 1/imm32
595 50/push-EAX
596
597 e8/call check-ints-equal/disp32
598
599 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
600
601 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
602 5d/pop-to-EBP
603 c3/return
604
605 test-slice-starts-with-fails:
606
607
608 55/push-EBP
609 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
610
611 68/push _test-slice-data-3/imm32/end
612 68/push _test-slice-data-0/imm32/start
613 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
614
615
616 68/push "Abd"/imm32
617 51/push-ECX
618
619 e8/call slice-starts-with?/disp32
620
621 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
622
623
624 68/push "F - test-slice-starts-with-fails"/imm32
625 68/push 0/imm32
626 50/push-EAX
627
628 e8/call check-ints-equal/disp32
629
630 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
631
632 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
633 5d/pop-to-EBP
634 c3/return
635
636 test-slice-starts-with-fails-2:
637
638
639 55/push-EBP
640 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
641
642 68/push _test-slice-data-3/imm32/end
643 68/push _test-slice-data-0/imm32/start
644 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
645
646
647 68/push "Ac"/imm32
648 51/push-ECX
649
650 e8/call slice-starts-with?/disp32
651
652 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
653
654
655 68/push "F - test-slice-starts-with-fails-2"/imm32
656 68/push 0/imm32
657 50/push-EAX
658
659 e8/call check-ints-equal/disp32
660
661 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
662
663 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
664 5d/pop-to-EBP
665 c3/return
666
667 write-slice:
668
669 55/push-EBP
670 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
671
672 50/push-EAX
673 51/push-ECX
674 52/push-EDX
675 53/push-EBX
676 56/push-ESI
677 57/push-EDI
678
679 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
680
681 8b/copy 0/mod/indirect 6/rm32/ESI . . . 1/r32/ECX . .
682
683 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 6/r32/ESI 4/disp8 .
684
685 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 7/r32/EDI 8/disp8 .
686
687 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 2/r32/EDX 0xc/disp8 .
688
689 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 .
690 $write-slice:loop:
691
692 39/compare 3/mod/direct 1/rm32/ECX . . . 6/r32/ESI . .
693 7d/jump-if-greater-or-equal $write-slice:loop-end/disp8
694
695 39/compare 3/mod/direct 3/rm32/EBX . . . 2/r32/EDX . .
696 7c/jump-if-lesser $write-slice:to-stream/disp8
697
698 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 .
699
700
701 57/push-EDI
702
703 e8/call flush/disp32
704
705 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
706
707
708 8d/copy-address 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
709 50/push-EAX
710
711 e8/call clear-stream/disp32
712
713 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
714
715 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
716 $write-slice:to-stream:
717
718
719 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
720 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
721
722 88/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/EDI 3/index/EBX . 0/r32/AL 0x10/disp8 .
723
724 43/increment-EBX
725
726 41/increment-ECX
727 eb/jump $write-slice:loop/disp8
728 $write-slice:loop-end:
729
730 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 .
731 $write-slice:end:
732
733 5f/pop-to-EDI
734 5e/pop-to-ESI
735 5b/pop-to-EBX
736 5a/pop-to-EDX
737 59/pop-to-ECX
738 58/pop-to-EAX
739
740 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
741 5d/pop-to-EBP
742 c3/return
743
744 test-write-slice:
745
746 55/push-EBP
747 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
748
749
750
751 68/push _test-stream/imm32
752
753 e8/call clear-stream/disp32
754
755 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
756
757
758 b8/copy-to-EAX _test-buffered-file/imm32
759 05/add-to-EAX 4/imm32
760 50/push-EAX
761
762 e8/call clear-stream/disp32
763
764 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
765
766 68/push _test-slice-data-3/imm32/end
767 68/push _test-slice-data-0/imm32/start
768 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
769
770
771 51/push-ECX
772 68/push _test-buffered-file/imm32
773
774 e8/call write-slice/disp32
775
776 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
777
778
779 68/push _test-buffered-file/imm32
780
781 e8/call flush/disp32
782
783 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
784
785
786 68/push "F - test-write-slice"/imm32
787 68/push "Abc"/imm32
788 68/push _test-stream/imm32
789
790 e8/call check-stream-equal/disp32
791
792 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
793
794 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
795 5d/pop-to-EBP
796 c3/return
797
798
799
800
801
802
803 write-stream-buffered:
804
805 55/push-EBP
806 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
807
808 50/push-EAX
809 56/push-ESI
810
811 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
812
813
814 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
815 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX . 0/r32/EAX 0xc/disp8 .
816 50/push-EAX
817
818 8d/copy-address 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 0xc/disp8 .
819 50/push-EAX
820
821 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
822
823
824 51/push-ECX
825 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
826
827 e8/call write-slice/disp32
828
829 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
830 $write-stream-buffered:end:
831
832 5e/pop-to-ESI
833 58/pop-to-EAX
834
835 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
836 5d/pop-to-EBP
837 c3/return
838
839 test-write-stream-buffered:
840
841 55/push-EBP
842 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
843
844
845
846 68/push _test-stream/imm32
847
848 e8/call clear-stream/disp32
849
850 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
851
852
853 b8/copy-to-EAX _test-buffered-file/imm32
854 05/add-to-EAX 4/imm32
855 50/push-EAX
856
857 e8/call clear-stream/disp32
858
859 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
860
861
862 68/push _test-tmp-stream/imm32
863
864 e8/call clear-stream/disp32
865
866 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
867
868
869
870 68/push "abcd"/imm32
871 68/push _test-tmp-stream/imm32
872
873 e8/call write/disp32
874
875 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
876
877
878
879 68/push _test-tmp-stream/imm32
880 68/push _test-buffered-file/imm32
881
882 e8/call write-stream-buffered/disp32
883
884 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
885
886
887
888 68/push _test-buffered-file/imm32
889
890 e8/call flush/disp32
891
892 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
893
894
895 68/push "F - test-write-stream-buffered"/imm32
896 68/push "abcd"/imm32
897 68/push _test-stream/imm32
898
899 e8/call check-stream-equal/disp32
900
901 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
902
903 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
904 5d/pop-to-EBP
905 c3/return
906
907 == data
908
909 _test-slice-data-0:
910 41/A
911 _test-slice-data-1:
912 62/b
913 _test-slice-data-2:
914 63/c
915 _test-slice-data-3:
916 64/d
917 _test-slice-data-4:
918
919