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