https://github.com/akkartik/mu/blob/main/apps/sigils.subx
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 == code
52
53
54
55
56 Entry:
57
58 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
59
60
61
62
63 68/push Heap/imm32
64 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32
65
66 e8/call new-segment/disp32
67
68 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
69
70
71
72 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32
73 7e/jump-if-<= $subx-sigils-main:interactive/disp8
74
75
76
77 68/push "test"/imm32
78 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
79
80 e8/call kernel-string-equal?/disp32
81
82 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
83
84 3d/compare-eax-and 0/imm32/false
85 74/jump-if-= $subx-sigils-main:interactive/disp8
86
87 e8/call run-tests/disp32
88
89 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32
90 eb/jump $subx-sigils-main:end/disp8
91 $subx-sigils-main:interactive:
92
93
94
95 68/push Stdout/imm32
96 68/push Stdin/imm32
97
98 e8/call subx-sigils/disp32
99
100 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
101
102 bb/copy-to-ebx 0/imm32
103 $subx-sigils-main:end:
104 e8/call syscall_exit/disp32
105
106
107
108 subx-sigils:
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138 55/push-ebp
139 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
140
141 50/push-eax
142 51/push-ecx
143 52/push-edx
144 53/push-ebx
145
146 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x200/imm32
147 68/push 0x200/imm32/length
148 68/push 0/imm32/read
149 68/push 0/imm32/write
150 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
151
152 68/push 0/imm32/end
153 68/push 0/imm32/start
154 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
155 $subx-sigils:line-loop:
156
157
158 51/push-ecx
159
160 e8/call clear-stream/disp32
161
162 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
163
164
165 51/push-ecx
166 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
167
168 e8/call read-line-buffered/disp32
169
170 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
171 $subx-sigils:check0:
172
173 81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32
174 0f 84/jump-if-= $subx-sigils:break/disp32
175 $subx-sigils:word-loop:
176
177
178 52/push-edx
179 51/push-ecx
180
181 e8/call next-word-or-expression/disp32
182
183 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
184 $subx-sigils:check1:
185
186
187
188 52/push-edx
189
190 e8/call slice-empty?/disp32
191
192 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
193
194 3d/compare-eax-and 0/imm32/false
195 0f 85/jump-if-!= $subx-sigils:next-line/disp32
196 $subx-sigils:check-for-comment:
197
198
199 8b/copy 0/mod/indirect 2/rm32/edx . . . 3/r32/ebx . .
200
201 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
202 8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . .
203
204 3d/compare-eax-and 0x23/imm32/hash
205 74/jump-if-= $subx-sigils:word-loop/disp8
206 $subx-sigils:check-for-direct-mode:
207
208 3d/compare-eax-and 0x25/imm32/percent
209 75/jump-if-!= $subx-sigils:check-for-indirect-mode/disp8
210 $subx-sigils:direct-mode:
211 +-- 40 lines: #? # dump word-slice --------------------------------------------------------------------------------------------------------------------------------------------------
251
252
253 52/push-edx
254 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
255
256 e8/call emit-direct-mode/disp32
257
258 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
259
260 e9/jump $subx-sigils:next-word/disp32
261 $subx-sigils:check-for-indirect-mode:
262
263 3d/compare-eax-and 0x2a/imm32/asterisk
264 75/jump-if-!= $subx-sigils:check-for-invalid-addition/disp8
265
266
267
268 52/push-edx
269
270 e8/call disp32-mode?/disp32
271
272 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
273
274 3d/compare-eax-and 0/imm32/false
275 74/jump-if-= $subx-sigils:indirect-mode/disp8
276 $subx-sigils:disp32-mode:
277
278
279 52/push-edx
280 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
281
282 e8/call emit-indirect-disp32/disp32
283
284 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
285
286 e9/jump $subx-sigils:next-word/disp32
287 $subx-sigils:indirect-mode:
288
289 50/push-eax
290 51/push-ecx
291 52/push-edx
292 53/push-ebx
293
294
295 52/push-edx
296
297 e8/call parse-effective-address/disp32
298
299 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
300
301
302 53/push-ebx
303 52/push-edx
304 51/push-ecx
305 50/push-eax
306 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
307
308 e8/call emit-indirect-mode/disp32
309
310 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
311
312 5b/pop-to-ebx
313 5a/pop-to-edx
314 59/pop-to-ecx
315 58/pop-to-eax
316
317 e9/jump $subx-sigils:next-word/disp32
318 $subx-sigils:check-for-invalid-addition:
319
320 3d/compare-eax-and 0x2b/imm32/plus
321 74/jump-if-= $subx-sigils:error1/disp8
322 $subx-sigils:check-for-invalid-left-shift:
323
324 3d/compare-eax-and 0x3c/imm32/less-than
325 74/jump-if-= $subx-sigils:error1/disp8
326 $subx-sigils:regular-word:
327
328
329 52/push-edx
330 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
331
332 e8/call write-slice-buffered/disp32
333
334 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
335
336 $subx-sigils:next-word:
337
338
339 68/push Space/imm32
340 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
341
342 e8/call write-buffered/disp32
343
344 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
345
346 e9/jump $subx-sigils:word-loop/disp32
347 $subx-sigils:next-line:
348
349
350 68/push Newline/imm32
351 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
352
353 e8/call write-buffered/disp32
354
355 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
356
357 e9/jump $subx-sigils:line-loop/disp32
358 $subx-sigils:break:
359
360
361 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
362
363 e8/call flush/disp32
364
365 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
366 $subx-sigils:end:
367
368 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x214/imm32
369
370 5b/pop-to-ebx
371 5a/pop-to-edx
372 59/pop-to-ecx
373 58/pop-to-eax
374
375 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
376 5d/pop-to-ebp
377 c3/return
378
379 $subx-sigils:error1:
380
381
382
383 68/push "error: '"/imm32
384 68/push Stderr/imm32
385
386 e8/call write-buffered/disp32
387
388 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
389
390
391 50/push-eax
392 68/push Stderr/imm32
393
394 e8/call write-byte-buffered/disp32
395
396 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
397
398
399 68/push "' only permitted within '*(...)' in '"/imm32
400 68/push Stderr/imm32
401
402 e8/call write-buffered/disp32
403
404 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
405
406
407 51/push-ecx
408 68/push Stderr/imm32
409
410 e8/call write-stream-data/disp32
411
412 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
413
414
415 68/push "'"/imm32
416 68/push Stderr/imm32
417
418 e8/call write-buffered/disp32
419
420 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
421
422
423 68/push Stderr/imm32
424
425 e8/call flush/disp32
426
427 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
428
429 bb/copy-to-ebx 1/imm32
430 e8/call syscall_exit/disp32
431
432
433 test-subx-sigils-passes-most-words-through:
434
435 55/push-ebp
436 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
437
438
439
440 68/push _test-input-stream/imm32
441
442 e8/call clear-stream/disp32
443
444 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
445
446
447 68/push $_test-input-buffered-file->buffer/imm32
448
449 e8/call clear-stream/disp32
450
451 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
452
453
454 68/push _test-output-stream/imm32
455
456 e8/call clear-stream/disp32
457
458 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
459
460
461 68/push $_test-output-buffered-file->buffer/imm32
462
463 e8/call clear-stream/disp32
464
465 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
466
467
468
469 68/push "== abcd 0x1"/imm32
470 68/push _test-input-stream/imm32
471
472 e8/call write/disp32
473
474 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
475
476
477 68/push _test-output-buffered-file/imm32
478 68/push _test-input-buffered-file/imm32
479
480 e8/call subx-sigils/disp32
481
482 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
483
484
485
486 68/push _test-output-buffered-file/imm32
487
488 e8/call flush/disp32
489
490 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
491 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
517
518
519 68/push "F - test-subx-sigils-passes-most-words-through"/imm32
520 68/push "== abcd 0x1 \n"/imm32
521 68/push _test-output-stream/imm32
522
523 e8/call check-stream-equal/disp32
524
525 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
526
527 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
528 5d/pop-to-ebp
529 c3/return
530
531 test-subx-sigils-direct-mode:
532
533 55/push-ebp
534 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
535
536
537
538 68/push _test-input-stream/imm32
539
540 e8/call clear-stream/disp32
541
542 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
543
544
545 68/push $_test-input-buffered-file->buffer/imm32
546
547 e8/call clear-stream/disp32
548
549 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
550
551
552 68/push _test-output-stream/imm32
553
554 e8/call clear-stream/disp32
555
556 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
557
558
559 68/push $_test-output-buffered-file->buffer/imm32
560
561 e8/call clear-stream/disp32
562
563 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
564
565
566
567 68/push "ab %ecx"/imm32
568 68/push _test-input-stream/imm32
569
570 e8/call write/disp32
571
572 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
573
574
575 68/push _test-output-buffered-file/imm32
576 68/push _test-input-buffered-file/imm32
577
578 e8/call subx-sigils/disp32
579
580 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
581
582
583
584 68/push _test-output-buffered-file/imm32
585
586 e8/call flush/disp32
587
588 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
589 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
615
616
617 68/push "F - test-subx-sigils-direct-mode"/imm32
618 68/push "ab 3/mod/direct 0x00000001/rm32 \n"/imm32
619 68/push _test-output-stream/imm32
620
621 e8/call check-stream-equal/disp32
622
623 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
624
625 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
626 5d/pop-to-ebp
627 c3/return
628
629 test-subx-sigils-direct-mode-with-metadata:
630
631 55/push-ebp
632 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
633
634
635
636 68/push _test-input-stream/imm32
637
638 e8/call clear-stream/disp32
639
640 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
641
642
643 68/push $_test-input-buffered-file->buffer/imm32
644
645 e8/call clear-stream/disp32
646
647 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
648
649
650 68/push _test-output-stream/imm32
651
652 e8/call clear-stream/disp32
653
654 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
655
656
657 68/push $_test-output-buffered-file->buffer/imm32
658
659 e8/call clear-stream/disp32
660
661 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
662
663
664
665 68/push "ab %ecx/foo"/imm32
666 68/push _test-input-stream/imm32
667
668 e8/call write/disp32
669
670 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
671
672
673 68/push _test-output-buffered-file/imm32
674 68/push _test-input-buffered-file/imm32
675
676 e8/call subx-sigils/disp32
677
678 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
679
680
681
682 68/push _test-output-buffered-file/imm32
683
684 e8/call flush/disp32
685
686 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
687
688
689 68/push "F - test-subx-sigils-direct-mode-with-metadata"/imm32
690 68/push "ab 3/mod/direct 0x00000001/rm32 \n"/imm32
691 68/push _test-output-stream/imm32
692
693 e8/call check-stream-equal/disp32
694
695 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
696
697 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
698 5d/pop-to-ebp
699 c3/return
700
701 test-subx-sigils-register-indirect-mode:
702
703 55/push-ebp
704 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
705
706
707
708 68/push _test-input-stream/imm32
709
710 e8/call clear-stream/disp32
711
712 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
713
714
715 68/push $_test-input-buffered-file->buffer/imm32
716
717 e8/call clear-stream/disp32
718
719 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
720
721
722 68/push _test-output-stream/imm32
723
724 e8/call clear-stream/disp32
725
726 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
727
728
729 68/push $_test-output-buffered-file->buffer/imm32
730
731 e8/call clear-stream/disp32
732
733 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
734
735
736
737 68/push "ab *ecx"/imm32
738 68/push _test-input-stream/imm32
739
740 e8/call write/disp32
741
742 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
743
744
745 68/push _test-output-buffered-file/imm32
746 68/push _test-input-buffered-file/imm32
747
748 e8/call subx-sigils/disp32
749
750 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
751
752
753
754 68/push _test-output-buffered-file/imm32
755
756 e8/call flush/disp32
757
758 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
759 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
785
786
787 68/push "F - test-subx-sigils-register-indirect-mode"/imm32
788 68/push "ab 0/mod/indirect 0x00000001/rm32 \n"/imm32
789 68/push _test-output-stream/imm32
790
791 e8/call check-stream-equal/disp32
792
793 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
794
795 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
796 5d/pop-to-ebp
797 c3/return
798
799 test-subx-sigils-register-indirect-mode-with-metadata:
800
801 55/push-ebp
802 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
803
804
805
806 68/push _test-input-stream/imm32
807
808 e8/call clear-stream/disp32
809
810 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
811
812
813 68/push $_test-input-buffered-file->buffer/imm32
814
815 e8/call clear-stream/disp32
816
817 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
818
819
820 68/push _test-output-stream/imm32
821
822 e8/call clear-stream/disp32
823
824 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
825
826
827 68/push $_test-output-buffered-file->buffer/imm32
828
829 e8/call clear-stream/disp32
830
831 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
832
833
834
835 68/push "ab *ecx/foo"/imm32
836 68/push _test-input-stream/imm32
837
838 e8/call write/disp32
839
840 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
841
842
843 68/push _test-output-buffered-file/imm32
844 68/push _test-input-buffered-file/imm32
845
846 e8/call subx-sigils/disp32
847
848 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
849
850
851
852 68/push _test-output-buffered-file/imm32
853
854 e8/call flush/disp32
855
856 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
857
858
859 68/push "F - test-subx-sigils-register-indirect-mode-with-metadata"/imm32
860 68/push "ab 0/mod/indirect 0x00000001/rm32 \n"/imm32
861 68/push _test-output-stream/imm32
862
863 e8/call check-stream-equal/disp32
864
865 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
866
867 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
868 5d/pop-to-ebp
869 c3/return
870
871 test-subx-sigils-register-indirect-mode-without-displacement:
872
873 55/push-ebp
874 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
875
876
877
878 68/push _test-input-stream/imm32
879
880 e8/call clear-stream/disp32
881
882 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
883
884
885 68/push $_test-input-buffered-file->buffer/imm32
886
887 e8/call clear-stream/disp32
888
889 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
890
891
892 68/push _test-output-stream/imm32
893
894 e8/call clear-stream/disp32
895
896 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
897
898
899 68/push $_test-output-buffered-file->buffer/imm32
900
901 e8/call clear-stream/disp32
902
903 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
904
905
906
907 68/push "ab *(ecx)"/imm32
908 68/push _test-input-stream/imm32
909
910 e8/call write/disp32
911
912 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
913
914
915 68/push _test-output-buffered-file/imm32
916 68/push _test-input-buffered-file/imm32
917
918 e8/call subx-sigils/disp32
919
920 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
921
922
923
924 68/push _test-output-buffered-file/imm32
925
926 e8/call flush/disp32
927
928 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
929 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
955
956
957 68/push "F - test-subx-sigils-register-indirect-mode-without-displacement"/imm32
958 68/push "ab 0/mod/indirect 0x00000001/rm32 \n"/imm32
959 68/push _test-output-stream/imm32
960
961 e8/call check-stream-equal/disp32
962
963 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
964
965 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
966 5d/pop-to-ebp
967 c3/return
968
969 test-subx-sigils-register-indirect-mode-with-displacement:
970
971 55/push-ebp
972 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
973
974
975
976 68/push _test-input-stream/imm32
977
978 e8/call clear-stream/disp32
979
980 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
981
982
983 68/push $_test-input-buffered-file->buffer/imm32
984
985 e8/call clear-stream/disp32
986
987 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
988
989
990 68/push _test-output-stream/imm32
991
992 e8/call clear-stream/disp32
993
994 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
995
996
997 68/push $_test-output-buffered-file->buffer/imm32
998
999 e8/call clear-stream/disp32
1000
1001 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1002
1003
1004
1005 68/push "ab *(ecx+4)"/imm32
1006 68/push _test-input-stream/imm32
1007
1008 e8/call write/disp32
1009
1010 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1011
1012
1013 68/push _test-output-buffered-file/imm32
1014 68/push _test-input-buffered-file/imm32
1015
1016 e8/call subx-sigils/disp32
1017
1018 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1019
1020
1021
1022 68/push _test-output-buffered-file/imm32
1023
1024 e8/call flush/disp32
1025
1026 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1027 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1053
1054
1055 68/push "F - test-subx-sigils-register-indirect-mode-with-displacement"/imm32
1056 68/push "ab 2/mod/*+disp32 0x00000001/rm32 0x00000004/disp32 \n"/imm32
1057 68/push _test-output-stream/imm32
1058
1059 e8/call check-stream-equal/disp32
1060
1061 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1062
1063 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1064 5d/pop-to-ebp
1065 c3/return
1066
1067
1068 test-subx-sigils-register-indirect-mode-with-sib-byte:
1069
1070 55/push-ebp
1071 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1072
1073
1074
1075 68/push _test-input-stream/imm32
1076
1077 e8/call clear-stream/disp32
1078
1079 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1080
1081
1082 68/push $_test-input-buffered-file->buffer/imm32
1083
1084 e8/call clear-stream/disp32
1085
1086 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1087
1088
1089 68/push _test-output-stream/imm32
1090
1091 e8/call clear-stream/disp32
1092
1093 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1094
1095
1096 68/push $_test-output-buffered-file->buffer/imm32
1097
1098 e8/call clear-stream/disp32
1099
1100 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1101
1102
1103
1104 68/push "ab *(ecx + edx<<3 + 4)"/imm32
1105 68/push _test-input-stream/imm32
1106
1107 e8/call write/disp32
1108
1109 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1110
1111
1112 68/push _test-output-buffered-file/imm32
1113 68/push _test-input-buffered-file/imm32
1114
1115 e8/call subx-sigils/disp32
1116
1117 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1118
1119
1120
1121 68/push _test-output-buffered-file/imm32
1122
1123 e8/call flush/disp32
1124
1125 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1126 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1152
1153
1154 68/push "F - test-subx-sigils-register-indirect-mode-with-sib-byte"/imm32
1155 68/push "ab 2/mod/*+disp32 4/rm32/sib 0x00000001/base 0x00000002/index 0x00000003/scale 0x00000004/disp32 \n"/imm32
1156 68/push _test-output-stream/imm32
1157
1158 e8/call check-stream-equal/disp32
1159
1160 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1161
1162 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1163 5d/pop-to-ebp
1164 c3/return
1165
1166 test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement:
1167
1168 55/push-ebp
1169 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1170
1171
1172
1173 68/push _test-input-stream/imm32
1174
1175 e8/call clear-stream/disp32
1176
1177 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1178
1179
1180 68/push $_test-input-buffered-file->buffer/imm32
1181
1182 e8/call clear-stream/disp32
1183
1184 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1185
1186
1187 68/push _test-output-stream/imm32
1188
1189 e8/call clear-stream/disp32
1190
1191 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1192
1193
1194 68/push $_test-output-buffered-file->buffer/imm32
1195
1196 e8/call clear-stream/disp32
1197
1198 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1199
1200
1201
1202 68/push "ab *(ecx + edx<<3 - 4)"/imm32
1203 68/push _test-input-stream/imm32
1204
1205 e8/call write/disp32
1206
1207 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1208
1209
1210 68/push _test-output-buffered-file/imm32
1211 68/push _test-input-buffered-file/imm32
1212
1213 e8/call subx-sigils/disp32
1214
1215 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1216
1217
1218
1219 68/push _test-output-buffered-file/imm32
1220
1221 e8/call flush/disp32
1222
1223 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1224 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1250
1251
1252 68/push "F - test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement"/imm32
1253 68/push "ab 2/mod/*+disp32 4/rm32/sib 0x00000001/base 0x00000002/index 0x00000003/scale 0xfffffffc/disp32 \n"/imm32
1254 68/push _test-output-stream/imm32
1255
1256 e8/call check-stream-equal/disp32
1257
1258 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1259
1260 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1261 5d/pop-to-ebp
1262 c3/return
1263
1264 test-subx-sigils-indirect-mode-without-register:
1265
1266 55/push-ebp
1267 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1268
1269
1270
1271 68/push _test-input-stream/imm32
1272
1273 e8/call clear-stream/disp32
1274
1275 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1276
1277
1278 68/push $_test-input-buffered-file->buffer/imm32
1279
1280 e8/call clear-stream/disp32
1281
1282 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1283
1284
1285 68/push _test-output-stream/imm32
1286
1287 e8/call clear-stream/disp32
1288
1289 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1290
1291
1292 68/push $_test-output-buffered-file->buffer/imm32
1293
1294 e8/call clear-stream/disp32
1295
1296 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1297
1298
1299
1300 68/push "ab *Foo"/imm32
1301 68/push _test-input-stream/imm32
1302
1303 e8/call write/disp32
1304
1305 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1306
1307
1308 68/push _test-output-buffered-file/imm32
1309 68/push _test-input-buffered-file/imm32
1310
1311 e8/call subx-sigils/disp32
1312
1313 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1314
1315
1316
1317 68/push _test-output-buffered-file/imm32
1318
1319 e8/call flush/disp32
1320
1321 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1322 +-- 26 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1348
1349
1350 68/push "F - test-subx-sigils-indirect-mode-without-register"/imm32
1351 68/push "ab 0/mod/indirect 5/rm32/.disp32 Foo/disp32 \n"/imm32
1352 68/push _test-output-stream/imm32
1353
1354 e8/call check-stream-equal/disp32
1355
1356 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1357
1358 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1359 5d/pop-to-ebp
1360 c3/return
1361
1362 emit-direct-mode:
1363
1364 55/push-ebp
1365 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1366
1367 50/push-eax
1368
1369 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 .
1370 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1371 ff 6/subop/push 0/mod/indirect 0/rm32/eax . . . . . .
1372 89/copy 3/mod/direct 0/rm32/eax . . . 4/r32/esp . .
1373
1374
1375 ff 0/subop/increment 0/mod/indirect 0/rm32/eax . . . . . .
1376 +-- 24 lines: #? # write-slice-buffered(Stderr, word-slice) -------------------------------------------------------------------------------------------------------------------------
1400
1401
1402 50/push-eax
1403 68/push 0x2f/imm32/slash
1404 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1405 ff 6/subop/push 0/mod/indirect 0/rm32/eax . . . . . .
1406
1407 e8/call next-token-from-slice/disp32
1408
1409 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1410
1411
1412 68/push "Registers"/imm32
1413 68/push 0xc/imm32/row-size
1414 50/push-eax
1415 68/push Registers/imm32
1416
1417 e8/call get-slice/disp32
1418
1419 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1420
1421
1422 68/push "3/mod/direct "/imm32
1423 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
1424
1425 e8/call write-buffered/disp32
1426
1427 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1428
1429
1430 ff 6/subop/push 0/mod/indirect 0/rm32/eax . . . . . .
1431 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
1432
1433 e8/call write-int32-hex-buffered/disp32
1434
1435 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1436
1437
1438 68/push "/rm32"/imm32
1439 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
1440
1441 e8/call write-buffered/disp32
1442
1443 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1444 $emit-direct-mode:end:
1445
1446 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1447
1448 58/pop-to-eax
1449
1450 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1451 5d/pop-to-ebp
1452 c3/return
1453
1454 test-emit-direct-mode:
1455
1456 55/push-ebp
1457 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1458
1459
1460
1461 68/push _test-output-stream/imm32
1462
1463 e8/call clear-stream/disp32
1464
1465 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1466
1467
1468 68/push $_test-output-buffered-file->buffer/imm32
1469
1470 e8/call clear-stream/disp32
1471
1472 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1473
1474 b8/copy-to-eax "%eax"/imm32
1475 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1476 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1477 05/add-to-eax 4/imm32
1478
1479 51/push-ecx
1480 50/push-eax
1481 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1482
1483
1484 51/push-ecx
1485 68/push _test-output-buffered-file/imm32
1486
1487 e8/call emit-direct-mode/disp32
1488
1489 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1490
1491
1492 68/push _test-output-buffered-file/imm32
1493
1494 e8/call flush/disp32
1495
1496 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1497 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
1523
1524
1525 68/push "F - test-emit-direct-mode/0"/imm32
1526 68/push "3/mod/direct 0x00000000/rm32"/imm32
1527 68/push _test-output-stream/imm32
1528
1529 e8/call check-stream-equal/disp32
1530
1531 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1532
1533 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1534 5d/pop-to-ebp
1535 c3/return
1536
1537 test-emit-direct-mode-2:
1538
1539 55/push-ebp
1540 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1541
1542
1543
1544 68/push _test-output-stream/imm32
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 $_test-output-buffered-file->buffer/imm32
1552
1553 e8/call clear-stream/disp32
1554
1555 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1556
1557 b8/copy-to-eax "%edi"/imm32
1558 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1559 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1560 05/add-to-eax 4/imm32
1561
1562 51/push-ecx
1563 50/push-eax
1564 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1565
1566
1567 51/push-ecx
1568 68/push _test-output-buffered-file/imm32
1569
1570 e8/call emit-direct-mode/disp32
1571
1572 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1573
1574
1575 68/push _test-output-buffered-file/imm32
1576
1577 e8/call flush/disp32
1578
1579 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1580 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
1606
1607
1608 68/push "F - test-emit-direct-mode/1"/imm32
1609 68/push "3/mod/direct 0x00000007/rm32"/imm32
1610 68/push _test-output-stream/imm32
1611
1612 e8/call check-stream-equal/disp32
1613
1614 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1615
1616 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1617 5d/pop-to-ebp
1618 c3/return
1619
1620
1621
1622
1623
1624
1625
1626 next-word-or-expression:
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654 55/push-ebp
1655 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1656
1657 50/push-eax
1658 51/push-ecx
1659 56/push-esi
1660 57/push-edi
1661
1662 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1663
1664 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0xc/disp8 .
1665
1666
1667 68/push 0x20/imm32/space
1668 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
1669
1670 e8/call skip-chars-matching/disp32
1671
1672 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1673 $next-word-or-expression:check0:
1674
1675
1676 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
1677
1678 3b/compare 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
1679 7c/jump-if-< $next-word-or-expression:check-for-comment/disp8
1680
1681 c7 0/subop/copy 0/mod/direct 7/rm32/edi . . . . . 0/imm32
1682 c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 0/imm32
1683 e9/jump $next-word-or-expression:end/disp32
1684 $next-word-or-expression:check-for-comment:
1685
1686 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/eax 0xc/disp8 .
1687 89/copy 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . .
1688
1689
1690 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
1691 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
1692
1693 3d/compare-eax-and 0x23/imm32/pound
1694 75/jump-if-!= $next-word-or-expression:check-for-string-literal/disp8
1695 $next-word-or-expression:comment:
1696
1697 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
1698 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 0/index/eax . 0/r32/eax 0xc/disp8 .
1699 89/copy 1/mod/*+disp8 7/rm32/edi . . . 0/r32/eax 4/disp8 .
1700
1701 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
1702 89/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 .
1703
1704 eb/jump $next-word-or-expression:end/disp8
1705 $next-word-or-expression:check-for-string-literal:
1706
1707 3d/compare-eax-and 0x22/imm32/dquote
1708 75/jump-if-!= $next-word-or-expression:check-for-expression/disp8
1709 $next-word-or-expression:string-literal:
1710
1711
1712 56/push-esi
1713
1714 e8/call skip-string/disp32
1715
1716 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1717
1718 eb/jump $next-word-or-expression:regular-word/disp8
1719 $next-word-or-expression:check-for-expression:
1720
1721 3d/compare-eax-and 0x2a/imm32/asterisk
1722 75/jump-if-!= $next-word-or-expression:regular-word/disp8
1723
1724 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xd/disp8 .
1725 3d/compare-eax-and 0x20/imm32/space
1726 74/jump-if-= $next-word-or-expression:error1/disp8
1727
1728 3d/compare-eax-and 0x28/imm32/open-paren
1729 75/jump-if-!= $next-word-or-expression:regular-word/disp8
1730 $next-word-or-expression:paren:
1731
1732
1733 56/push-esi
1734
1735 e8/call skip-until-close-paren/disp32
1736
1737 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1738
1739
1740 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
1741 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
1742
1743 3d/compare-eax-and 0x29/imm32/close-paren
1744 75/jump-if-!= $next-word-or-expression:error2/disp8
1745
1746 ff 0/subop/increment 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
1747
1748 $next-word-or-expression:regular-word:
1749
1750
1751 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
1752
1753 e8/call skip-chars-not-matching-whitespace/disp32
1754
1755 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1756
1757 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
1758 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/eax 0xc/disp8 .
1759 89/copy 1/mod/*+disp8 7/rm32/edi . . . 0/r32/eax 4/disp8 .
1760 $next-word-or-expression:end:
1761
1762 5f/pop-to-edi
1763 5e/pop-to-esi
1764 59/pop-to-ecx
1765 58/pop-to-eax
1766
1767 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1768 5d/pop-to-ebp
1769 c3/return
1770
1771 $next-word-or-expression:error1:
1772
1773
1774
1775 68/push "error: no space allowed after '*' in '"/imm32
1776 68/push Stderr/imm32
1777
1778 e8/call write-buffered/disp32
1779
1780 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1781
1782
1783 56/push-esi
1784 68/push Stderr/imm32
1785
1786 e8/call write-stream-data/disp32
1787
1788 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1789
1790
1791 68/push "'"/imm32
1792 68/push Stderr/imm32
1793
1794 e8/call write-buffered/disp32
1795
1796 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1797
1798
1799 68/push Stderr/imm32
1800
1801 e8/call flush/disp32
1802
1803 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1804
1805 bb/copy-to-ebx 1/imm32
1806 e8/call syscall_exit/disp32
1807
1808
1809 $next-word-or-expression:error2:
1810
1811
1812
1813 68/push "error: *(...) expression must be all on a single line in '"/imm32
1814 68/push Stderr/imm32
1815
1816 e8/call write-buffered/disp32
1817
1818 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1819
1820
1821 56/push-esi
1822 68/push Stderr/imm32
1823
1824 e8/call write-stream-data/disp32
1825
1826 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1827
1828
1829 68/push "'"/imm32
1830 68/push Stderr/imm32
1831
1832 e8/call write-buffered/disp32
1833
1834 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1835
1836
1837 68/push Stderr/imm32
1838
1839 e8/call flush/disp32
1840
1841 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1842
1843 bb/copy-to-ebx 1/imm32
1844 e8/call syscall_exit/disp32
1845
1846
1847 test-next-word-or-expression:
1848
1849 55/push-ebp
1850 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1851
1852
1853
1854 68/push _test-input-stream/imm32
1855
1856 e8/call clear-stream/disp32
1857
1858 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1859
1860 68/push 0/imm32/end
1861 68/push 0/imm32/start
1862 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1863
1864
1865 68/push " ab"/imm32
1866 68/push _test-input-stream/imm32
1867
1868 e8/call write/disp32
1869
1870 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1871
1872
1873 51/push-ecx
1874 68/push _test-input-stream/imm32
1875
1876 e8/call next-word-or-expression/disp32
1877
1878 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1879
1880
1881 68/push "F - test-next-word-or-expression/updates-stream-read-correctly"/imm32
1882 68/push 4/imm32
1883 b8/copy-to-eax _test-input-stream/imm32
1884 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1885
1886 e8/call check-ints-equal/disp32
1887
1888 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1889
1890
1891
1892 68/push "F - test-next-word-or-expression: start"/imm32
1893 68/push 0xe/imm32
1894
1895 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
1896 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
1897 50/push-eax
1898
1899 e8/call check-ints-equal/disp32
1900
1901 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1902
1903
1904
1905 68/push "F - test-next-word-or-expression: end"/imm32
1906 68/push 0x10/imm32
1907
1908 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1909 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
1910 50/push-eax
1911
1912 e8/call check-ints-equal/disp32
1913
1914 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1915
1916 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1917 5d/pop-to-ebp
1918 c3/return
1919
1920 test-next-word-or-expression-returns-whole-comment:
1921
1922 55/push-ebp
1923 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1924
1925
1926
1927 68/push _test-input-stream/imm32
1928
1929 e8/call clear-stream/disp32
1930
1931 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1932
1933 68/push 0/imm32/end
1934 68/push 0/imm32/start
1935 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1936
1937
1938 68/push " # a"/imm32
1939 68/push _test-input-stream/imm32
1940
1941 e8/call write/disp32
1942
1943 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1944
1945
1946 51/push-ecx
1947 68/push _test-input-stream/imm32
1948
1949 e8/call next-word-or-expression/disp32
1950
1951 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1952
1953
1954 68/push "F - test-next-word-or-expression-returns-whole-comment/updates-stream-read-correctly"/imm32
1955 68/push 5/imm32
1956 b8/copy-to-eax _test-input-stream/imm32
1957 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1958
1959 e8/call check-ints-equal/disp32
1960
1961 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1962
1963
1964
1965 68/push "F - test-next-word-or-expression-returns-whole-comment: start"/imm32
1966 68/push 0xe/imm32
1967
1968 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
1969 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
1970 50/push-eax
1971
1972 e8/call check-ints-equal/disp32
1973
1974 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1975
1976
1977
1978 68/push "F - test-next-word-or-expression-returns-whole-comment: end"/imm32
1979 68/push 0x11/imm32
1980
1981 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1982 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
1983 50/push-eax
1984
1985 e8/call check-ints-equal/disp32
1986
1987 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1988
1989 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1990 5d/pop-to-ebp
1991 c3/return
1992
1993 test-next-word-or-expression-returns-empty-slice-on-eof:
1994
1995 55/push-ebp
1996 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1997
1998
1999
2000 68/push _test-input-stream/imm32
2001
2002 e8/call clear-stream/disp32
2003
2004 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2005
2006 68/push 0/imm32/end
2007 68/push 0/imm32/start
2008 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2009
2010
2011
2012 51/push-ecx
2013 68/push _test-input-stream/imm32
2014
2015 e8/call next-word-or-expression/disp32
2016
2017 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2018
2019
2020 68/push "F - test-next-word-or-expression-returns-empty-expression-on-eof"/imm32
2021 68/push 0/imm32
2022
2023 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
2024 2b/subtract 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
2025 50/push-eax
2026
2027 e8/call check-ints-equal/disp32
2028
2029 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2030
2031 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2032 5d/pop-to-ebp
2033 c3/return
2034
2035 test-next-word-or-expression-returns-string-literal:
2036
2037 55/push-ebp
2038 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2039
2040
2041
2042 68/push _test-input-stream/imm32
2043
2044 e8/call clear-stream/disp32
2045
2046 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2047
2048 68/push 0/imm32/end
2049 68/push 0/imm32/start
2050 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2051
2052
2053 68/push " \"a b\"/imm32 "/imm32
2054 68/push _test-input-stream/imm32
2055
2056 e8/call write/disp32
2057
2058 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2059
2060
2061 51/push-ecx
2062 68/push _test-input-stream/imm32
2063
2064 e8/call next-word-or-expression/disp32
2065
2066 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2067
2068
2069
2070 68/push "F - test-next-word-or-expression-returns-string-literal: start"/imm32
2071 68/push 0xd/imm32
2072
2073 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
2074 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2075 50/push-eax
2076
2077 e8/call check-ints-equal/disp32
2078
2079 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2080
2081
2082
2083 68/push "F - test-next-word-or-expression-returns-string-literal: end"/imm32
2084 68/push 0x18/imm32
2085
2086 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
2087 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2088 50/push-eax
2089
2090 e8/call check-ints-equal/disp32
2091
2092 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2093
2094 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2095 5d/pop-to-ebp
2096 c3/return
2097
2098 test-next-word-or-expression-returns-string-with-escapes:
2099
2100 55/push-ebp
2101 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2102
2103
2104
2105 68/push _test-input-stream/imm32
2106
2107 e8/call clear-stream/disp32
2108
2109 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2110
2111 68/push 0/imm32/end
2112 68/push 0/imm32/start
2113 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2114
2115
2116 68/push " \"a\\\"b\"/x"/imm32
2117 68/push _test-input-stream/imm32
2118
2119 e8/call write/disp32
2120
2121 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2122
2123
2124 51/push-ecx
2125 68/push _test-input-stream/imm32
2126
2127 e8/call next-word-or-expression/disp32
2128
2129 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2130
2131
2132
2133 68/push "F - test-next-word-or-expression-returns-string-with-escapes: start"/imm32
2134 68/push 0xd/imm32
2135
2136 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
2137 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2138 50/push-eax
2139
2140 e8/call check-ints-equal/disp32
2141
2142 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2143
2144
2145
2146 68/push "F - test-next-word-or-expression-returns-string-with-escapes: end"/imm32
2147 68/push 0x15/imm32
2148
2149 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
2150 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2151 50/push-eax
2152
2153 e8/call check-ints-equal/disp32
2154
2155 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2156
2157 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2158 5d/pop-to-ebp
2159 c3/return
2160
2161 test-next-word-or-expression-returns-whole-expression:
2162
2163 55/push-ebp
2164 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2165
2166
2167
2168 68/push _test-input-stream/imm32
2169
2170 e8/call clear-stream/disp32
2171
2172 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2173
2174 68/push 0/imm32/end
2175 68/push 0/imm32/start
2176 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2177
2178
2179 68/push " *(a b)/imm32 "/imm32
2180 68/push _test-input-stream/imm32
2181
2182 e8/call write/disp32
2183
2184 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2185
2186
2187 51/push-ecx
2188 68/push _test-input-stream/imm32
2189
2190 e8/call next-word-or-expression/disp32
2191
2192 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2193
2194
2195
2196 68/push "F - test-next-word-or-expression-returns-whole-expression: start"/imm32
2197 68/push 0xd/imm32
2198
2199 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . .
2200 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2201 50/push-eax
2202
2203 e8/call check-ints-equal/disp32
2204
2205 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2206
2207
2208
2209 68/push "F - test-next-word-or-expression-returns-whole-expression: end"/imm32
2210 68/push 0x19/imm32
2211
2212 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
2213 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32
2214 50/push-eax
2215
2216 e8/call check-ints-equal/disp32
2217
2218 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2219
2220 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2221 5d/pop-to-ebp
2222 c3/return
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232 parse-effective-address:
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270 55/push-ebp
2271 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2272
2273 56/push-esi
2274 57/push-edi
2275
2276 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
2277 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2278 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2279 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . .
2280
2281 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
2282
2283
2284 bf/copy-to-edi 0/imm32
2285 b9/copy-to-ecx 4/imm32/no-index
2286 ba/copy-to-edx 0/imm32/.scale
2287 bb/copy-to-ebx 0/imm32/disp
2288 $parse-effective-address:check-for-simple-register:
2289
2290 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2291 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2292 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2293 3d/compare-eax-and 0x28/imm32/open-paren
2294 74/jump-if-= $parse-effective-address:compound-expression/disp8
2295 $parse-effective-address:simple-register:
2296
2297
2298 56/push-esi
2299 68/push 0x2f/imm32/slash
2300 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2301 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2302
2303 e8/call next-token-from-slice/disp32
2304
2305 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2306
2307
2308
2309 68/push "Registers"/imm32
2310 68/push 0xc/imm32/row-size
2311 56/push-esi
2312 68/push Registers/imm32
2313
2314 e8/call get-slice/disp32
2315
2316 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2317
2318 8b/copy 0/mod/indirect 0/rm32/eax . . . 7/r32/edi . .
2319
2320 e9/jump $parse-effective-address:end/disp32
2321 $parse-effective-address:compound-expression:
2322
2323 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
2324
2325
2326
2327 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2328 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2329
2330 e8/call skip-chars-matching-whitespace-in-slice/disp32
2331
2332 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2333
2334 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2335
2336
2337
2338 56/push-esi
2339
2340 e8/call next-register/disp32
2341
2342 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2343
2344 8b/copy 0/mod/indirect 0/rm32/eax . . . 7/r32/edi . .
2345
2346
2347
2348 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2349 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2350
2351 e8/call skip-chars-matching-whitespace-in-slice/disp32
2352
2353 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2354
2355 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2356
2357 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2358 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2359 3d/compare-eax-and 0x29/imm32/close-paren
2360 0f 84/jump-if-= $parse-effective-address:end/disp32
2361
2362 3d/compare-eax-and 0x2d/imm32/minus
2363 0f 84/jump-if-= $parse-effective-address:displacement/disp32
2364
2365 3d/compare-eax-and 0x2b/imm32/plus
2366 0f 85/jump-if-!= $parse-effective-address:error1/disp32
2367 $parse-effective-address:check-for-index:
2368
2369 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
2370
2371
2372
2373 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2374 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2375
2376 e8/call skip-chars-matching-whitespace-in-slice/disp32
2377
2378 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2379
2380 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2381 $parse-effective-address:resolve-ambiguity:
2382
2383
2384 51/push-ecx
2385
2386
2387 89/copy 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
2388
2389 05/add-to-eax 3/imm32
2390
2391 50/push-eax
2392 51/push-ecx
2393
2394 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2395
2396
2397 68/push 0xc/imm32/row-size
2398 51/push-ecx
2399 68/push Registers/imm32
2400
2401 e8/call maybe-get-slice/disp32
2402
2403 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2404
2405 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2406
2407 59/pop-to-ecx
2408
2409 3d/compare-eax-and 0/imm32
2410 0f 84/jump-if-= $parse-effective-address:displacement/disp32
2411 $parse-effective-address:index:
2412
2413
2414
2415 56/push-esi
2416
2417 e8/call next-register/disp32
2418
2419 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2420
2421 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2422
2423
2424
2425 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2426 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2427
2428 e8/call skip-chars-matching-whitespace-in-slice/disp32
2429
2430 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2431
2432 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2433
2434 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2435 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2436 3d/compare-eax-and 0x29/imm32/close-paren
2437 0f 84/jump-if-= $parse-effective-address:end/disp32
2438 $parse-effective-address:check-for-scale:
2439
2440 3d/compare-eax-and 0x3c/imm32/less-than
2441 75/jump-if-!= $parse-effective-address:check-for-displacement/disp8
2442
2443 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
2444
2445 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2446 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2447 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2448 3d/compare-eax-and 0x3c/imm32/less-than
2449 0f 85/jump-if-!= $parse-effective-address:error2/disp32
2450
2451 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
2452
2453
2454
2455 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2456 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2457
2458 e8/call skip-chars-matching-whitespace-in-slice/disp32
2459
2460 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2461
2462 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2463 $parse-effective-address:scale:
2464
2465
2466
2467 56/push-esi
2468
2469 e8/call next-positive-hex-int/disp32
2470
2471 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2472
2473 89/copy 3/mod/direct 2/rm32/edx . . . 0/r32/eax . .
2474
2475
2476
2477 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2478 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2479
2480 e8/call skip-chars-matching-whitespace-in-slice/disp32
2481
2482 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2483
2484 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2485
2486 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2487 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2488 3d/compare-eax-and 0x29/imm32/close-paren
2489 74/jump-if-= $parse-effective-address:end/disp8
2490 $parse-effective-address:check-for-displacement:
2491
2492 3d/compare-eax-and 0x2b/imm32/plus
2493 74/jump-if-= $parse-effective-address:displacement/disp8
2494 3d/compare-eax-and 0x2d/imm32/minus
2495 74/jump-if-= $parse-effective-address:displacement/disp8
2496 e9/jump $parse-effective-address:error3/disp32
2497 $parse-effective-address:displacement:
2498
2499
2500
2501 56/push-esi
2502
2503 e8/call next-hex-int/disp32
2504
2505 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2506
2507 89/copy 3/mod/direct 3/rm32/ebx . . . 0/r32/eax . .
2508
2509
2510
2511 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
2512 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2513
2514 e8/call skip-chars-matching-whitespace-in-slice/disp32
2515
2516 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2517
2518 89/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2519
2520 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
2521 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
2522 3d/compare-eax-and 0x29/imm32/close-paren
2523 0f 85/jump-if-!= $parse-effective-address:error4/disp32
2524 $parse-effective-address:end:
2525
2526 89/copy 3/mod/direct 0/rm32/eax . . . 7/r32/edi . .
2527
2528 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2529
2530 5f/pop-to-edi
2531 5e/pop-to-esi
2532
2533 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2534 5d/pop-to-ebp
2535 c3/return
2536
2537 $parse-effective-address:error1:
2538
2539
2540
2541 68/push "error: unexpected character: "/imm32
2542 68/push Stderr/imm32
2543
2544 e8/call write-buffered/disp32
2545
2546 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2547
2548
2549 50/push-eax
2550 68/push Stderr/imm32
2551
2552 e8/call write-int32-hex-buffered/disp32
2553
2554 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2555
2556
2557 68/push Newline/imm32
2558 68/push Stderr/imm32
2559
2560 e8/call write-buffered/disp32
2561
2562 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2563
2564
2565 68/push Stderr/imm32
2566
2567 e8/call flush/disp32
2568
2569 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2570
2571 bb/copy-to-ebx 1/imm32
2572 e8/call syscall_exit/disp32
2573
2574
2575 $parse-effective-address:error2:
2576
2577
2578
2579 68/push "error: '<' can only be followed by '<' but got: "/imm32
2580 68/push Stderr/imm32
2581
2582 e8/call write-buffered/disp32
2583
2584 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2585
2586
2587 50/push-eax
2588 68/push Stderr/imm32
2589
2590 e8/call write-int32-hex-buffered/disp32
2591
2592 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2593
2594
2595 68/push Newline/imm32
2596 68/push Stderr/imm32
2597
2598 e8/call write-buffered/disp32
2599
2600 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2601
2602
2603 68/push Stderr/imm32
2604
2605 e8/call flush/disp32
2606
2607 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2608
2609 bb/copy-to-ebx 1/imm32
2610 e8/call syscall_exit/disp32
2611
2612
2613 $parse-effective-address:error3:
2614
2615
2616
2617 68/push "error: unexpected character before displacement: "/imm32
2618 68/push Stderr/imm32
2619
2620 e8/call write-buffered/disp32
2621
2622 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2623
2624
2625 50/push-eax
2626 68/push Stderr/imm32
2627
2628 e8/call write-int32-hex-buffered/disp32
2629
2630 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2631
2632
2633 68/push Newline/imm32
2634 68/push Stderr/imm32
2635
2636 e8/call write-buffered/disp32
2637
2638 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2639
2640
2641 68/push Stderr/imm32
2642
2643 e8/call flush/disp32
2644
2645 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2646
2647 bb/copy-to-ebx 1/imm32
2648 e8/call syscall_exit/disp32
2649
2650
2651 $parse-effective-address:error4:
2652
2653
2654
2655 68/push "error: unexpected character after displacement: "/imm32
2656 68/push Stderr/imm32
2657
2658 e8/call write-buffered/disp32
2659
2660 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2661
2662
2663 50/push-eax
2664 68/push Stderr/imm32
2665
2666 e8/call write-int32-hex-buffered/disp32
2667
2668 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2669
2670
2671 68/push "; expected ')' to wrap up\n"/imm32
2672 68/push Stderr/imm32
2673
2674 e8/call write-buffered/disp32
2675
2676 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2677
2678
2679 68/push Stderr/imm32
2680
2681 e8/call flush/disp32
2682
2683 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2684
2685 bb/copy-to-ebx 1/imm32
2686 e8/call syscall_exit/disp32
2687
2688
2689
2690
2691 next-register:
2692
2693 55/push-ebp
2694 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2695
2696 51/push-ecx
2697 56/push-esi
2698
2699 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
2700
2701 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
2702 05/add-to-eax 3/imm32
2703 50/push-eax
2704 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
2705 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2706
2707 81 0/subop/add 0/mod/indirect 6/rm32/esi . . . . . 3/imm32
2708
2709
2710 68/push "next-register"/imm32
2711 68/push 0xc/imm32/row-size
2712 51/push-ecx
2713 68/push Registers/imm32
2714
2715 e8/call get-slice/disp32
2716
2717 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2718 $next-register:end:
2719
2720 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2721
2722 5e/pop-to-esi
2723 59/pop-to-ecx
2724
2725 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2726 5d/pop-to-ebp
2727 c3/return
2728
2729 test-parse-effective-address-simple:
2730
2731 55/push-ebp
2732 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2733
2734 b8/copy-to-eax "*esi"/imm32
2735 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2736 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
2737 05/add-to-eax 4/imm32
2738
2739 51/push-ecx
2740 50/push-eax
2741 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2742
2743
2744 51/push-ecx
2745
2746 e8/call parse-effective-address/disp32
2747
2748 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2749
2750
2751
2752 68/push "F - test-parse-effective-address-simple/base"/imm32
2753 68/push 6/imm32/esi
2754 50/push-eax
2755
2756 e8/call check-ints-equal/disp32
2757
2758 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2759
2760
2761 68/push "F - test-parse-effective-address-simple/index"/imm32
2762 68/push 4/imm32/none
2763 51/push-ecx
2764
2765 e8/call check-ints-equal/disp32
2766
2767 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2768
2769
2770 68/push "F - test-parse-effective-address-simple/scale"/imm32
2771 68/push 0/imm32/none
2772 52/push-edx
2773
2774 e8/call check-ints-equal/disp32
2775
2776 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2777
2778
2779 68/push "F - test-parse-effective-address-simple/displacement"/imm32
2780 68/push 0/imm32/none
2781 53/push-ebx
2782
2783 e8/call check-ints-equal/disp32
2784
2785 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2786
2787 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2788 5d/pop-to-ebp
2789 c3/return
2790
2791 test-parse-effective-address-base:
2792
2793 55/push-ebp
2794 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2795
2796 b8/copy-to-eax "*(esi )"/imm32
2797 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2798 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
2799 05/add-to-eax 4/imm32
2800
2801 51/push-ecx
2802 50/push-eax
2803 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2804
2805
2806 51/push-ecx
2807
2808 e8/call parse-effective-address/disp32
2809
2810 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2811
2812
2813
2814 68/push "F - test-parse-effective-address-base/base"/imm32
2815 68/push 6/imm32/esi
2816 50/push-eax
2817
2818 e8/call check-ints-equal/disp32
2819
2820 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2821
2822
2823 68/push "F - test-parse-effective-address-base/index"/imm32
2824 68/push 4/imm32/none
2825 51/push-ecx
2826
2827 e8/call check-ints-equal/disp32
2828
2829 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2830
2831
2832 68/push "F - test-parse-effective-address-base/scale"/imm32
2833 68/push 0/imm32/none
2834 52/push-edx
2835
2836 e8/call check-ints-equal/disp32
2837
2838 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2839
2840
2841 68/push "F - test-parse-effective-address-base/displacement"/imm32
2842 68/push 0/imm32/none
2843 53/push-ebx
2844
2845 e8/call check-ints-equal/disp32
2846
2847 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2848
2849 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2850 5d/pop-to-ebp
2851 c3/return
2852
2853 test-parse-effective-address-base-displacement:
2854
2855 55/push-ebp
2856 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2857
2858 b8/copy-to-eax "*(esi+3)"/imm32
2859 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2860 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
2861 05/add-to-eax 4/imm32
2862
2863 51/push-ecx
2864 50/push-eax
2865 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2866
2867
2868 51/push-ecx
2869
2870 e8/call parse-effective-address/disp32
2871
2872 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2873
2874
2875
2876 68/push "F - test-parse-effective-address-base-displacement/base"/imm32
2877 68/push 6/imm32/esi
2878 50/push-eax
2879
2880 e8/call check-ints-equal/disp32
2881
2882 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2883
2884
2885 68/push "F - test-parse-effective-address-base-displacement/index"/imm32
2886 68/push 4/imm32/none
2887 51/push-ecx
2888
2889 e8/call check-ints-equal/disp32
2890
2891 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2892
2893
2894 68/push "F - test-parse-effective-address-base-displacement/scale"/imm32
2895 68/push 0/imm32/none
2896 52/push-edx
2897
2898 e8/call check-ints-equal/disp32
2899
2900 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2901
2902
2903 68/push "F - test-parse-effective-address-base-displacement/displacement"/imm32
2904 68/push 3/imm32
2905 53/push-ebx
2906
2907 e8/call check-ints-equal/disp32
2908
2909 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2910
2911 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2912 5d/pop-to-ebp
2913 c3/return
2914
2915 test-parse-effective-address-base-negative-displacement:
2916
2917 55/push-ebp
2918 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2919
2920 b8/copy-to-eax "*(esi-3)"/imm32
2921 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2922 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
2923 05/add-to-eax 4/imm32
2924
2925 51/push-ecx
2926 50/push-eax
2927 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2928
2929
2930 51/push-ecx
2931
2932 e8/call parse-effective-address/disp32
2933
2934 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2935
2936
2937
2938 68/push "F - test-parse-effective-address-base-negative-displacement/base"/imm32
2939 68/push 6/imm32/esi
2940 50/push-eax
2941
2942 e8/call check-ints-equal/disp32
2943
2944 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2945
2946
2947 68/push "F - test-parse-effective-address-base-negative-displacement/index"/imm32
2948 68/push 4/imm32/none
2949 51/push-ecx
2950
2951 e8/call check-ints-equal/disp32
2952
2953 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2954
2955
2956 68/push "F - test-parse-effective-address-base-negative-displacement/scale"/imm32
2957 68/push 0/imm32/none
2958 52/push-edx
2959
2960 e8/call check-ints-equal/disp32
2961
2962 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2963
2964
2965 68/push "F - test-parse-effective-address-base-negative-displacement/displacement"/imm32
2966 68/push -3/imm32
2967 53/push-ebx
2968
2969 e8/call check-ints-equal/disp32
2970
2971 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2972
2973 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2974 5d/pop-to-ebp
2975 c3/return
2976
2977 test-parse-effective-address-base-index:
2978
2979 55/push-ebp
2980 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2981
2982 b8/copy-to-eax "*(esi+ecx)"/imm32
2983 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
2984 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
2985 05/add-to-eax 4/imm32
2986
2987 51/push-ecx
2988 50/push-eax
2989 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2990
2991
2992 51/push-ecx
2993
2994 e8/call parse-effective-address/disp32
2995
2996 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
2997
2998
2999
3000 68/push "F - test-parse-effective-address-base-index/base"/imm32
3001 68/push 6/imm32/esi
3002 50/push-eax
3003
3004 e8/call check-ints-equal/disp32
3005
3006 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3007
3008
3009 68/push "F - test-parse-effective-address-base-index/index"/imm32
3010 68/push 1/imm32/none
3011 51/push-ecx
3012
3013 e8/call check-ints-equal/disp32
3014
3015 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3016
3017
3018 68/push "F - test-parse-effective-address-base-index/scale"/imm32
3019 68/push 0/imm32/none
3020 52/push-edx
3021
3022 e8/call check-ints-equal/disp32
3023
3024 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3025
3026
3027 68/push "F - test-parse-effective-address-base-index/displacement"/imm32
3028 68/push 0/imm32
3029 53/push-ebx
3030
3031 e8/call check-ints-equal/disp32
3032
3033 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3034
3035 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3036 5d/pop-to-ebp
3037 c3/return
3038
3039 test-parse-effective-address-base-index-scale:
3040
3041 55/push-ebp
3042 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3043
3044 b8/copy-to-eax "*(esi+ecx<<2)"/imm32
3045 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
3046 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
3047 05/add-to-eax 4/imm32
3048
3049 51/push-ecx
3050 50/push-eax
3051 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
3052
3053
3054 51/push-ecx
3055
3056 e8/call parse-effective-address/disp32
3057
3058 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3059
3060
3061
3062 68/push "F - test-parse-effective-address-base-index-scale/base"/imm32
3063 68/push 6/imm32/esi
3064 50/push-eax
3065
3066 e8/call check-ints-equal/disp32
3067
3068 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3069
3070
3071 68/push "F - test-parse-effective-address-base-index-scale/index"/imm32
3072 68/push 1/imm32/none
3073 51/push-ecx
3074
3075 e8/call check-ints-equal/disp32
3076
3077 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3078
3079
3080 68/push "F - test-parse-effective-address-base-index-scale/scale"/imm32
3081 68/push 2/imm32
3082 52/push-edx
3083
3084 e8/call check-ints-equal/disp32
3085
3086 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3087
3088
3089 68/push "F - test-parse-effective-address-base-index-scale/displacement"/imm32
3090 68/push 0/imm32
3091 53/push-ebx
3092
3093 e8/call check-ints-equal/disp32
3094
3095 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3096
3097 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3098 5d/pop-to-ebp
3099 c3/return
3100
3101 test-parse-effective-address-base-index-scale-displacement:
3102
3103 55/push-ebp
3104 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3105
3106 b8/copy-to-eax "*(esi + ecx<<2 - 0x34)"/imm32
3107 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
3108 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
3109 05/add-to-eax 4/imm32
3110
3111 51/push-ecx
3112 50/push-eax
3113 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
3114
3115
3116 51/push-ecx
3117
3118 e8/call parse-effective-address/disp32
3119
3120 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3121
3122
3123
3124 68/push "F - test-parse-effective-address-base-index-scale/base"/imm32
3125 68/push 6/imm32/esi
3126 50/push-eax
3127
3128 e8/call check-ints-equal/disp32
3129
3130 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3131
3132
3133 68/push "F - test-parse-effective-address-base-index-scale/index"/imm32
3134 68/push 1/imm32/none
3135 51/push-ecx
3136
3137 e8/call check-ints-equal/disp32
3138
3139 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3140
3141
3142 68/push "F - test-parse-effective-address-base-index-scale/scale"/imm32
3143 68/push 2/imm32
3144 52/push-edx
3145
3146 e8/call check-ints-equal/disp32
3147
3148 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3149
3150
3151 68/push "F - test-parse-effective-address-base-index-scale/displacement"/imm32
3152 68/push -0x34/imm32
3153 53/push-ebx
3154
3155 e8/call check-ints-equal/disp32
3156
3157 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3158
3159 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3160 5d/pop-to-ebp
3161 c3/return
3162
3163
3164
3165
3166
3167
3168
3169
3170 emit-indirect-mode:
3171
3172 55/push-ebp
3173 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3174 $emit-indirect-mode:check-for-ebp:
3175
3176 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 5/imm32
3177 74/jump-if-= $emit-indirect-mode:emit-sib/disp8
3178 $emit-indirect-mode:check-for-esp:
3179
3180 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 4/imm32
3181 74/jump-if-= $emit-indirect-mode:emit-sib/disp8
3182 $emit-indirect-mode:check-for-sib:
3183
3184 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 4/imm32
3185 0f 84/jump-if-= $emit-indirect-mode:check-for-disp/disp32
3186 $emit-indirect-mode:emit-sib:
3187
3188
3189
3190 68/push "2/mod/*+disp32 4/rm32/sib "/imm32
3191 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3192
3193 e8/call write-buffered/disp32
3194
3195 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3196
3197
3198 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
3199 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3200
3201 e8/call write-int32-hex-buffered/disp32
3202
3203 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3204
3205
3206 68/push "/base "/imm32
3207 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3208
3209 e8/call write-buffered/disp32
3210
3211 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3212
3213
3214 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
3215 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3216
3217 e8/call write-int32-hex-buffered/disp32
3218
3219 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3220
3221
3222 68/push "/index "/imm32
3223 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3224
3225 e8/call write-buffered/disp32
3226
3227 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3228
3229
3230 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
3231 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3232
3233 e8/call write-int32-hex-buffered/disp32
3234
3235 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3236
3237
3238 68/push "/scale "/imm32
3239 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3240
3241 e8/call write-buffered/disp32
3242
3243 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3244
3245
3246 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
3247 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3248
3249 e8/call write-int32-hex-buffered/disp32
3250
3251 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3252
3253
3254 68/push "/disp32"/imm32
3255 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3256
3257 e8/call write-buffered/disp32
3258
3259 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3260 e9/jump $emit-indirect-mode:end/disp32
3261 $emit-indirect-mode:check-for-disp:
3262
3263 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 0/imm32
3264 74/jump-if-= $emit-indirect-mode:emit-indirect/disp8
3265 $emit-indirect-mode:emit-disp:
3266
3267
3268
3269 68/push "2/mod/*+disp32 "/imm32
3270 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3271
3272 e8/call write-buffered/disp32
3273
3274 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3275
3276
3277 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
3278 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3279
3280 e8/call write-int32-hex-buffered/disp32
3281
3282 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3283
3284
3285 68/push "/rm32 "/imm32
3286 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3287
3288 e8/call write-buffered/disp32
3289
3290 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3291
3292
3293 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
3294 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3295
3296 e8/call write-int32-hex-buffered/disp32
3297
3298 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3299
3300
3301 68/push "/disp32"/imm32
3302 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3303
3304 e8/call write-buffered/disp32
3305
3306 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3307 eb/jump $emit-indirect-mode:end/disp8
3308 $emit-indirect-mode:emit-indirect:
3309
3310
3311
3312 68/push "0/mod/indirect "/imm32
3313 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3314
3315 e8/call write-buffered/disp32
3316
3317 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3318
3319
3320 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
3321 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3322
3323 e8/call write-int32-hex-buffered/disp32
3324
3325 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3326
3327
3328 68/push "/rm32"/imm32
3329 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3330
3331 e8/call write-buffered/disp32
3332
3333 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3334 $emit-indirect-mode:end:
3335
3336 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3337 5d/pop-to-ebp
3338 c3/return
3339
3340 test-emit-indirect-mode:
3341
3342 55/push-ebp
3343 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3344
3345
3346
3347 68/push _test-output-stream/imm32
3348
3349 e8/call clear-stream/disp32
3350
3351 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3352
3353
3354 68/push $_test-output-buffered-file->buffer/imm32
3355
3356 e8/call clear-stream/disp32
3357
3358 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3359
3360
3361 68/push 0/imm32/.disp
3362 68/push 0/imm32/.scale
3363 68/push 4/imm32/.index/none
3364 68/push 0/imm32/.base
3365 68/push _test-output-buffered-file/imm32
3366
3367 e8/call emit-indirect-mode/disp32
3368
3369 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3370
3371
3372 68/push _test-output-buffered-file/imm32
3373
3374 e8/call flush/disp32
3375
3376 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3377 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3403
3404
3405 68/push "F - test-emit-indirect-mode"/imm32
3406 68/push "0/mod/indirect 0x00000000/rm32"/imm32
3407 68/push _test-output-stream/imm32
3408
3409 e8/call check-stream-equal/disp32
3410
3411 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3412
3413 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3414 5d/pop-to-ebp
3415 c3/return
3416
3417 test-emit-indirect-mode-2:
3418
3419 55/push-ebp
3420 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3421
3422
3423
3424 68/push _test-output-stream/imm32
3425
3426 e8/call clear-stream/disp32
3427
3428 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3429
3430
3431 68/push $_test-output-buffered-file->buffer/imm32
3432
3433 e8/call clear-stream/disp32
3434
3435 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3436
3437
3438 68/push 0/imm32/.disp
3439 68/push 0/imm32/.scale
3440 68/push 4/imm32/.index/none
3441 68/push 7/imm32/.base
3442 68/push _test-output-buffered-file/imm32
3443
3444 e8/call emit-indirect-mode/disp32
3445
3446 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3447
3448
3449 68/push _test-output-buffered-file/imm32
3450
3451 e8/call flush/disp32
3452
3453 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3454 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3480
3481
3482 68/push "F - test-emit-indirect-mode-2"/imm32
3483 68/push "0/mod/indirect 0x00000007/rm32"/imm32
3484 68/push _test-output-stream/imm32
3485
3486 e8/call check-stream-equal/disp32
3487
3488 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3489
3490 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3491 5d/pop-to-ebp
3492 c3/return
3493
3494 test-emit-indirect-mode-with-disp:
3495
3496 55/push-ebp
3497 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3498
3499
3500
3501 68/push _test-output-stream/imm32
3502
3503 e8/call clear-stream/disp32
3504
3505 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3506
3507
3508 68/push $_test-output-buffered-file->buffer/imm32
3509
3510 e8/call clear-stream/disp32
3511
3512 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3513
3514
3515 68/push 4/imm32/.disp
3516 68/push 0/imm32/.scale
3517 68/push 4/imm32/.index/none
3518 68/push 6/imm32/.base
3519 68/push _test-output-buffered-file/imm32
3520
3521 e8/call emit-indirect-mode/disp32
3522
3523 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3524
3525
3526 68/push _test-output-buffered-file/imm32
3527
3528 e8/call flush/disp32
3529
3530 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3531 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3557
3558
3559 68/push "F - test-emit-indirect-mode-with-disp"/imm32
3560 68/push "2/mod/*+disp32 0x00000006/rm32 0x00000004/disp32"/imm32
3561 68/push _test-output-stream/imm32
3562
3563 e8/call check-stream-equal/disp32
3564
3565 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3566
3567 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3568 5d/pop-to-ebp
3569 c3/return
3570
3571 test-emit-indirect-mode-with-disp-negative:
3572
3573 55/push-ebp
3574 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3575
3576
3577
3578 68/push _test-output-stream/imm32
3579
3580 e8/call clear-stream/disp32
3581
3582 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3583
3584
3585 68/push $_test-output-buffered-file->buffer/imm32
3586
3587 e8/call clear-stream/disp32
3588
3589 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3590
3591
3592 68/push -4/imm32/.disp
3593 68/push 0/imm32/.scale
3594 68/push 4/imm32/.index/none
3595 68/push 6/imm32/.base
3596 68/push _test-output-buffered-file/imm32
3597
3598 e8/call emit-indirect-mode/disp32
3599
3600 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3601
3602
3603 68/push _test-output-buffered-file/imm32
3604
3605 e8/call flush/disp32
3606
3607 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3608 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3634
3635
3636 68/push "F - test-emit-indirect-mode-with-disp"/imm32
3637 68/push "2/mod/*+disp32 0x00000006/rm32 0xfffffffc/disp32"/imm32
3638 68/push _test-output-stream/imm32
3639
3640 e8/call check-stream-equal/disp32
3641
3642 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3643
3644 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3645 5d/pop-to-ebp
3646 c3/return
3647
3648 test-emit-indirect-mode-with-sib:
3649
3650 55/push-ebp
3651 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3652
3653
3654
3655 68/push _test-output-stream/imm32
3656
3657 e8/call clear-stream/disp32
3658
3659 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3660
3661
3662 68/push $_test-output-buffered-file->buffer/imm32
3663
3664 e8/call clear-stream/disp32
3665
3666 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3667
3668
3669 68/push 4/imm32/.disp
3670 68/push 2/imm32/.scale
3671 68/push 1/imm32/.index
3672 68/push 6/imm32/.base
3673 68/push _test-output-buffered-file/imm32
3674
3675 e8/call emit-indirect-mode/disp32
3676
3677 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3678
3679
3680 68/push _test-output-buffered-file/imm32
3681
3682 e8/call flush/disp32
3683
3684 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3685 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3711
3712
3713 68/push "F - test-emit-indirect-mode-with-sib"/imm32
3714 68/push "2/mod/*+disp32 4/rm32/sib 0x00000006/base 0x00000001/index 0x00000002/scale 0x00000004/disp32"/imm32
3715 68/push _test-output-stream/imm32
3716
3717 e8/call check-stream-equal/disp32
3718
3719 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3720
3721 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3722 5d/pop-to-ebp
3723 c3/return
3724
3725 test-emit-indirect-mode-ebp:
3726
3727 55/push-ebp
3728 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3729
3730
3731
3732 68/push _test-output-stream/imm32
3733
3734 e8/call clear-stream/disp32
3735
3736 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3737
3738
3739 68/push $_test-output-buffered-file->buffer/imm32
3740
3741 e8/call clear-stream/disp32
3742
3743 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3744
3745
3746 68/push 0/imm32/.disp
3747 68/push 0/imm32/.scale
3748 68/push 0/imm32/.index
3749 68/push 5/imm32/.base/ebp
3750 68/push _test-output-buffered-file/imm32
3751
3752 e8/call emit-indirect-mode/disp32
3753
3754 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3755
3756
3757 68/push _test-output-buffered-file/imm32
3758
3759 e8/call flush/disp32
3760
3761 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3762 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3788
3789
3790 68/push "F - test-emit-indirect-mode-ebp"/imm32
3791 68/push "2/mod/*+disp32 4/rm32/sib 0x00000005/base 0x00000000/index 0x00000000/scale 0x00000000/disp32"/imm32
3792 68/push _test-output-stream/imm32
3793
3794 e8/call check-stream-equal/disp32
3795
3796 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3797
3798 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3799 5d/pop-to-ebp
3800 c3/return
3801
3802 test-emit-indirect-mode-esp:
3803
3804 55/push-ebp
3805 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3806
3807
3808
3809 68/push _test-output-stream/imm32
3810
3811 e8/call clear-stream/disp32
3812
3813 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3814
3815
3816 68/push $_test-output-buffered-file->buffer/imm32
3817
3818 e8/call clear-stream/disp32
3819
3820 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3821
3822
3823 68/push 0/imm32/.disp
3824 68/push 0/imm32/.scale
3825 68/push 0/imm32/.index
3826 68/push 4/imm32/.base/esp
3827 68/push _test-output-buffered-file/imm32
3828
3829 e8/call emit-indirect-mode/disp32
3830
3831 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x14/imm32
3832
3833
3834 68/push _test-output-buffered-file/imm32
3835
3836 e8/call flush/disp32
3837
3838 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
3839 +-- 26 lines: #? # dump output ------------------------------------------------------------------------------------------------------------------------------------------------------
3865
3866
3867 68/push "F - test-emit-indirect-mode-esp"/imm32
3868 68/push "2/mod/*+disp32 4/rm32/sib 0x00000004/base 0x00000000/index 0x00000000/scale 0x00000000/disp32"/imm32
3869 68/push _test-output-stream/imm32
3870
3871 e8/call check-stream-equal/disp32
3872
3873 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3874
3875 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3876 5d/pop-to-ebp
3877 c3/return
3878
3879 disp32-mode?:
3880
3881 55/push-ebp
3882 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3883
3884 56/push-esi
3885 57/push-edi
3886
3887 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
3888 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
3889 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
3890 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . .
3891
3892 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
3893
3894 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
3895 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . .
3896 81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32
3897 3d/compare-eax-and 0x28/imm32/open-paren
3898 74/jump-if-= $disp32-mode?:false/disp8
3899 $disp32-mode?:check-for-register:
3900
3901
3902 56/push-esi
3903 68/push 0x2f/imm32/slash
3904 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
3905 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
3906
3907 e8/call next-token-from-slice/disp32
3908
3909 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
3910
3911
3912 68/push 0xc/imm32/row-size
3913 56/push-esi
3914 68/push Registers/imm32
3915
3916 e8/call maybe-get-slice/disp32
3917
3918 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
3919
3920 3d/compare-eax-and 0/imm32
3921 75/jump-if-!= $disp32-mode?:false/disp8
3922
3923 b8/copy-to-eax 1/imm32/true
3924 eb/jump $disp32-mode?:end/disp8
3925 $disp32-mode?:false:
3926 b8/copy-to-eax 0/imm32/false
3927 $disp32-mode?:end:
3928
3929 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3930
3931 5f/pop-to-edi
3932 5e/pop-to-esi
3933
3934 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3935 5d/pop-to-ebp
3936 c3/return
3937
3938 emit-indirect-disp32:
3939
3940 55/push-ebp
3941 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3942
3943 56/push-esi
3944
3945 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 .
3946 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
3947 ff 6/subop/push 0/mod/indirect 6/rm32/esi . . . . . .
3948 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . .
3949
3950 ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . .
3951
3952
3953 68/push "0/mod/indirect 5/rm32/.disp32 "/imm32
3954 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3955
3956 e8/call write-buffered/disp32
3957
3958 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3959
3960
3961 56/push-esi
3962 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3963
3964 e8/call write-slice-buffered/disp32
3965
3966 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3967
3968
3969 68/push "/disp32"/imm32
3970 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
3971
3972 e8/call write-buffered/disp32
3973
3974 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3975 $emit-indirect-disp32:end:
3976
3977 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
3978
3979 5e/pop-to-esi
3980
3981 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
3982 5d/pop-to-ebp
3983 c3/return
3984
3985
3986
3987
3988 next-hex-int:
3989
3990 55/push-ebp
3991 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
3992
3993 51/push-ecx
3994 52/push-edx
3995 53/push-ebx
3996 56/push-esi
3997 57/push-edi
3998
3999 31/xor 3/mod/direct 7/rm32/edi . . . 7/r32/edi . .
4000
4001 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
4002
4003 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 .
4004
4005 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
4006
4007 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
4008
4009 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
4010 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4011 $next-hex-int:positive:
4012
4013 3d/compare-eax-and 0x2b/imm32/+
4014 75/jump-if-!= $next-hex-int:negative/disp8
4015
4016 41/increment-ecx
4017 eb/jump $next-hex-int:skip-whitespace/disp8
4018 $next-hex-int:negative:
4019
4020 3d/compare-eax-and 0x2d/imm32/-
4021 75/jump-if-!= $next-hex-int:skip-whitespace/disp8
4022 $next-hex-int:need-to-negate:
4023
4024 41/increment-ecx
4025
4026 bb/copy-to-ebx 1/imm32/true
4027
4028 $next-hex-int:skip-whitespace:
4029
4030 50/push-eax
4031
4032
4033 52/push-edx
4034 51/push-ecx
4035
4036 e8/call skip-chars-matching-whitespace-in-slice/disp32
4037
4038 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
4039
4040 89/copy 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
4041
4042 58/pop-to-eax
4043 $next-hex-int:initial-0:
4044
4045
4046 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4047 3d/compare-eax-and 0x30/imm32/0
4048 75/jump-if-!= $next-hex-int:loop/disp8
4049
4050 41/increment-ecx
4051 $next-hex-int:initial-0x:
4052
4053 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
4054 73/jump-if-addr>= $next-hex-int:end/disp8
4055
4056 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
4057 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4058 3d/compare-eax-and 0x78/imm32/x
4059 75/jump-if-!= $next-hex-int:loop/disp8
4060
4061 41/increment-ecx
4062 $next-hex-int:loop:
4063
4064 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
4065 73/jump-if-addr>= $next-hex-int:break/disp8
4066
4067
4068 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4069
4070
4071 50/push-eax
4072
4073 e8/call is-hex-digit?/disp32
4074
4075 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4076
4077 3d/compare-eax-and 0/imm32/false
4078 74/jump-if-= $next-hex-int:break/disp8
4079
4080
4081 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4082
4083 e8/call from-hex-char/disp32
4084
4085 c1/shift 4/subop/left 3/mod/direct 7/rm32/edi . . . . . 4/imm8
4086 01/add 3/mod/direct 7/rm32/edi . . . 0/r32/eax . .
4087
4088 41/increment-ecx
4089
4090 eb/jump $next-hex-int:loop/disp8
4091 $next-hex-int:break:
4092
4093 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32/false
4094 74/jump-if-= $next-hex-int:end/disp8
4095 $next-hex-int:negate:
4096 f7 3/subop/negate 3/mod/direct 7/rm32/edi . . . . . .
4097 $next-hex-int:end:
4098
4099 89/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
4100
4101 89/copy 3/mod/direct 0/rm32/eax . . . 7/r32/edi . .
4102
4103 5f/pop-to-edi
4104 5e/pop-to-esi
4105 5b/pop-to-ebx
4106 5a/pop-to-edx
4107 59/pop-to-ecx
4108
4109 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4110 5d/pop-to-ebp
4111 c3/return
4112
4113 $next-hex-int:abort:
4114
4115
4116 68/push "next-hex-int: invalid hex char: "/imm32
4117 68/push 2/imm32/stderr
4118
4119 e8/call _write/disp32
4120
4121 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
4122
4123
4124 50/push-eax
4125
4126 68/push $Stderr->buffer/imm32
4127
4128 e8/call clear-stream/disp32
4129
4130 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4131
4132 58/pop-to-eax
4133
4134
4135 50/push-eax
4136 68/push Stderr/imm32
4137
4138 e8/call write-int32-hex-buffered/disp32
4139
4140 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
4141
4142
4143 68/push Stderr/imm32
4144
4145 e8/call flush/disp32
4146
4147 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4148
4149
4150 68/push Newline/imm32
4151 68/push 2/imm32/stderr
4152
4153 e8/call _write/disp32
4154
4155 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
4156
4157 bb/copy-to-ebx 1/imm32
4158 e8/call syscall_exit/disp32
4159
4160
4161 test-next-hex-int-single-digit:
4162
4163 55/push-ebp
4164 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4165
4166 b8/copy-to-eax "+a)"/imm32
4167 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4168 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4169 05/add-to-eax 4/imm32
4170
4171 51/push-ecx
4172 50/push-eax
4173 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4174
4175
4176 51/push-ecx
4177
4178 e8/call next-hex-int/disp32
4179
4180 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4181
4182
4183 68/push "F - test-next-hex-int-single-digit"/imm32
4184 68/push 0xa/imm32
4185 50/push-eax
4186
4187 e8/call check-ints-equal/disp32
4188
4189 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4190
4191 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4192 5d/pop-to-ebp
4193 c3/return
4194
4195 test-next-hex-int-multi-digit:
4196
4197 55/push-ebp
4198 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4199
4200 b8/copy-to-eax "+ 34a)"/imm32
4201 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4202 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4203 05/add-to-eax 4/imm32
4204
4205 51/push-ecx
4206 50/push-eax
4207 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4208
4209
4210 51/push-ecx
4211
4212 e8/call next-hex-int/disp32
4213
4214 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4215
4216
4217 68/push "F - test-next-hex-int-multi-digit"/imm32
4218 68/push 0x34a/imm32
4219 50/push-eax
4220
4221 e8/call check-ints-equal/disp32
4222
4223 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4224
4225 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4226 5d/pop-to-ebp
4227 c3/return
4228
4229 test-next-hex-int-0x-prefix:
4230
4231 55/push-ebp
4232 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4233
4234 b8/copy-to-eax "+0x34)"/imm32
4235 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4236 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4237 05/add-to-eax 4/imm32
4238
4239 51/push-ecx
4240 50/push-eax
4241 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4242
4243
4244 51/push-ecx
4245
4246 e8/call next-hex-int/disp32
4247
4248 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4249
4250
4251 68/push "F - test-next-hex-int-0x-prefix"/imm32
4252 68/push 0x34/imm32
4253 50/push-eax
4254
4255 e8/call check-ints-equal/disp32
4256
4257 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4258
4259 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4260 5d/pop-to-ebp
4261 c3/return
4262
4263 test-next-hex-int-zero:
4264
4265 55/push-ebp
4266 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4267
4268 b8/copy-to-eax "+0)"/imm32
4269 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4270 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4271 05/add-to-eax 4/imm32
4272
4273 51/push-ecx
4274 50/push-eax
4275 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4276
4277
4278 51/push-ecx
4279
4280 e8/call next-hex-int/disp32
4281
4282 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4283
4284
4285 68/push "F - test-next-hex-int-zero"/imm32
4286 68/push 0/imm32
4287 50/push-eax
4288
4289 e8/call check-ints-equal/disp32
4290
4291 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4292
4293 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4294 5d/pop-to-ebp
4295 c3/return
4296
4297 test-next-hex-int-0-prefix:
4298
4299 55/push-ebp
4300 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4301
4302 b8/copy-to-eax "+ 03)"/imm32
4303 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4304 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4305 05/add-to-eax 4/imm32
4306
4307 51/push-ecx
4308 50/push-eax
4309 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4310
4311
4312 51/push-ecx
4313
4314 e8/call next-hex-int/disp32
4315
4316 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4317
4318
4319 68/push "F - test-next-hex-int-0-prefix"/imm32
4320 68/push 3/imm32
4321 50/push-eax
4322
4323 e8/call check-ints-equal/disp32
4324
4325 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4326
4327 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4328 5d/pop-to-ebp
4329 c3/return
4330
4331 test-next-hex-int-negative:
4332
4333 55/push-ebp
4334 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4335
4336 b8/copy-to-eax "-03)"/imm32
4337 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4338 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4339 05/add-to-eax 4/imm32
4340
4341 51/push-ecx
4342 50/push-eax
4343 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4344
4345
4346 51/push-ecx
4347
4348 e8/call next-hex-int/disp32
4349
4350 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4351
4352
4353 68/push "F - test-next-hex-int-negative"/imm32
4354 68/push -3/imm32
4355 50/push-eax
4356
4357 e8/call check-ints-equal/disp32
4358
4359 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4360
4361 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4362 5d/pop-to-ebp
4363 c3/return
4364
4365 test-next-hex-int-negative-with-space:
4366
4367 55/push-ebp
4368 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4369
4370 b8/copy-to-eax "- 03)"/imm32
4371 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4372 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4373 05/add-to-eax 4/imm32
4374
4375 51/push-ecx
4376 50/push-eax
4377 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4378
4379
4380 51/push-ecx
4381
4382 e8/call next-hex-int/disp32
4383
4384 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4385
4386
4387 68/push "F - test-next-hex-int-negative-with-space"/imm32
4388 68/push -3/imm32
4389 50/push-eax
4390
4391 e8/call check-ints-equal/disp32
4392
4393 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4394
4395 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4396 5d/pop-to-ebp
4397 c3/return
4398
4399
4400
4401
4402 next-positive-hex-int:
4403
4404 55/push-ebp
4405 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4406
4407 51/push-ecx
4408 52/push-edx
4409 53/push-ebx
4410 56/push-esi
4411 57/push-edi
4412
4413 31/xor 3/mod/direct 7/rm32/edi . . . 7/r32/edi . .
4414
4415 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
4416
4417 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 .
4418
4419 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
4420
4421 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
4422
4423 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
4424 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4425 $next-positive-hex-int:initial-0:
4426
4427
4428 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4429 3d/compare-eax-and 0x30/imm32/0
4430 75/jump-if-!= $next-positive-hex-int:loop/disp8
4431
4432 41/increment-ecx
4433 $next-positive-hex-int:initial-0x:
4434
4435 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
4436 73/jump-if-addr>= $next-positive-hex-int:end/disp8
4437
4438 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
4439 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4440 3d/compare-eax-and 0x78/imm32/x
4441 75/jump-if-!= $next-positive-hex-int:loop/disp8
4442
4443 41/increment-ecx
4444 $next-positive-hex-int:loop:
4445
4446 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
4447 73/jump-if-addr>= $next-positive-hex-int:end/disp8
4448
4449
4450 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4451
4452
4453 50/push-eax
4454
4455 e8/call is-hex-digit?/disp32
4456
4457 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4458
4459 3d/compare-eax-and 0/imm32/false
4460 74/jump-if-= $next-positive-hex-int:end/disp8
4461
4462
4463 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
4464
4465 e8/call from-hex-char/disp32
4466
4467 c1/shift 4/subop/left 3/mod/direct 7/rm32/edi . . . . . 4/imm8
4468 01/add 3/mod/direct 7/rm32/edi . . . 0/r32/eax . .
4469
4470 41/increment-ecx
4471
4472 eb/jump $next-positive-hex-int:loop/disp8
4473 $next-positive-hex-int:end:
4474
4475 89/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
4476
4477 89/copy 3/mod/direct 0/rm32/eax . . . 7/r32/edi . .
4478
4479 5f/pop-to-edi
4480 5e/pop-to-esi
4481 5b/pop-to-ebx
4482 5a/pop-to-edx
4483 59/pop-to-ecx
4484
4485 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4486 5d/pop-to-ebp
4487 c3/return
4488
4489 test-next-positive-hex-int-single-digit:
4490
4491 55/push-ebp
4492 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4493
4494 b8/copy-to-eax "a)"/imm32
4495 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4496 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4497 05/add-to-eax 4/imm32
4498
4499 51/push-ecx
4500 50/push-eax
4501 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4502
4503
4504 51/push-ecx
4505
4506 e8/call next-positive-hex-int/disp32
4507
4508 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4509
4510
4511 68/push "F - test-next-positive-hex-int-single-digit"/imm32
4512 68/push 0xa/imm32
4513 50/push-eax
4514
4515 e8/call check-ints-equal/disp32
4516
4517 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4518
4519 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4520 5d/pop-to-ebp
4521 c3/return
4522
4523 test-next-positive-hex-int-multi-digit:
4524
4525 55/push-ebp
4526 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4527
4528 b8/copy-to-eax "34a)"/imm32
4529 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4530 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4531 05/add-to-eax 4/imm32
4532
4533 51/push-ecx
4534 50/push-eax
4535 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4536
4537
4538 51/push-ecx
4539
4540 e8/call next-positive-hex-int/disp32
4541
4542 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4543
4544
4545 68/push "F - test-next-positive-hex-int-multi-digit"/imm32
4546 68/push 0x34a/imm32
4547 50/push-eax
4548
4549 e8/call check-ints-equal/disp32
4550
4551 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4552
4553 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4554 5d/pop-to-ebp
4555 c3/return
4556
4557 test-next-positive-hex-int-0x-prefix:
4558
4559 55/push-ebp
4560 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4561
4562 b8/copy-to-eax "0x34)"/imm32
4563 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4564 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4565 05/add-to-eax 4/imm32
4566
4567 51/push-ecx
4568 50/push-eax
4569 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4570
4571
4572 51/push-ecx
4573
4574 e8/call next-positive-hex-int/disp32
4575
4576 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4577
4578
4579 68/push "F - test-next-positive-hex-int-0x-prefix"/imm32
4580 68/push 0x34/imm32
4581 50/push-eax
4582
4583 e8/call check-ints-equal/disp32
4584
4585 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4586
4587 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4588 5d/pop-to-ebp
4589 c3/return
4590
4591 test-next-positive-hex-int-zero:
4592
4593 55/push-ebp
4594 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4595
4596 b8/copy-to-eax "0"/imm32
4597 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4598 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4599 05/add-to-eax 4/imm32
4600
4601 51/push-ecx
4602 50/push-eax
4603 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4604
4605
4606 51/push-ecx
4607
4608 e8/call next-positive-hex-int/disp32
4609
4610 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4611
4612
4613 68/push "F - test-next-positive-hex-int-zero"/imm32
4614 68/push 0/imm32
4615 50/push-eax
4616
4617 e8/call check-ints-equal/disp32
4618
4619 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4620
4621 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4622 5d/pop-to-ebp
4623 c3/return
4624
4625 test-next-positive-hex-int-0-prefix:
4626
4627 55/push-ebp
4628 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
4629
4630 b8/copy-to-eax "03)"/imm32
4631 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
4632 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
4633 05/add-to-eax 4/imm32
4634
4635 51/push-ecx
4636 50/push-eax
4637 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
4638
4639
4640 51/push-ecx
4641
4642 e8/call next-positive-hex-int/disp32
4643
4644 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
4645
4646
4647 68/push "F - test-next-positive-hex-int-0-prefix"/imm32
4648 68/push 3/imm32
4649 50/push-eax
4650
4651 e8/call check-ints-equal/disp32
4652
4653 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
4654
4655 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
4656 5d/pop-to-ebp
4657 c3/return
4658
4659