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