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