https://github.com/akkartik/mu/blob/master/subx/apps/pack.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 == code
19
20
21
22
23
24
25
26
27
28
29
30 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
31
32
33 81 7/subop/compare 1/mod/*+disp8 5/rm32/EBP . . . . 0/disp8 1/imm32
34 7e/jump-if-lesser-or-equal $run-main/disp8
35
36
37 68/push "test"/imm32
38 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
39
40 e8/call kernel-string-equal?/disp32
41
42 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
43
44 3d/compare-EAX 1/imm32
45 75/jump-if-not-equal $run-main/disp8
46
47 e8/call run-tests/disp32
48 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/EBX Num-test-failures/disp32
49 eb/jump $main:end/disp8
50 $run-main:
51
52
53 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
54 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . .
55
56
57 c7 0/subop/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32
58
59
60 50/push-EAX/ed
61 68/push Stderr/imm32
62 68/push Stdout/imm32
63 68/push Stdin/imm32
64
65 e8/call convert/disp32
66
67 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
68
69 bb/copy-to-EBX 0/imm32
70 $main:end:
71 b8/copy-to-EAX 1/imm32/exit
72 cd/syscall 0x80/imm8
73
74
75
76
77
78
79
80
81
82
83
84
85 convert:
86
87
88
89
90
91
92
93
94
95
96 55/push-EBP
97 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
98
99 51/push-ECX
100
101 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x200/imm32
102 68/push 0x200/imm32/length
103 68/push 0/imm32/read
104 68/push 0/imm32/write
105 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
106 $convert:loop:
107
108
109 51/push-ECX
110
111 e8/call clear-stream/disp32
112
113 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
114
115
116 51/push-ECX
117 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
118
119 e8/call convert-instruction/disp32
120
121 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
122
123 3d/compare-with-EAX 0xffffffff/imm32
124 74/jump-if-equal $convert:break/disp8
125
126
127 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
128 51/push-ECX
129
130 e8/call convert-instruction/disp32
131
132 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
133 $convert:break:
134
135
136 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
137
138 e8/call flush/disp32
139
140 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
141 $convert:end:
142
143 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x20c/imm32
144
145 59/pop-to-ECX
146
147 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
148 5d/pop-to-EBP
149 c3/return
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200 convert-instruction:
201
202
203
204
205
206
207
208
209
210
211 55/push-EBP
212 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
213
214 51/push-ECX
215
216 68/push 0/imm32/end
217 68/push 0/imm32/start
218 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
219
220
221 51/push-ECX
222 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
223
224 e8/call next-word/disp32
225
226 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
227 $convert-instruction:pass-line-through:
228
229
230 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
231 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
232
233 e8/call write-stream-buffered/disp32
234
235 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
236 $convert-instruction:end:
237
238 59/pop-to-ECX
239
240 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
241 5d/pop-to-EBP
242 c3/return
243
244 test-convert-instruction-passes-comments-through:
245
246
247 55/push-EBP
248 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
249
250
251
252 68/push _test-stream/imm32
253
254 e8/call clear-stream/disp32
255
256 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
257
258
259 b8/copy-to-EAX _test-buffered-file/imm32
260 05/add-to-EAX 4/imm32
261 50/push-EAX
262
263 e8/call clear-stream/disp32
264
265 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
266
267
268 68/push _test-tmp-stream/imm32
269
270 e8/call clear-stream/disp32
271
272 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
273
274
275
276 68/push "# abcd"/imm32
277 68/push _test-tmp-stream/imm32
278
279 e8/call write/disp32
280
281 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
282
283
284 68/push _test-buffered-file/imm32
285 68/push _test-tmp-stream/imm32
286
287 e8/call convert-instruction/disp32
288
289 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
290
291
292
293 68/push _test-buffered-file/imm32
294
295 e8/call flush/disp32
296
297 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
298
299
300 68/push "F - test-convert-instruction-passes-comments-through"/imm32
301 68/push "# abcd"/imm32
302 68/push _test-stream/imm32
303
304 e8/call check-stream-equal/disp32
305
306 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
307
308 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
309 5d/pop-to-EBP
310 c3/return
311
312 test-convert-instruction-passes-segment-headers-through:
313
314
315 55/push-EBP
316 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
317
318
319
320 68/push _test-stream/imm32
321
322 e8/call clear-stream/disp32
323
324 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
325
326
327 b8/copy-to-EAX _test-buffered-file/imm32
328 05/add-to-EAX 4/imm32
329 50/push-EAX
330
331 e8/call clear-stream/disp32
332
333 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
334
335
336 68/push _test-tmp-stream/imm32
337
338 e8/call clear-stream/disp32
339
340 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
341
342
343
344 68/push "== abcd"/imm32
345 68/push _test-tmp-stream/imm32
346
347 e8/call write/disp32
348
349 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
350
351
352 68/push _test-buffered-file/imm32
353 68/push _test-tmp-stream/imm32
354
355 e8/call convert-instruction/disp32
356
357 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
358
359
360
361 68/push _test-buffered-file/imm32
362
363 e8/call flush/disp32
364
365 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
366
367
368 68/push "F - test-convert-instruction-passes-segment-headers-through"/imm32
369 68/push "== abcd"/imm32
370 68/push _test-stream/imm32
371
372 e8/call check-stream-equal/disp32
373
374 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
375
376 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
377 5d/pop-to-EBP
378 c3/return
379
380 test-convert-instruction-passes-empty-lines-through:
381
382
383 55/push-EBP
384 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
385
386
387
388 68/push _test-stream/imm32
389
390 e8/call clear-stream/disp32
391
392 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
393
394
395 b8/copy-to-EAX _test-buffered-file/imm32
396 05/add-to-EAX 4/imm32
397 50/push-EAX
398
399 e8/call clear-stream/disp32
400
401 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
402
403
404 68/push _test-tmp-stream/imm32
405
406 e8/call clear-stream/disp32
407
408 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
409
410
411
412 68/push _test-buffered-file/imm32
413 68/push _test-tmp-stream/imm32
414
415 e8/call convert-instruction/disp32
416
417 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
418
419
420
421 68/push _test-buffered-file/imm32
422
423 e8/call flush/disp32
424
425 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
426
427
428 68/push "F - test-convert-instruction-passes-empty-lines-through"/imm32
429 68/push ""/imm32
430 68/push _test-stream/imm32
431
432 e8/call check-stream-equal/disp32
433
434 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
435
436 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
437 5d/pop-to-EBP
438 c3/return
439
440 test-convert-instruction-passes-lines-with-just-whitespace-through:
441
442
443 55/push-EBP
444 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
445
446
447
448 68/push _test-stream/imm32
449
450 e8/call clear-stream/disp32
451
452 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
453
454
455 b8/copy-to-EAX _test-buffered-file/imm32
456 05/add-to-EAX 4/imm32
457 50/push-EAX
458
459 e8/call clear-stream/disp32
460
461 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
462
463
464 68/push _test-tmp-stream/imm32
465
466 e8/call clear-stream/disp32
467
468 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
469
470
471
472 68/push " "/imm32
473 68/push _test-tmp-stream/imm32
474
475 e8/call write/disp32
476
477 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
478
479
480 68/push _test-buffered-file/imm32
481 68/push _test-tmp-stream/imm32
482
483 e8/call convert-instruction/disp32
484
485 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
486
487
488
489 68/push _test-buffered-file/imm32
490
491 e8/call flush/disp32
492
493 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
494
495
496 68/push "F - test-convert-instruction-passes-with-just-whitespace-through"/imm32
497 68/push " "/imm32
498 68/push _test-stream/imm32
499
500 e8/call check-stream-equal/disp32
501
502 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
503
504 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
505 5d/pop-to-EBP
506 c3/return
507
508 test-convert-instruction-passes-labels-through:
509
510
511 55/push-EBP
512 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
513
514
515
516 68/push _test-stream/imm32
517
518 e8/call clear-stream/disp32
519
520 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
521
522
523 b8/copy-to-EAX _test-buffered-file/imm32
524 05/add-to-EAX 4/imm32
525 50/push-EAX
526
527 e8/call clear-stream/disp32
528
529 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
530
531
532 68/push _test-tmp-stream/imm32
533
534 e8/call clear-stream/disp32
535
536 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
537
538
539
540 68/push "ab: # cd"/imm32
541 68/push _test-tmp-stream/imm32
542
543 e8/call write/disp32
544
545 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
546
547
548 68/push _test-buffered-file/imm32
549 68/push _test-tmp-stream/imm32
550
551 e8/call convert-instruction/disp32
552
553 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
554
555
556
557 68/push _test-buffered-file/imm32
558
559 e8/call flush/disp32
560
561 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
562
563
564 68/push "F - test-convert-instruction-passes-labels-through"/imm32
565 68/push "ab: # cd"/imm32
566 68/push _test-stream/imm32
567
568 e8/call check-stream-equal/disp32
569
570 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
571
572 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
573 5d/pop-to-EBP
574 c3/return
575
576
577 next-word:
578
579 55/push-EBP
580 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
581
582 50/push-EAX
583 51/push-ECX
584 56/push-ESI
585 57/push-EDI
586
587 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
588
589 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0xc/disp8 .
590
591
592 68/push 0x20/imm32/space
593 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
594
595 e8/call skip-chars-matching/disp32
596
597 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
598
599 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
600 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
601 89/copy 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . .
602
603
604 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
605 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
606
607 3d/compare-EAX-with 0x23/imm32/pound
608 75/jump-if-not-equal $next-word:not-comment/disp8
609
610 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
611 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX . 0/r32/EAX 0xc/disp8 .
612 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
613
614 89/copy 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 4/disp8 .
615
616 eb/jump $next-word:end/disp8
617 $next-word:not-comment:
618
619
620 68/push 0x20/imm32/space
621 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
622
623 e8/call skip-chars-not-matching/disp32
624
625 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
626
627 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
628 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
629 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
630 $next-word:end:
631
632 5f/pop-to-EDI
633 5e/pop-to-ESI
634 59/pop-to-ECX
635 58/pop-to-EAX
636
637 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
638 5d/pop-to-EBP
639 c3/return
640
641 test-next-word:
642
643 55/push-EBP
644 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
645
646
647
648 68/push _test-stream/imm32
649
650 e8/call clear-stream/disp32
651
652 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
653
654 68/push 0/imm32/end
655 68/push 0/imm32/start
656 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
657
658
659 68/push " ab"/imm32
660 68/push _test-stream/imm32
661
662 e8/call write/disp32
663
664 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
665
666
667 51/push-ECX
668 68/push _test-stream/imm32
669
670 e8/call next-word/disp32
671
672 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
673
674
675
676 68/push "F - test-next-word: start"/imm32
677 68/push 0xe/imm32
678
679 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
680 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
681 50/push-EAX
682
683 e8/call check-ints-equal/disp32
684
685 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
686
687
688
689 68/push "F - test-next-word: end"/imm32
690 68/push 0x10/imm32
691
692 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
693 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
694 50/push-EAX
695
696 e8/call check-ints-equal/disp32
697
698 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
699
700 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
701 5d/pop-to-EBP
702 c3/return
703
704 test-next-word-returns-whole-comment:
705
706 55/push-EBP
707 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
708
709
710
711 68/push _test-stream/imm32
712
713 e8/call clear-stream/disp32
714
715 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
716
717 68/push 0/imm32/end
718 68/push 0/imm32/start
719 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
720
721
722 68/push " # a"/imm32
723 68/push _test-stream/imm32
724
725 e8/call write/disp32
726
727 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
728
729
730 51/push-ECX
731 68/push _test-stream/imm32
732
733 e8/call next-word/disp32
734
735 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
736
737
738
739 68/push "F - test-next-word-returns-whole-comment: start"/imm32
740 68/push 0xe/imm32
741
742 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
743 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
744 50/push-EAX
745
746 e8/call check-ints-equal/disp32
747
748 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
749
750
751
752 68/push "F - test-next-word-returns-whole-comment: end"/imm32
753 68/push 0x11/imm32
754
755 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
756 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-stream/imm32
757 50/push-EAX
758
759 e8/call check-ints-equal/disp32
760
761 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
762
763 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
764 5d/pop-to-EBP
765 c3/return
766
767 has-metadata?:
768
769
770
771
772
773
774
775
776
777
778 55/push-EBP
779 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
780
781 51/push-ECX
782 52/push-EDX
783 56/push-ESI
784 57/push-EDI
785
786 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
787
788 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 2/r32/EDX 4/disp8 .
789
790 68/push 0/imm32/end
791 68/push 0/imm32/start
792 89/copy 3/mod/direct 7/rm32/EDI . . . 4/r32/ESP . .
793
794
795 57/push-EDI
796 68/push 0x2f/imm32/slash
797 52/push-EDX
798 ff 6/subop/push 0/mod/indirect 6/rm32/ESI . . . . . .
799
800 e8/call next-token-from-slice/disp32
801
802 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
803
804 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 1/r32/ECX 4/disp8 .
805 $has-metadata?:loop:
806
807
808 57/push-EDI
809 68/push 0x2f/imm32/slash
810 52/push-EDX
811 51/push-ECX
812
813 e8/call next-token-from-slice/disp32
814
815 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
816
817
818
819 57/push-EDI
820
821 e8/call slice-empty?/disp32
822
823 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
824
825 81 7/subop/compare 3/mod/direct 0/rm32/EAX . . . . . 0/imm32
826 75/compare-if-not-equal $has-metadata?:false/disp8
827
828
829
830 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
831 57/push-EDI
832
833 e8/call slice-equal?/disp32
834
835 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
836
837 81 7/subop/compare 3/mod/direct 0/rm32/EAX . . . . . 0/imm32
838 75/compare-if-not-equal $has-metadata?:true/disp8
839
840 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 1/r32/ECX 4/disp8 .
841 eb/jump $has-metadata?:loop/disp8
842 $has-metadata?:true:
843 b8/copy-to-EAX 1/imm32/true
844 eb/jump $has-metadata?:end/disp8
845 $has-metadata?:false:
846 b8/copy-to-EAX 0/imm32/false
847 $has-metadata?:end:
848
849 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
850
851 5f/pop-to-EDI
852 5e/pop-to-ESI
853 5a/pop-to-EDX
854 59/pop-to-ECX
855
856 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
857 5d/pop-to-EBP
858 c3/return
859
860 test-has-metadata-true:
861
862 55/push-EBP
863 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
864
865 b8/copy-to-EAX "ab/c"/imm32
866 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
867 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
868 05/add-to-EAX 4/imm32
869
870 51/push-ECX
871 50/push-EAX
872 89/copy 3/mod/direct 6/rm32/ESI . . . 4/r32/ESP . .
873
874
875 68/push "c"/imm32
876 56/push-ESI
877
878 e8/call has-metadata?/disp32
879
880 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32
881
882
883 68/push "F - test-has-metadata-true"/imm32
884 68/push 1/imm32/true
885 50/push-EAX
886
887 e8/call check-ints-equal/disp32
888
889 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
890
891 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
892 5d/pop-to-EBP
893 c3/return
894
895 test-has-metadata-false:
896
897 55/push-EBP
898 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
899
900 b8/copy-to-EAX "ab/c"/imm32
901 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
902 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
903 05/add-to-EAX 4/imm32
904
905 51/push-ECX
906 50/push-EAX
907 89/copy 3/mod/direct 6/rm32/ESI . . . 4/r32/ESP . .
908
909
910 68/push "d"/imm32
911 56/push-ESI
912
913 e8/call has-metadata?/disp32
914
915 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32
916
917
918 68/push "F - test-has-metadata-false"/imm32
919 68/push 0/imm32/false
920 50/push-EAX
921
922 e8/call check-ints-equal/disp32
923
924 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
925
926 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
927 5d/pop-to-EBP
928 c3/return
929
930 test-has-metadata-ignore-name:
931
932 55/push-EBP
933 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
934
935 b8/copy-to-EAX "a/b"/imm32
936 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
937 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
938 05/add-to-EAX 4/imm32
939
940 51/push-ECX
941 50/push-EAX
942 89/copy 3/mod/direct 6/rm32/ESI . . . 4/r32/ESP . .
943
944
945 68/push "a"/imm32
946 56/push-ESI
947
948 e8/call has-metadata?/disp32
949
950 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32
951
952
953 68/push "F - test-has-metadata-ignore-name"/imm32
954 68/push 0/imm32/false
955 50/push-EAX
956
957 e8/call check-ints-equal/disp32
958
959 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
960
961 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
962 5d/pop-to-EBP
963 c3/return
964
965 test-has-metadata-multiple-true:
966
967 55/push-EBP
968 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
969
970 b8/copy-to-EAX "a/b/c"/imm32
971 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
972 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
973 05/add-to-EAX 4/imm32
974
975 51/push-ECX
976 50/push-EAX
977 89/copy 3/mod/direct 6/rm32/ESI . . . 4/r32/ESP . .
978
979
980 68/push "c"/imm32
981 56/push-ESI
982
983 e8/call has-metadata?/disp32
984
985 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32
986
987
988 68/push "F - test-has-metadata-multiple-true"/imm32
989 68/push 1/imm32/true
990 50/push-EAX
991
992 e8/call check-ints-equal/disp32
993
994 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
995
996 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
997 5d/pop-to-EBP
998 c3/return
999
1000 test-has-metadata-multiple-false:
1001
1002 55/push-EBP
1003 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1004
1005 b8/copy-to-EAX "a/b/c"/imm32
1006 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
1007 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
1008 05/add-to-EAX 4/imm32
1009
1010 51/push-ECX
1011 50/push-EAX
1012 89/copy 3/mod/direct 6/rm32/ESI . . . 4/r32/ESP . .
1013
1014
1015 68/push "d"/imm32
1016 56/push-ESI
1017
1018 e8/call has-metadata?/disp32
1019
1020 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32
1021
1022
1023 68/push "F - test-has-metadata-multiple-false"/imm32
1024 68/push 0/imm32/false
1025 50/push-EAX
1026
1027 e8/call check-ints-equal/disp32
1028
1029 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1030
1031 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1032 5d/pop-to-EBP
1033 c3/return
1034
1035
1036
1037 emit:
1038
1039 55/push-EBP
1040 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1041
1042 50/push-EAX
1043 56/push-ESI
1044 57/push-EDI
1045
1046 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
1047
1048 68/push 0/imm32/end
1049 68/push 0/imm32/start
1050 89/copy 3/mod/direct 7/rm32/EDI . . . 4/r32/ESP . .
1051
1052
1053 57/push-EDI
1054 68/push 0x2f/imm32/slash
1055 ff 6/subop/push 1/mod/*+disp8 6/rm32/ESI . . . . 4/disp8 .
1056 ff 6/subop/push 0/mod/indirect 6/rm32/ESI . . . . . .
1057
1058 e8/call next-token-from-slice/disp32
1059
1060 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
1061
1062
1063
1064 57/push-EDI
1065
1066 e8/call is-hex-int?/disp32
1067
1068 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1069
1070 81 7/subop/compare 3/mod/direct 0/rm32/EAX . . . . . 0/imm32
1071 75/jump-if-not-equal $emit:hex-int/disp8
1072
1073
1074 56/push-ESI
1075 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
1076
1077 e8/call write-slice/disp32
1078
1079 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1080
1081 eb/jump $emit:end/disp8
1082
1083 $emit:hex-int:
1084
1085
1086 57/push-EDI
1087
1088 e8/call parse-hex-int/disp32
1089
1090 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1091
1092
1093 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
1094 50/push-EAX
1095 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
1096
1097 e8/call emit-hex/disp32
1098
1099 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1100 $emit:end:
1101
1102 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1103
1104 5f/pop-to-EDI
1105 5e/pop-to-ESI
1106 58/pop-to-EAX
1107
1108 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1109 5d/pop-to-EBP
1110 c3/return
1111
1112 test-emit-number:
1113
1114 55/push-EBP
1115 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1116
1117
1118
1119 68/push _test-stream/imm32
1120
1121 e8/call clear-stream/disp32
1122
1123 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1124
1125
1126 b8/copy-to-EAX _test-buffered-file/imm32
1127 05/add-to-EAX 4/imm32
1128 50/push-EAX
1129
1130 e8/call clear-stream/disp32
1131
1132 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1133
1134 68/push _test-slice-negative-two-end/imm32/end
1135 68/push _test-slice-negative-two/imm32/start
1136 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1137
1138
1139 68/push 2/imm32
1140 51/push-ECX
1141 68/push _test-buffered-file/imm32
1142
1143 e8/call emit/disp32
1144
1145 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1146
1147
1148 68/push _test-buffered-file/imm32
1149
1150 e8/call flush/disp32
1151
1152 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1153
1154
1155
1156 68/push "F - test-emit-number/1"/imm32
1157 68/push 0x66206566/imm32
1158
1159 b8/copy-to-EAX _test-stream/imm32
1160 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1161
1162 e8/call check-ints-equal/disp32
1163
1164 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1165
1166
1167 68/push "F - test-emit-number/2"/imm32
1168 68/push 0x2066/imm32
1169
1170 b8/copy-to-EAX _test-stream/imm32
1171 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0x10/disp8 .
1172
1173 e8/call check-ints-equal/disp32
1174
1175 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1176
1177 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1178 5d/pop-to-EBP
1179 c3/return
1180
1181 test-emit-number-with-metadata:
1182
1183 55/push-EBP
1184 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1185
1186
1187
1188 68/push _test-stream/imm32
1189
1190 e8/call clear-stream/disp32
1191
1192 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1193
1194
1195 b8/copy-to-EAX _test-buffered-file/imm32
1196 05/add-to-EAX 4/imm32
1197 50/push-EAX
1198
1199 e8/call clear-stream/disp32
1200
1201 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1202
1203 68/push _test-slice-negative-two-metadata-end/imm32/end
1204 68/push _test-slice-negative-two/imm32/start
1205 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1206
1207
1208 68/push 2/imm32
1209 51/push-ECX
1210 68/push _test-buffered-file/imm32
1211
1212 e8/call emit/disp32
1213
1214 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1215
1216
1217 68/push _test-buffered-file/imm32
1218
1219 e8/call flush/disp32
1220
1221 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1222
1223
1224
1225
1226 68/push "F - test-emit-number-with-metadata/1"/imm32
1227 68/push 0x66206566/imm32
1228
1229 b8/copy-to-EAX _test-stream/imm32
1230 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1231
1232 e8/call check-ints-equal/disp32
1233
1234 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1235
1236
1237 68/push "F - test-emit-number-with-metadata/2"/imm32
1238 68/push 0x2066/imm32
1239
1240 b8/copy-to-EAX _test-stream/imm32
1241 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0x10/disp8 .
1242
1243 e8/call check-ints-equal/disp32
1244
1245 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1246
1247 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1248 5d/pop-to-EBP
1249 c3/return
1250
1251 test-emit-non-number:
1252
1253 55/push-EBP
1254 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1255
1256
1257
1258 68/push _test-stream/imm32
1259
1260 e8/call clear-stream/disp32
1261
1262 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1263
1264
1265 b8/copy-to-EAX _test-buffered-file/imm32
1266 05/add-to-EAX 4/imm32
1267 50/push-EAX
1268
1269 e8/call clear-stream/disp32
1270
1271 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1272
1273 68/push _test-slice-non-number-word-end/imm32/end
1274 68/push _test-slice-non-number-word/imm32/start
1275 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1276
1277
1278 68/push 2/imm32
1279 51/push-ECX
1280 68/push _test-buffered-file/imm32
1281
1282 e8/call emit/disp32
1283
1284 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1285
1286
1287 68/push _test-buffered-file/imm32
1288
1289 e8/call flush/disp32
1290
1291 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1292
1293
1294
1295 68/push "F - test-emit-non-number"/imm32
1296 68/push 0x7a7978/imm32
1297
1298 b8/copy-to-EAX _test-stream/imm32
1299 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1300
1301 e8/call check-ints-equal/disp32
1302
1303 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1304
1305 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1306 5d/pop-to-EBP
1307 c3/return
1308
1309 test-emit-non-number-with-metadata:
1310
1311 55/push-EBP
1312 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1313
1314
1315
1316 68/push _test-stream/imm32
1317
1318 e8/call clear-stream/disp32
1319
1320 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1321
1322
1323 b8/copy-to-EAX _test-buffered-file/imm32
1324 05/add-to-EAX 4/imm32
1325 50/push-EAX
1326
1327 e8/call clear-stream/disp32
1328
1329 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1330
1331 68/push _test-slice-non-number-word-metadata-end/imm32/end
1332 68/push _test-slice-non-number-word/imm32/start
1333 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1334
1335
1336 68/push 2/imm32
1337 51/push-ECX
1338 68/push _test-buffered-file/imm32
1339
1340 e8/call emit/disp32
1341
1342 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1343
1344
1345 68/push _test-buffered-file/imm32
1346
1347 e8/call flush/disp32
1348
1349 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1350
1351
1352
1353 68/push "F - test-emit-non-number-with-metadata"/imm32
1354 68/push 0x2f7a7978/imm32
1355
1356 b8/copy-to-EAX _test-stream/imm32
1357 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1358
1359 e8/call check-ints-equal/disp32
1360
1361 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1362
1363 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1364 5d/pop-to-EBP
1365 c3/return
1366
1367
1368 emit-hex:
1369
1370 55/push-EBP
1371 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1372
1373 50/push-EAX
1374 51/push-ECX
1375 52/push-EDX
1376 53/push-EBX
1377 57/push-EDI
1378
1379 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 8/disp8 .
1380
1381 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 3/r32/EBX 0xc/disp8 .
1382
1383 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 0x10/disp8 .
1384
1385 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . .
1386 $emit-hex:loop:
1387
1388 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
1389 7d/jump-if-greater-or-equal $emit-hex:end/disp8
1390
1391
1392 53/push-EBX
1393 57/push-EDI
1394
1395 e8/call print-byte/disp32
1396
1397 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1398
1399
1400 68/push 0x20/imm32/space
1401 57/push-EDI
1402
1403 e8/call write-byte/disp32
1404
1405 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1406
1407 c1/shift 5/subop/logic-right 3/mod/direct 3/rm32/EBX . . . . . 8/imm8
1408
1409 41/increment-ECX
1410 eb/jump $emit-hex:loop/disp8
1411 $emit-hex:end:
1412
1413 5f/pop-to-EDI
1414 5b/pop-to-EBX
1415 5a/pop-to-EAX
1416 59/pop-to-ECX
1417 58/pop-to-EAX
1418
1419 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1420 5d/pop-to-EBP
1421 c3/return
1422
1423 test-emit-hex-single-byte:
1424
1425
1426
1427 68/push _test-stream/imm32
1428
1429 e8/call clear-stream/disp32
1430
1431 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1432
1433
1434 b8/copy-to-EAX _test-buffered-file/imm32
1435 05/add-to-EAX 4/imm32
1436 50/push-EAX
1437
1438 e8/call clear-stream/disp32
1439
1440 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1441
1442
1443 68/push 1/imm32
1444 68/push 0xab/imm32
1445 68/push _test-buffered-file/imm32
1446
1447 e8/call emit-hex/disp32
1448
1449 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1450
1451
1452 68/push _test-buffered-file/imm32
1453
1454 e8/call flush/disp32
1455
1456 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1457
1458
1459 68/push "F - test-emit-hex-single-byte"/imm32
1460 68/push 0x206261/imm32
1461
1462 b8/copy-to-EAX _test-stream/imm32
1463 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1464
1465 e8/call check-ints-equal/disp32
1466
1467 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1468
1469 c3/return
1470
1471 test-emit-hex-multiple-byte:
1472
1473
1474
1475 68/push _test-stream/imm32
1476
1477 e8/call clear-stream/disp32
1478
1479 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1480
1481
1482 b8/copy-to-EAX _test-buffered-file/imm32
1483 05/add-to-EAX 4/imm32
1484 50/push-EAX
1485
1486 e8/call clear-stream/disp32
1487
1488 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1489
1490
1491 68/push 2/imm32
1492 68/push 0x1234/imm32
1493 68/push _test-buffered-file/imm32
1494
1495 e8/call emit-hex/disp32
1496
1497 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1498
1499
1500 68/push _test-buffered-file/imm32
1501
1502 e8/call flush/disp32
1503
1504 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1505
1506
1507
1508 68/push "F - test-emit-hex-multiple-byte/1"/imm32
1509 68/push 0x31203433/imm32
1510
1511 b8/copy-to-EAX _test-stream/imm32
1512 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1513
1514 e8/call check-ints-equal/disp32
1515
1516 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1517
1518
1519 68/push "F - test-emit-hex-multiple-byte/2"/imm32
1520 68/push 0x2032/imm32
1521
1522 b8/copy-to-EAX _test-stream/imm32
1523 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0x10/disp8 .
1524
1525 e8/call check-ints-equal/disp32
1526
1527 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1528
1529 c3/return
1530
1531 test-emit-hex-zero-pad:
1532
1533
1534
1535 68/push _test-stream/imm32
1536
1537 e8/call clear-stream/disp32
1538
1539 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1540
1541
1542 b8/copy-to-EAX _test-buffered-file/imm32
1543 05/add-to-EAX 4/imm32
1544 50/push-EAX
1545
1546 e8/call clear-stream/disp32
1547
1548 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1549
1550
1551 68/push 2/imm32
1552 68/push 0xab/imm32
1553 68/push _test-buffered-file/imm32
1554
1555 e8/call emit-hex/disp32
1556
1557 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1558
1559
1560 68/push _test-buffered-file/imm32
1561
1562 e8/call flush/disp32
1563
1564 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1565
1566
1567
1568 68/push "F - test-emit-hex-zero-pad/1"/imm32
1569 68/push 0x30206261/imm32
1570
1571 b8/copy-to-EAX _test-stream/imm32
1572 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1573
1574 e8/call check-ints-equal/disp32
1575
1576 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1577
1578
1579 68/push "F - test-emit-hex-zero-pad/2"/imm32
1580 68/push 0x2030/imm32
1581
1582 b8/copy-to-EAX _test-stream/imm32
1583 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0x10/disp8 .
1584
1585 e8/call check-ints-equal/disp32
1586
1587 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1588
1589 c3/return
1590
1591 test-emit-hex-negative:
1592
1593
1594
1595 68/push _test-stream/imm32
1596
1597 e8/call clear-stream/disp32
1598
1599 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1600
1601
1602 b8/copy-to-EAX _test-buffered-file/imm32
1603 05/add-to-EAX 4/imm32
1604 50/push-EAX
1605
1606 e8/call clear-stream/disp32
1607
1608 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1609
1610
1611 68/push 2/imm32
1612 68/push -1/imm32
1613 68/push _test-buffered-file/imm32
1614
1615 e8/call emit-hex/disp32
1616
1617 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1618
1619
1620 68/push _test-buffered-file/imm32
1621
1622 e8/call flush/disp32
1623
1624 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1625
1626
1627
1628 68/push "F - test-emit-hex-negative/1"/imm32
1629 68/push 0x66206666/imm32
1630
1631 b8/copy-to-EAX _test-stream/imm32
1632 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0xc/disp8 .
1633
1634 e8/call check-ints-equal/disp32
1635
1636 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1637
1638
1639 68/push "F - test-emit-hex-negative/2"/imm32
1640 68/push 0x2066/imm32
1641
1642 b8/copy-to-EAX _test-stream/imm32
1643 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 0x10/disp8 .
1644
1645 e8/call check-ints-equal/disp32
1646
1647 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1648
1649 c3/return
1650
1651 == data
1652
1653 _test-slice-negative-two:
1654 2d/- 32/2
1655 _test-slice-negative-two-end:
1656 2f/slash 66/f 6f/o 6f/o
1657 _test-slice-negative-two-metadata-end:
1658
1659 _test-slice-non-number-word:
1660 78/x 79/y 7a/z
1661 _test-slice-non-number-word-end:
1662 2f/slash
1663 _test-slice-non-number-word-metadata-end:
1664
1665