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