https://github.com/akkartik/mu/blob/main/linux/131table.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 == code
21
22
23
24
25
26 get:
27
28
29
30
31
32
33
34
35
36
37
38 55/push-ebp
39 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
40
41 51/push-ecx
42 52/push-edx
43 56/push-esi
44
45 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
46
47 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
48
49 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
50 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
51 $get:search-loop:
52
53 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
54 73/jump-if-addr>= $get:abort/disp8
55
56
57 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
58 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
59
60 e8/call lookup/disp32
61
62 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
63
64
65
66 50/push-eax
67 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
68
69 e8/call string-equal?/disp32
70
71 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
72
73 3d/compare-eax-and 0/imm32/false
74 74/jump-if-= $get:mismatch/disp8
75 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
76 eb/jump $get:end/disp8
77 $get:mismatch:
78
79 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
80
81 eb/jump $get:search-loop/disp8
82 $get:end:
83
84 5e/pop-to-esi
85 5a/pop-to-edx
86 59/pop-to-ecx
87
88 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
89 5d/pop-to-ebp
90 c3/return
91
92 $get:abort:
93
94
95 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
96 68/push 2/imm32/stderr
97
98 e8/call _write/disp32
99
100 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
101
102
103 68/push ": get: key not found: "/imm32
104 68/push 2/imm32/stderr
105
106 e8/call _write/disp32
107
108 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
109
110
111 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
112 68/push 2/imm32/stderr
113
114 e8/call _write/disp32
115
116 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
117
118
119 68/push Newline/imm32
120 68/push 2/imm32/stderr
121
122 e8/call _write/disp32
123
124 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
125
126 bb/copy-to-ebx 1/imm32
127 e8/call syscall_exit/disp32
128
129
130 test-get:
131
132 55/push-ebp
133 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
134
135
136 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
137 68/push 0x18/imm32/size
138 68/push 0/imm32/read
139 68/push 0/imm32/write
140 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
141
142
143 68/push Heap/imm32
144 68/push 0xc/imm32/row-size
145 68/push "code"/imm32
146 51/push-ecx
147
148 e8/call get-or-insert/disp32
149
150 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
151
152
153 68/push Heap/imm32
154 68/push 0xc/imm32/row-size
155 68/push "data"/imm32
156 51/push-ecx
157
158 e8/call get-or-insert/disp32
159
160 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
161 $test-get:check1:
162
163
164 68/push 0xc/imm32/row-size
165 68/push "code"/imm32
166 51/push-ecx
167
168 e8/call get/disp32
169
170 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
171
172
173
174 68/push "F - test-get/0"/imm32
175 68/push 0x14/imm32
176 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
177 50/push-eax
178
179 e8/call check-ints-equal/disp32
180
181 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
182 $test-get:check2:
183
184
185 68/push 0xc/imm32/row-size
186 68/push "data"/imm32
187 51/push-ecx
188
189 e8/call get/disp32
190
191 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
192
193
194
195 68/push "F - test-get/1"/imm32
196 68/push 0x20/imm32
197 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
198 50/push-eax
199
200 e8/call check-ints-equal/disp32
201
202 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
203 $test-get:end:
204
205 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
206 5d/pop-to-ebp
207 c3/return
208
209
210 get-slice:
211
212
213
214
215
216
217
218
219
220
221
222 55/push-ebp
223 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
224
225 51/push-ecx
226 52/push-edx
227 56/push-esi
228
229 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
230
231 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
232
233 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
234 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
235 $get-slice:search-loop:
236
237 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
238 73/jump-if-addr>= $get-slice:abort/disp8
239
240
241 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
242 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
243
244 e8/call lookup/disp32
245
246 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
247
248
249
250 50/push-eax
251 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
252
253 e8/call slice-equal?/disp32
254
255 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
256
257 3d/compare-eax-and 0/imm32/false
258 74/jump-if-= $get-slice:mismatch/disp8
259 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
260 eb/jump $get-slice:end/disp8
261 $get-slice:mismatch:
262
263 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
264
265 eb/jump $get-slice:search-loop/disp8
266 $get-slice:end:
267
268 5e/pop-to-esi
269 5a/pop-to-edx
270 59/pop-to-ecx
271
272 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
273 5d/pop-to-ebp
274 c3/return
275
276 $get-slice:abort:
277
278
279 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
280 68/push 2/imm32/stderr
281
282 e8/call _write/disp32
283
284 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
285
286
287 68/push ": get-slice: key not found: "/imm32
288 68/push 2/imm32/stderr
289
290 e8/call _write/disp32
291
292 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
293
294
295 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
296 68/push Stderr/imm32
297
298 e8/call write-slice-buffered/disp32
299
300 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
301
302
303 68/push Stderr/imm32
304
305 e8/call flush/disp32
306
307 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
308
309
310 68/push Newline/imm32
311 68/push 2/imm32/stderr
312
313 e8/call _write/disp32
314
315 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
316
317 bb/copy-to-ebx 1/imm32
318 e8/call syscall_exit/disp32
319
320
321 test-get-slice:
322
323 55/push-ebp
324 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
325
326
327 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
328 68/push 0x18/imm32/size
329 68/push 0/imm32/read
330 68/push 0/imm32/write
331 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
332
333
334 68/push Heap/imm32
335 68/push 0xc/imm32/row-size
336 68/push "code"/imm32
337 51/push-ecx
338
339 e8/call get-or-insert/disp32
340
341 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
342
343
344 68/push Heap/imm32
345 68/push 0xc/imm32/row-size
346 68/push "data"/imm32
347 51/push-ecx
348
349 e8/call get-or-insert/disp32
350
351 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
352 $test-get-slice:check1:
353
354 b8/copy-to-eax "code"/imm32
355 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
356 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
357 05/add-to-eax 4/imm32
358
359 52/push-edx
360 50/push-eax
361 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
362
363
364 68/push 0xc/imm32/row-size
365 52/push-edx
366 51/push-ecx
367
368 e8/call get-slice/disp32
369
370 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
371
372
373
374 68/push "F - test-get-slice/0"/imm32
375 68/push 0x14/imm32
376 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
377 50/push-eax
378
379 e8/call check-ints-equal/disp32
380
381 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
382 $test-get-slice:check2:
383
384 b8/copy-to-eax "data"/imm32
385 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
386 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
387 05/add-to-eax 4/imm32
388
389 52/push-edx
390 50/push-eax
391 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
392
393
394 68/push 0xc/imm32/row-size
395 52/push-edx
396 51/push-ecx
397
398 e8/call get-slice/disp32
399
400 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
401
402
403
404 68/push "F - test-get-slice/1"/imm32
405 68/push 0x20/imm32
406 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
407 50/push-eax
408
409 e8/call check-ints-equal/disp32
410
411 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
412 $test-get-slice:end:
413
414 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
415 5d/pop-to-ebp
416 c3/return
417
418
419
420
421 get-or-insert:
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438 55/push-ebp
439 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
440
441 51/push-ecx
442 52/push-edx
443 56/push-esi
444
445 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
446
447 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
448
449 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
450 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
451 $get-or-insert:search-loop:
452
453 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
454 73/jump-if-addr>= $get-or-insert:not-found/disp8
455
456
457 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
458 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
459
460 e8/call lookup/disp32
461
462 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
463
464
465
466 50/push-eax
467 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
468
469 e8/call string-equal?/disp32
470
471 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
472
473 3d/compare-eax-and 0/imm32/false
474 74/jump-if-= $get-or-insert:mismatch/disp8
475 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
476 eb/jump $get-or-insert:end/disp8
477 $get-or-insert:mismatch:
478
479 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
480
481 eb/jump $get-or-insert:search-loop/disp8
482 $get-or-insert:not-found:
483
484 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
485 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
486 73/jump-if-addr>= $get-or-insert:abort/disp8
487
488
489 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
490 52/push-edx
491
492 e8/call zero-out/disp32
493
494 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
495
496
497 52/push-edx
498 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
499 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
500
501 e8/call copy-array/disp32
502
503 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
504
505
506 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
507
508 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
509
510
511 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
512
513 05/add-to-eax 8/imm32
514 $get-or-insert:end:
515
516 5e/pop-to-esi
517 5a/pop-to-edx
518 59/pop-to-ecx
519
520 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
521 5d/pop-to-ebp
522 c3/return
523
524 $get-or-insert:abort:
525
526
527 68/push "get-or-insert: table is full\n"/imm32
528 68/push 2/imm32/stderr
529
530 e8/call _write/disp32
531
532 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
533
534 bb/copy-to-ebx 1/imm32
535 e8/call syscall_exit/disp32
536
537
538 test-get-or-insert:
539
540 55/push-ebp
541 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
542
543 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
544 68/push 0x18/imm32/size
545 68/push 0/imm32/read
546 68/push 0/imm32/write
547 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
548 $test-get-or-insert:first-call:
549
550
551
552 68/push Heap/imm32
553 68/push 0xc/imm32/row-size
554 68/push "code"/imm32
555 51/push-ecx
556
557 e8/call get-or-insert/disp32
558
559 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
560
561
562
563 68/push "F - test-get-or-insert/0"/imm32
564 68/push 0x14/imm32
565 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
566 50/push-eax
567
568 e8/call check-ints-equal/disp32
569
570 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
571
572
573 68/push "F - test-get-or-insert/1"/imm32
574 68/push 0xc/imm32/row-size
575 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
576
577 e8/call check-ints-equal/disp32
578
579 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
580
581
582 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
583 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
584
585 e8/call lookup/disp32
586
587 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
588
589
590 68/push "F - test-get-or-insert/2"/imm32
591 68/push "code"/imm32
592 50/push-eax
593
594 e8/call check-strings-equal/disp32
595
596 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
597 $test-get-or-insert:second-call:
598
599
600
601 68/push Heap/imm32
602 68/push 0xc/imm32/row-size
603 68/push "code"/imm32
604 51/push-ecx
605
606 e8/call get-or-insert/disp32
607
608 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
609
610
611
612 68/push "F - test-get-or-insert/3"/imm32
613 68/push 0x14/imm32
614 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
615 50/push-eax
616
617 e8/call check-ints-equal/disp32
618
619 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
620
621
622
623 68/push "F - test-get-or-insert/4"/imm32
624 68/push 0xc/imm32/row-size
625 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
626
627 e8/call check-ints-equal/disp32
628
629 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
630
631
632 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
633 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
634
635 e8/call lookup/disp32
636
637 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
638
639
640 68/push "F - test-get-or-insert/5"/imm32
641 68/push "code"/imm32
642 50/push-eax
643
644 e8/call check-strings-equal/disp32
645
646 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
647 $test-get-or-insert:third-call:
648
649
650
651 68/push Heap/imm32
652 68/push 0xc/imm32/row-size
653 68/push "data"/imm32
654 51/push-ecx
655
656 e8/call get-or-insert/disp32
657
658 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
659
660
661
662
663 68/push "F - test-get-or-insert/6"/imm32
664 68/push 0x20/imm32
665 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
666 50/push-eax
667
668 e8/call check-ints-equal/disp32
669
670 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
671
672
673 68/push "F - test-get-or-insert/7"/imm32
674 68/push 0x18/imm32/two-rows
675 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
676
677 e8/call check-ints-equal/disp32
678
679 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
680
681
682 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x1c/disp8 .
683 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x18/disp8 .
684
685 e8/call lookup/disp32
686
687 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
688
689
690 68/push "F - test-get-or-insert/8"/imm32
691 68/push "data"/imm32
692 50/push-eax
693
694 e8/call check-strings-equal/disp32
695
696 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
697 $test-get-or-insert:end:
698
699 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
700 5d/pop-to-ebp
701 c3/return
702
703
704
705
706
707 insert-or-abort:
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724 55/push-ebp
725 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
726
727 51/push-ecx
728 52/push-edx
729 56/push-esi
730
731 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
732
733 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
734
735 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
736 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
737 $insert-or-abort:search-loop:
738
739 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
740 73/jump-if-addr>= $insert-or-abort:not-found/disp8
741
742
743 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
744 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
745
746 e8/call lookup/disp32
747
748 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
749
750
751
752 50/push-eax
753 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
754
755 e8/call string-equal?/disp32
756
757 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
758
759 3d/compare-eax-and 0/imm32/false
760 0f 85/jump-if-!= $insert-or-abort:error-duplicate/disp32
761
762 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
763
764 eb/jump $insert-or-abort:search-loop/disp8
765 $insert-or-abort:not-found:
766
767 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
768 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
769 0f 83/jump-if-addr>= $insert-or-abort:error-full/disp32
770
771
772 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
773 52/push-edx
774
775 e8/call zero-out/disp32
776
777 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
778
779
780 52/push-edx
781 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
782 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
783
784 e8/call copy-array/disp32
785
786 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
787
788
789 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
790
791 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
792
793
794 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
795
796 05/add-to-eax 8/imm32
797 $insert-or-abort:end:
798
799 5e/pop-to-esi
800 5a/pop-to-edx
801 59/pop-to-ecx
802
803 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
804 5d/pop-to-ebp
805 c3/return
806
807 $insert-or-abort:error-duplicate:
808
809
810 68/push "insert-or-abort: key already exists: "/imm32
811 68/push 2/imm32/stderr
812
813 e8/call _write/disp32
814
815 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
816
817
818 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
819 68/push 2/imm32/stderr
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 "\n"/imm32
827 68/push 2/imm32/stderr
828
829 e8/call _write/disp32
830
831 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
832
833 bb/copy-to-ebx 1/imm32
834 e8/call syscall_exit/disp32
835
836
837 $insert-or-abort:error-full:
838
839
840 68/push "insert-or-abort: table is full\n"/imm32
841 68/push 2/imm32/stderr
842
843 e8/call _write/disp32
844
845 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
846
847 bb/copy-to-ebx 1/imm32
848 e8/call syscall_exit/disp32
849
850
851
852
853
854 get-or-insert-handle:
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871 55/push-ebp
872 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
873
874 51/push-ecx
875 52/push-edx
876 53/push-ebx
877 56/push-esi
878
879 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
880
881
882
883 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
884 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
885
886 e8/call lookup/disp32
887
888 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
889
890 89/copy 3/mod/direct 3/rm32/ebx . . . 0/r32/eax . .
891
892 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
893
894 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
895 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
896 $get-or-insert-handle:search-loop:
897
898 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
899 73/jump-if-addr>= $get-or-insert-handle:not-found/disp8
900
901
902 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
903 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
904
905 e8/call lookup/disp32
906
907 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
908
909
910
911 50/push-eax
912 53/push-ebx
913
914 e8/call string-equal?/disp32
915
916 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
917
918 3d/compare-eax-and 0/imm32/false
919 74/jump-if-= $get-or-insert-handle:mismatch/disp8
920 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
921 eb/jump $get-or-insert-handle:end/disp8
922 $get-or-insert-handle:mismatch:
923
924 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x14/disp8 .
925
926 eb/jump $get-or-insert-handle:search-loop/disp8
927 $get-or-insert-handle:not-found:
928
929 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
930 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
931 73/jump-if-addr>= $get-or-insert-handle:abort/disp8
932
933
934 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x14/disp8 .
935
936 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
937
938 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 .
939 89/copy 0/mod/indirect 2/rm32/edx . . . 0/r32/eax . .
940 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
941 89/copy 1/mod/*+disp8 2/rm32/edx . . . 0/r32/eax 4/disp8 .
942
943
944 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
945
946 05/add-to-eax 8/imm32
947 $get-or-insert-handle:end:
948
949 5e/pop-to-esi
950 5b/pop-to-ebx
951 5a/pop-to-edx
952 59/pop-to-ecx
953
954 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
955 5d/pop-to-ebp
956 c3/return
957
958 $get-or-insert-handle:abort:
959
960
961 68/push "get-or-insert-handle: table is full\n"/imm32
962 68/push 2/imm32/stderr
963
964 e8/call _write/disp32
965
966 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
967
968 bb/copy-to-ebx 1/imm32
969 e8/call syscall_exit/disp32
970
971
972 test-get-or-insert-handle:
973
974 55/push-ebp
975 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
976
977 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
978 68/push 0x18/imm32/size
979 68/push 0/imm32/read
980 68/push 0/imm32/write
981 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
982
983 68/push 0/imm32
984 68/push 0/imm32
985 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
986 $test-get-or-insert-handle:first-call:
987
988
989
990 52/push-edx
991 68/push "code"/imm32
992 68/push Heap/imm32
993
994 e8/call copy-array/disp32
995
996 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
997
998
999 68/push 0xc/imm32/row-size
1000 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1001 ff 6/subop/push 0/mod/indirect 2/rm32/edx . . . . . .
1002 51/push-ecx
1003
1004 e8/call get-or-insert-handle/disp32
1005
1006 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1007
1008
1009
1010 68/push "F - test-get-or-insert-handle/0"/imm32
1011 68/push 0x14/imm32
1012 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1013 50/push-eax
1014
1015 e8/call check-ints-equal/disp32
1016
1017 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1018
1019
1020 68/push "F - test-get-or-insert-handle/1"/imm32
1021 68/push 0xc/imm32/row-size
1022 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1023
1024 e8/call check-ints-equal/disp32
1025
1026 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1027
1028
1029 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
1030 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1031
1032 e8/call lookup/disp32
1033
1034 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1035
1036
1037 68/push "F - test-get-or-insert-handle/2"/imm32
1038 68/push "code"/imm32
1039 50/push-eax
1040
1041 e8/call check-strings-equal/disp32
1042
1043 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1044 $test-get-or-insert-handle:second-call:
1045
1046
1047
1048 52/push-edx
1049 68/push "code"/imm32
1050 68/push Heap/imm32
1051
1052 e8/call copy-array/disp32
1053
1054 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1055
1056
1057 68/push 0xc/imm32/row-size
1058 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1059 ff 6/subop/push 0/mod/indirect 2/rm32/edx . . . . . .
1060 51/push-ecx
1061
1062 e8/call get-or-insert-handle/disp32
1063
1064 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1065
1066
1067
1068 68/push "F - test-get-or-insert-handle/3"/imm32
1069 68/push 0x14/imm32
1070 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1071 50/push-eax
1072
1073 e8/call check-ints-equal/disp32
1074
1075 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1076
1077
1078
1079 68/push "F - test-get-or-insert-handle/4"/imm32
1080 68/push 0xc/imm32/row-size
1081 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1082
1083 e8/call check-ints-equal/disp32
1084
1085 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1086
1087
1088 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
1089 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1090
1091 e8/call lookup/disp32
1092
1093 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1094
1095
1096 68/push "F - test-get-or-insert-handle/5"/imm32
1097 68/push "code"/imm32
1098 50/push-eax
1099
1100 e8/call check-strings-equal/disp32
1101
1102 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1103 $test-get-or-insert-handle:third-call:
1104
1105
1106
1107 52/push-edx
1108 68/push "data"/imm32
1109 68/push Heap/imm32
1110
1111 e8/call copy-array/disp32
1112
1113 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1114
1115
1116 68/push 0xc/imm32/row-size
1117 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1118 ff 6/subop/push 0/mod/indirect 2/rm32/edx . . . . . .
1119 51/push-ecx
1120
1121 e8/call get-or-insert-handle/disp32
1122
1123 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1124
1125
1126
1127
1128 68/push "F - test-get-or-insert-handle/6"/imm32
1129 68/push 0x20/imm32
1130 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1131 50/push-eax
1132
1133 e8/call check-ints-equal/disp32
1134
1135 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1136
1137
1138 68/push "F - test-get-or-insert-handle/7"/imm32
1139 68/push 0x18/imm32/two-rows
1140 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1141
1142 e8/call check-ints-equal/disp32
1143
1144 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1145
1146
1147 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x1c/disp8 .
1148 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x18/disp8 .
1149
1150 e8/call lookup/disp32
1151
1152 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1153
1154
1155 68/push "F - test-get-or-insert-handle/8"/imm32
1156 68/push "data"/imm32
1157 50/push-eax
1158
1159 e8/call check-strings-equal/disp32
1160
1161 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1162 $test-get-or-insert-handle:end:
1163
1164 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1165 5d/pop-to-ebp
1166 c3/return
1167
1168
1169
1170 get-or-insert-slice:
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187 55/push-ebp
1188 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1189
1190 51/push-ecx
1191 52/push-edx
1192 56/push-esi
1193
1194 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1195
1196 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1197
1198 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1199 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1200 $get-or-insert-slice:search-loop:
1201
1202 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1203 73/jump-if-addr>= $get-or-insert-slice:not-found/disp8
1204
1205
1206 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
1207 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1208
1209 e8/call lookup/disp32
1210
1211 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1212
1213
1214
1215 50/push-eax
1216 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1217
1218 e8/call slice-equal?/disp32
1219
1220 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1221
1222 3d/compare-eax-and 0/imm32/false
1223 74/jump-if-= $get-or-insert-slice:mismatch/disp8
1224 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
1225 eb/jump $get-or-insert-slice:end/disp8
1226 $get-or-insert-slice:mismatch:
1227
1228 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1229
1230 eb/jump $get-or-insert-slice:search-loop/disp8
1231 $get-or-insert-slice:not-found:
1232
1233 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
1234
1235 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
1236 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
1237 7d/jump-if->= $get-or-insert-slice:abort/disp8
1238
1239
1240 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
1241 52/push-edx
1242
1243 e8/call zero-out/disp32
1244
1245 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1246
1247
1248 52/push-edx
1249 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1250 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1251
1252 e8/call slice-to-string/disp32
1253
1254 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1255
1256
1257 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
1258
1259 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
1260
1261
1262 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
1263
1264 05/add-to-eax 8/imm32
1265 $get-or-insert-slice:end:
1266
1267 5e/pop-to-esi
1268 5a/pop-to-edx
1269 59/pop-to-ecx
1270
1271 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1272 5d/pop-to-ebp
1273 c3/return
1274
1275 $get-or-insert-slice:abort:
1276
1277
1278 68/push "get-or-insert-slice: table is full\n"/imm32
1279 68/push 2/imm32/stderr
1280
1281 e8/call _write/disp32
1282
1283 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1284
1285 bb/copy-to-ebx 1/imm32
1286 e8/call syscall_exit/disp32
1287
1288
1289 test-get-or-insert-slice:
1290
1291 55/push-ebp
1292 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1293
1294 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
1295 68/push 0x18/imm32/size
1296 68/push 0/imm32/read
1297 68/push 0/imm32/write
1298 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1299
1300 b8/copy-to-eax "code"/imm32
1301 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1302 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1303 05/add-to-eax 4/imm32
1304
1305 52/push-edx
1306 50/push-eax
1307 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1308 $test-get-or-insert-slice:first-call:
1309
1310
1311
1312 68/push Heap/imm32
1313 68/push 0xc/imm32/row-size
1314 52/push-edx
1315 51/push-ecx
1316
1317 e8/call get-or-insert-slice/disp32
1318
1319 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1320
1321
1322
1323 68/push "F - test-get-or-insert-slice/0"/imm32
1324 68/push 0x14/imm32
1325 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1326 50/push-eax
1327
1328 e8/call check-ints-equal/disp32
1329
1330 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1331
1332
1333 68/push "F - test-get-or-insert-slice/1"/imm32
1334 68/push 0xc/imm32/row-size
1335 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1336
1337 e8/call check-ints-equal/disp32
1338
1339 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1340
1341
1342 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
1343 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1344
1345 e8/call lookup/disp32
1346
1347 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1348
1349
1350 68/push "F - test-get-or-insert-slice/2"/imm32
1351 68/push "code"/imm32
1352 50/push-eax
1353
1354 e8/call check-strings-equal/disp32
1355
1356 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1357 $test-get-or-insert-slice:second-call:
1358
1359
1360
1361 68/push Heap/imm32
1362 68/push 0xc/imm32/row-size
1363 52/push-edx
1364 51/push-ecx
1365
1366 e8/call get-or-insert-slice/disp32
1367
1368 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1369
1370
1371
1372 68/push "F - test-get-or-insert-slice/3"/imm32
1373 68/push 0x14/imm32
1374 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1375 50/push-eax
1376
1377 e8/call check-ints-equal/disp32
1378
1379 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1380
1381
1382
1383 68/push "F - test-get-or-insert-slice/4"/imm32
1384 68/push 0xc/imm32/row-size
1385 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1386
1387 e8/call check-ints-equal/disp32
1388
1389 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1390
1391
1392 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
1393 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1394
1395 e8/call lookup/disp32
1396
1397 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1398
1399
1400 68/push "F - test-get-or-insert-slice/5"/imm32
1401 68/push "code"/imm32
1402 50/push-eax
1403
1404 e8/call check-strings-equal/disp32
1405
1406 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1407 $test-get-or-insert-slice:third-call:
1408
1409
1410 b8/copy-to-eax "data"/imm32
1411 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1412 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1413 05/add-to-eax 4/imm32
1414
1415 52/push-edx
1416 50/push-eax
1417 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1418
1419
1420 68/push Heap/imm32
1421 68/push 0xc/imm32/row-size
1422 52/push-edx
1423 51/push-ecx
1424
1425 e8/call get-or-insert-slice/disp32
1426
1427 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1428
1429
1430
1431
1432 68/push "F - test-get-or-insert-slice/6"/imm32
1433 68/push 0x20/imm32
1434 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
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 "F - test-get-or-insert-slice/7"/imm32
1443 68/push 0x18/imm32/two-rows
1444 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1445
1446 e8/call check-ints-equal/disp32
1447
1448 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1449
1450
1451 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x1c/disp8 .
1452 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x18/disp8 .
1453
1454 e8/call lookup/disp32
1455
1456 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1457
1458
1459 68/push "F - test-get-or-insert-slice/8"/imm32
1460 68/push "data"/imm32
1461 50/push-eax
1462
1463 e8/call check-strings-equal/disp32
1464
1465 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1466 $test-get-or-insert-slice:end:
1467
1468 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1469 5d/pop-to-ebp
1470 c3/return
1471
1472
1473
1474 insert-slice-or-abort:
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491 55/push-ebp
1492 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1493
1494 51/push-ecx
1495 52/push-edx
1496 56/push-esi
1497
1498 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1499
1500 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1501
1502 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1503 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1504 $insert-slice-or-abort:search-loop:
1505
1506 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1507 73/jump-if-addr>= $insert-slice-or-abort:not-found/disp8
1508
1509
1510 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
1511 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1512
1513 e8/call lookup/disp32
1514
1515 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1516
1517
1518
1519 50/push-eax
1520 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1521
1522 e8/call slice-equal?/disp32
1523
1524 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1525
1526 3d/compare-eax-and 0/imm32/false
1527 0f 85/jump-if-!= $insert-slice-or-abort:error-duplicate/disp32
1528
1529 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1530
1531 eb/jump $insert-slice-or-abort:search-loop/disp8
1532 $insert-slice-or-abort:not-found:
1533
1534 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
1535
1536 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
1537 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
1538 0f 8d/jump-if->= $insert-slice-or-abort:error-full/disp32
1539
1540
1541 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
1542 52/push-edx
1543
1544 e8/call zero-out/disp32
1545
1546 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1547
1548
1549 52/push-edx
1550 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1551 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1552
1553 e8/call slice-to-string/disp32
1554
1555 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1556
1557
1558 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
1559
1560 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
1561
1562
1563 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
1564
1565 05/add-to-eax 8/imm32
1566 $insert-slice-or-abort:end:
1567
1568 5e/pop-to-esi
1569 5a/pop-to-edx
1570 59/pop-to-ecx
1571
1572 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1573 5d/pop-to-ebp
1574 c3/return
1575
1576 $insert-slice-or-abort:error-duplicate:
1577
1578
1579 68/push Stderr/imm32
1580
1581 e8/call flush/disp32
1582
1583 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1584
1585
1586 68/push "insert-slice-or-abort: key already exists: "/imm32
1587 68/push 2/imm32/stderr
1588
1589 e8/call _write/disp32
1590
1591 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1592
1593
1594 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1595 68/push Stderr/imm32
1596
1597 e8/call write-slice-buffered/disp32
1598
1599 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1600
1601
1602 68/push Stderr/imm32
1603
1604 e8/call flush/disp32
1605
1606 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1607
1608
1609 68/push "\n"/imm32
1610 68/push 2/imm32/stderr
1611
1612 e8/call _write/disp32
1613
1614 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1615
1616 bb/copy-to-ebx 1/imm32
1617 e8/call syscall_exit/disp32
1618
1619
1620 $insert-slice-or-abort:error-full:
1621
1622
1623 68/push "insert-slice-or-abort: table is full\n"/imm32
1624 68/push 2/imm32/stderr
1625
1626 e8/call _write/disp32
1627
1628 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1629
1630 bb/copy-to-ebx 1/imm32
1631 e8/call syscall_exit/disp32
1632
1633
1634
1635
1636 get-or-stop:
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651 55/push-ebp
1652 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1653
1654 51/push-ecx
1655 52/push-edx
1656 56/push-esi
1657
1658 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1659
1660 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1661
1662 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1663 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1664 $get-or-stop:search-loop:
1665
1666 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1667 73/jump-if-addr>= $get-or-stop:stop/disp8
1668
1669
1670 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
1671 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1672
1673 e8/call lookup/disp32
1674
1675 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1676
1677
1678
1679 50/push-eax
1680 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1681
1682 e8/call string-equal?/disp32
1683
1684 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1685
1686 3d/compare-eax-and 0/imm32/false
1687 74/jump-if-= $get-or-stop:mismatch/disp8
1688 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
1689 eb/jump $get-or-stop:end/disp8
1690 $get-or-stop:mismatch:
1691
1692 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1693
1694 eb/jump $get-or-stop:search-loop/disp8
1695 $get-or-stop:end:
1696
1697 5e/pop-to-esi
1698 5a/pop-to-edx
1699 59/pop-to-ecx
1700
1701 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1702 5d/pop-to-ebp
1703 c3/return
1704
1705 $get-or-stop:stop:
1706
1707
1708 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1709 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1710
1711 e8/call write-buffered/disp32
1712
1713 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1714
1715
1716 68/push ": get-or-stop: key not found: "/imm32
1717 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1718
1719 e8/call write-buffered/disp32
1720
1721 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1722
1723
1724 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1725 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1726
1727 e8/call write-buffered/disp32
1728
1729 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1730
1731
1732 68/push Newline/imm32
1733 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1734
1735 e8/call write-buffered/disp32
1736
1737 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1738
1739
1740 68/push 1/imm32
1741 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x1c/disp8 .
1742
1743 e8/call stop/disp32
1744
1745 $get-or-stop:terminus:
1746
1747 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1748
1749 bb/copy-to-ebx 1/imm32
1750 e8/call syscall_exit/disp32
1751
1752 test-get-or-stop:
1753
1754
1755 55/push-ebp
1756 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1757
1758
1759
1760 68/push _test-error-stream/imm32
1761
1762 e8/call clear-stream/disp32
1763
1764 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1765
1766
1767 68/push $_test-error-buffered-file->buffer/imm32
1768
1769 e8/call clear-stream/disp32
1770
1771 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1772
1773 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
1774 68/push 0x18/imm32/size
1775 68/push 0/imm32/read
1776 68/push 0/imm32/write
1777 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1778
1779 68/push 0/imm32
1780 68/push 0/imm32
1781 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1782
1783
1784
1785 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
1786 52/push-edx
1787
1788 e8/call tailor-exit-descriptor/disp32
1789
1790 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1791
1792
1793 68/push Heap/imm32
1794 68/push 0xc/imm32/row-size
1795 68/push "code"/imm32
1796 51/push-ecx
1797
1798 e8/call get-or-insert/disp32
1799
1800 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1801 $test-get-or-stop:success:
1802
1803
1804 52/push-edx/ed
1805 68/push _test-error-buffered-file/imm32
1806 68/push "foo"/imm32/abort-prefix
1807 68/push 0xc/imm32/row-size
1808 68/push "code"/imm32
1809 51/push-ecx
1810
1811 e8/call get-or-stop/disp32
1812
1813 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
1814 $test-get-or-stop:success-assertion:
1815
1816
1817
1818 68/push "F - test-get-or-stop/0"/imm32
1819 68/push 0x14/imm32
1820 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1821 50/push-eax
1822
1823 e8/call check-ints-equal/disp32
1824
1825 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1826 $test-get-or-stop:failure:
1827
1828
1829 52/push-edx/ed
1830 68/push _test-error-buffered-file/imm32
1831 68/push "foo"/imm32/abort-prefix
1832 68/push 0xc/imm32/row-size
1833 68/push "data"/imm32
1834 51/push-ecx
1835
1836 e8/call get-or-stop/disp32
1837
1838
1839 59/pop-to-ecx
1840 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1841 5a/pop-to-edx
1842 $test-get-or-stop:failure-assertion:
1843
1844
1845
1846 68/push "F - test-get-or-stop/1"/imm32
1847 68/push 2/imm32
1848
1849 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1850
1851 e8/call check-ints-equal/disp32
1852
1853 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1854 $test-get-or-stop:end:
1855
1856
1857 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x2c/imm32
1858 5d/pop-to-ebp
1859 c3/return
1860
1861
1862 get-slice-or-stop:
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877 55/push-ebp
1878 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1879
1880 51/push-ecx
1881 52/push-edx
1882 56/push-esi
1883
1884 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1885
1886 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1887
1888 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1889 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1890 $get-slice-or-stop:search-loop:
1891
1892 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1893 73/jump-if-addr>= $get-slice-or-stop:stop/disp8
1894
1895
1896 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
1897 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1898
1899 e8/call lookup/disp32
1900
1901 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1902
1903
1904
1905 50/push-eax
1906 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1907
1908 e8/call slice-equal?/disp32
1909
1910 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1911
1912 3d/compare-eax-and 0/imm32/false
1913 74/jump-if-= $get-slice-or-stop:mismatch/disp8
1914 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
1915 eb/jump $get-slice-or-stop:end/disp8
1916 $get-slice-or-stop:mismatch:
1917
1918 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1919
1920 eb/jump $get-slice-or-stop:search-loop/disp8
1921 $get-slice-or-stop:end:
1922
1923 5e/pop-to-esi
1924 5a/pop-to-edx
1925 59/pop-to-ecx
1926
1927 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1928 5d/pop-to-ebp
1929 c3/return
1930
1931 $get-slice-or-stop:stop:
1932
1933
1934 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1935 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1936
1937 e8/call write-buffered/disp32
1938
1939 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1940
1941
1942 68/push ": get-slice-or-stop: key not found: "/imm32
1943 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1944
1945 e8/call write-buffered/disp32
1946
1947 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1948
1949
1950 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1951 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1952
1953 e8/call write-slice-buffered/disp32
1954
1955 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1956
1957
1958 68/push Newline/imm32
1959 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1960
1961 e8/call write-buffered/disp32
1962
1963 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1964
1965
1966 68/push 1/imm32
1967 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x1c/disp8 .
1968
1969 e8/call stop/disp32
1970
1971 $get-slice-or-stop:terminus:
1972
1973 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1974
1975 bb/copy-to-ebx 1/imm32
1976 e8/call syscall_exit/disp32
1977
1978 test-get-slice-or-stop:
1979
1980
1981 55/push-ebp
1982 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1983
1984
1985
1986 68/push _test-error-stream/imm32
1987
1988 e8/call clear-stream/disp32
1989
1990 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1991
1992
1993 68/push $_test-error-buffered-file->buffer/imm32
1994
1995 e8/call clear-stream/disp32
1996
1997 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1998
1999 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
2000 68/push 0x18/imm32/size
2001 68/push 0/imm32/read
2002 68/push 0/imm32/write
2003 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2004
2005 68/push 0/imm32
2006 68/push 0/imm32
2007 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
2008
2009
2010 b8/copy-to-eax "code"/imm32
2011 8b/copy 0/mod/indirect 0/rm32/eax . . . 3/r32/ebx . .
2012 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 3/index/ebx . 3/r32/ebx 4/disp8 .
2013 05/add-to-eax 4/imm32
2014
2015 53/push-ebx
2016 50/push-eax
2017 89/copy 3/mod/direct 3/rm32/ebx . . . 4/r32/esp . .
2018
2019
2020
2021 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
2022 52/push-edx
2023
2024 e8/call tailor-exit-descriptor/disp32
2025
2026 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2027
2028
2029 68/push Heap/imm32
2030 68/push 0xc/imm32/row-size
2031 68/push "code"/imm32
2032 51/push-ecx
2033
2034 e8/call get-or-insert/disp32
2035
2036 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2037 $test-get-slice-or-stop:success:
2038
2039
2040 52/push-edx/ed
2041 68/push _test-error-buffered-file/imm32
2042 68/push "foo"/imm32/abort-prefix
2043 68/push 0xc/imm32/row-size
2044 53/push-ebx/slice
2045 51/push-ecx
2046
2047 e8/call get-slice-or-stop/disp32
2048
2049
2050 59/pop-to-ecx
2051 5b/pop-to-ebx
2052 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2053 5a/pop-to-edx
2054 $test-get-slice-or-stop:success-assertion:
2055
2056
2057
2058 68/push "F - test-get-slice-or-stop/0"/imm32
2059 68/push 0x14/imm32
2060 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
2061 50/push-eax
2062
2063 e8/call check-ints-equal/disp32
2064
2065 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2066 $test-get-slice-or-stop:failure:
2067
2068
2069 b8/copy-to-eax "segment2"/imm32
2070 05/add-to-eax 4/imm32
2071 89/copy 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . .
2072
2073 05/add-to-eax 8/imm32/strlen
2074 89/copy 1/mod/*+disp8 3/rm32/ebx . . . 0/r32/eax 4/disp8 .
2075
2076
2077 52/push-edx/ed
2078 68/push _test-error-buffered-file/imm32
2079 68/push "foo"/imm32/abort-prefix
2080 68/push 0xc/imm32/row-size
2081 53/push-ebx/slice
2082 51/push-ecx
2083
2084 e8/call get-slice-or-stop/disp32
2085
2086
2087 59/pop-to-ecx
2088 5b/pop-to-ebx
2089 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2090 5a/pop-to-edx
2091 $test-get-slice-or-stop:failure-assertion:
2092
2093
2094
2095 68/push "F - test-get-or-stop/1"/imm32
2096 68/push 2/imm32
2097
2098 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
2099
2100 e8/call check-ints-equal/disp32
2101
2102 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2103 $test-get-slice-or-stop:end:
2104
2105
2106 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x34/imm32
2107 5d/pop-to-ebp
2108 c3/return
2109
2110
2111 maybe-get:
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123 55/push-ebp
2124 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2125
2126 51/push-ecx
2127 52/push-edx
2128 56/push-esi
2129
2130 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
2131
2132 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
2133
2134 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
2135 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
2136 $maybe-get:search-loop:
2137
2138 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
2139 73/jump-if-addr>= $maybe-get:null/disp8
2140
2141
2142 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
2143 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
2144
2145 e8/call lookup/disp32
2146
2147 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2148
2149
2150
2151 50/push-eax
2152 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
2153
2154 e8/call string-equal?/disp32
2155
2156 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2157
2158 3d/compare-eax-and 0/imm32/false
2159 74/jump-if-= $maybe-get:mismatch/disp8
2160 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
2161 eb/jump $maybe-get:end/disp8
2162 $maybe-get:mismatch:
2163
2164 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
2165
2166 eb/jump $maybe-get:search-loop/disp8
2167 $maybe-get:null:
2168 b8/copy-to-eax 0/imm32
2169 $maybe-get:end:
2170
2171 5e/pop-to-esi
2172 5a/pop-to-edx
2173 59/pop-to-ecx
2174
2175 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2176 5d/pop-to-ebp
2177 c3/return
2178
2179 test-maybe-get:
2180
2181 55/push-ebp
2182 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2183
2184
2185 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
2186 68/push 0x18/imm32/size
2187 68/push 0/imm32/read
2188 68/push 0/imm32/write
2189 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2190
2191
2192 68/push Heap/imm32
2193 68/push 0xc/imm32/row-size
2194 68/push "code"/imm32
2195 51/push-ecx
2196
2197 e8/call get-or-insert/disp32
2198
2199 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2200 $test-maybe-get:success:
2201
2202
2203
2204 68/push 0xc/imm32/row-size
2205 68/push "code"/imm32
2206 51/push-ecx
2207
2208 e8/call maybe-get/disp32
2209
2210 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2211
2212
2213
2214 68/push "F - test-maybe-get/0"/imm32
2215 68/push 0x14/imm32
2216 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
2217 50/push-eax
2218
2219 e8/call check-ints-equal/disp32
2220
2221 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2222
2223
2224
2225 68/push "F - test-maybe-get/1"/imm32
2226 68/push 0xc/imm32/row-size
2227 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
2228
2229 e8/call check-ints-equal/disp32
2230
2231 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2232
2233
2234 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
2235 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
2236
2237 e8/call lookup/disp32
2238
2239 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2240
2241
2242 68/push "F - test-maybe-get/2"/imm32
2243 68/push "code"/imm32
2244 50/push-eax
2245
2246 e8/call check-strings-equal/disp32
2247
2248 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2249 $test-maybe-get:failure:
2250
2251
2252
2253 68/push 0xc/imm32/row-size
2254 68/push "data"/imm32
2255 51/push-ecx
2256
2257 e8/call maybe-get/disp32
2258
2259 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2260
2261
2262 68/push "F - test-maybe-get/3"/imm32
2263 68/push 0/imm32
2264 50/push-eax
2265
2266 e8/call check-ints-equal/disp32
2267
2268 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2269 $test-maybe-get:end:
2270
2271 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2272 5d/pop-to-ebp
2273 c3/return
2274
2275
2276 maybe-get-slice:
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288 55/push-ebp
2289 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2290
2291 51/push-ecx
2292 52/push-edx
2293 56/push-esi
2294
2295 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
2296
2297 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
2298
2299 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
2300 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
2301 $maybe-get-slice:search-loop:
2302
2303 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
2304 73/jump-if-addr>= $maybe-get-slice:null/disp8
2305
2306
2307 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 .
2308 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
2309
2310 e8/call lookup/disp32
2311
2312 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2313
2314
2315
2316 50/push-eax
2317 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
2318
2319 e8/call slice-equal?/disp32
2320
2321 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2322
2323 3d/compare-eax-and 0/imm32/false
2324 74/jump-if-= $maybe-get-slice:mismatch/disp8
2325 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 8/disp8 .
2326 eb/jump $maybe-get-slice:end/disp8
2327 $maybe-get-slice:mismatch:
2328
2329 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
2330
2331 eb/jump $maybe-get-slice:search-loop/disp8
2332 $maybe-get-slice:null:
2333 b8/copy-to-eax 0/imm32
2334 $maybe-get-slice:end:
2335
2336 5e/pop-to-esi
2337 5a/pop-to-edx
2338 59/pop-to-ecx
2339
2340 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2341 5d/pop-to-ebp
2342 c3/return
2343
2344 test-maybe-get-slice:
2345
2346 55/push-ebp
2347 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
2348
2349
2350 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
2351 68/push 0x18/imm32/size
2352 68/push 0/imm32/read
2353 68/push 0/imm32/write
2354 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
2355
2356
2357 68/push Heap/imm32
2358 68/push 0xc/imm32/row-size
2359 68/push "code"/imm32
2360 51/push-ecx
2361
2362 e8/call get-or-insert/disp32
2363
2364 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
2365 $test-maybe-get-slice:success:
2366
2367
2368 b8/copy-to-eax "code"/imm32
2369 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
2370 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
2371 05/add-to-eax 4/imm32
2372
2373 52/push-edx
2374 50/push-eax
2375 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
2376
2377
2378 68/push 0xc/imm32/row-size
2379 52/push-edx
2380 51/push-ecx
2381
2382 e8/call maybe-get-slice/disp32
2383
2384 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2385
2386
2387
2388 68/push "F - test-maybe-get-slice/0"/imm32
2389 68/push 0x14/imm32
2390 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
2391 50/push-eax
2392
2393 e8/call check-ints-equal/disp32
2394
2395 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2396
2397
2398
2399 68/push "F - test-maybe-get-slice/1"/imm32
2400 68/push 0xc/imm32/row-size
2401 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
2402
2403 e8/call check-ints-equal/disp32
2404
2405 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2406
2407
2408 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x10/disp8 .
2409 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
2410
2411 e8/call lookup/disp32
2412
2413 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
2414
2415
2416 68/push "F - test-maybe-get-slice/2"/imm32
2417 68/push "code"/imm32
2418 50/push-eax
2419
2420 e8/call check-strings-equal/disp32
2421
2422 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2423 $test-maybe-get-slice:failure:
2424
2425
2426 b8/copy-to-eax "data"/imm32
2427 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
2428 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
2429 05/add-to-eax 4/imm32
2430
2431 52/push-edx
2432 50/push-eax
2433 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
2434
2435
2436 68/push 0xc/imm32/row-size
2437 52/push-edx
2438 51/push-ecx
2439
2440 e8/call maybe-get-slice/disp32
2441
2442 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2443
2444
2445 68/push "F - test-maybe-get-slice/3"/imm32
2446 68/push 0/imm32
2447 50/push-eax
2448
2449 e8/call check-ints-equal/disp32
2450
2451 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
2452 $test-maybe-get-slice:end:
2453
2454 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
2455 5d/pop-to-ebp
2456 c3/return
2457
2458