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