https://github.com/akkartik/mu/blob/master/subx/065hex.subx
1
2
3
4 == code
5
6
7
8
9 is-hex-int?:
10
11 55/push-EBP
12 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
13
14 51/push-ECX
15 52/push-EDX
16 53/push-EBX
17
18 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 8/disp8 .
19
20 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 2/r32/EDX 4/disp8 .
21
22 8b/copy 0/mod/indirect 1/rm32/ECX . . . 1/r32/ECX . .
23
24 b8/copy-to-EAX 0/imm32/false
25 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
26 7d/jump-if-greater-or-equal $is-hex-int?:end/disp8
27
28
29 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
30 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 3/r32/BL . .
31 81 7/subop/compare 3/mod/direct 3/rm32/EBX . . . . . 0x2d/imm32/-
32 75/jump-if-not-equal $is-hex-int?:initial-0/disp8
33
34 41/increment-ECX
35
36 $is-hex-int?:initial-0:
37
38 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
39 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 3/r32/BL . .
40 81 7/subop/compare 3/mod/direct 3/rm32/EBX . . . . . 0x30/imm32/0
41 75/jump-if-not-equal $is-hex-int?:loop/disp8
42
43 41/increment-ECX
44 $is-hex-int?:initial-0x:
45
46 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
47 7d/jump-if-greater-or-equal $is-hex-int?:true/disp8
48
49 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
50 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 3/r32/BL . .
51 81 7/subop/compare 3/mod/direct 3/rm32/EBX . . . . . 0x78/imm32/x
52 75/jump-if-not-equal $is-hex-int?:loop/disp8
53
54 41/increment-ECX
55 $is-hex-int?:loop:
56
57 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
58 7d/jump-if-greater-or-equal $is-hex-int?:true/disp8
59
60
61 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
62 50/push-EAX
63
64 e8/call is-hex-digit?/disp32
65
66 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
67
68 3d/compare-EAX-and 0/imm32
69 74/jump-if-equal $is-hex-int?:end/disp8
70
71 41/increment-ECX
72
73 eb/jump $is-hex-int?:loop/disp8
74 $is-hex-int?:true:
75
76 b8/copy-to-EAX 1/imm32/true
77 $is-hex-int?:end:
78
79 5b/pop-to-EBX
80 5a/pop-to-EDX
81 59/pop-to-ECX
82
83 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
84 5d/pop-to-EBP
85 c3/return
86
87 test-is-hex-int:
88
89 55/push-EBP
90 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
91
92 68/push _test-slice-hex-int-end/imm32
93 68/push _test-slice-hex-int/imm32
94 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
95
96
97 51/push-ECX
98
99 e8/call is-hex-int?/disp32
100
101 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
102
103
104 68/push "F - test-is-hex-int"/imm32
105 68/push 1/imm32/true
106 50/push-EAX
107
108 e8/call check-ints-equal/disp32
109
110 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
111
112 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
113 5d/pop-to-EBP
114 c3/return
115
116 test-is-hex-int-handles-letters:
117
118 55/push-EBP
119 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
120
121 68/push _test-slice-hex-int-letters-end/imm32
122 68/push _test-slice-hex-int-letters/imm32
123 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
124
125
126 51/push-ECX
127
128 e8/call is-hex-int?/disp32
129
130 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
131
132
133 68/push "F - test-is-hex-int-handles-letters"/imm32
134 68/push 1/imm32/true
135 50/push-EAX
136
137 e8/call check-ints-equal/disp32
138
139 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
140
141 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
142 5d/pop-to-EBP
143 c3/return
144
145 test-is-hex-int-with-trailing-char:
146
147 55/push-EBP
148 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
149
150 68/push _test-slice-digits-and-char-end/imm32
151 68/push _test-slice-digits-and-char/imm32
152 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
153
154
155 51/push-ECX
156
157 e8/call is-hex-int?/disp32
158
159 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
160
161
162 68/push "F - test-is-hex-int-with-trailing-char"/imm32
163 68/push 0/imm32/false
164 50/push-EAX
165
166 e8/call check-ints-equal/disp32
167
168 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
169
170 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
171 5d/pop-to-EBP
172 c3/return
173
174 test-is-hex-int-with-leading-char:
175
176 55/push-EBP
177 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
178
179 68/push _test-slice-char-and-digits-end/imm32
180 68/push _test-slice-char-and-digits/imm32
181 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
182
183
184 51/push-ECX
185
186 e8/call is-hex-int?/disp32
187
188 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
189
190
191 68/push "F - test-is-hex-int-with-leading-char"/imm32
192 68/push 0/imm32/false
193 50/push-EAX
194
195 e8/call check-ints-equal/disp32
196
197 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
198
199 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
200 5d/pop-to-EBP
201 c3/return
202
203 test-is-hex-int-empty:
204
205 55/push-EBP
206 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
207
208 68/push _test-slice-empty-end/imm32
209 68/push _test-slice-empty/imm32
210 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
211
212
213 51/push-ECX
214
215 e8/call is-hex-int?/disp32
216
217 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
218
219
220 68/push "F - test-is-hex-int-empty"/imm32
221 68/push 0/imm32/false
222 50/push-EAX
223
224 e8/call check-ints-equal/disp32
225
226 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
227
228 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
229 5d/pop-to-EBP
230 c3/return
231
232 test-is-hex-int-handles-0x-prefix:
233
234 55/push-EBP
235 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
236
237 68/push _test-slice-hex-int-with-0x-prefix-end/imm32
238 68/push _test-slice-hex-int-with-0x-prefix/imm32
239 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
240
241
242 51/push-ECX
243
244 e8/call is-hex-int?/disp32
245
246 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
247
248
249 68/push "F - test-is-hex-int-handles-0x-prefix"/imm32
250 68/push 1/imm32/true
251 50/push-EAX
252
253 e8/call check-ints-equal/disp32
254
255 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
256
257 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
258 5d/pop-to-EBP
259 c3/return
260
261 test-is-hex-int-handles-negative:
262
263 55/push-EBP
264 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
265
266 68/push _test-slice-hex-int-letters-end/imm32
267 68/push _test-slice-hex-int-letters-negative/imm32
268 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
269
270
271 51/push-ECX
272
273 e8/call is-hex-int?/disp32
274
275 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
276
277
278 68/push "F - test-is-hex-int-handles-negative"/imm32
279 68/push 1/imm32/true
280 50/push-EAX
281
282 e8/call check-ints-equal/disp32
283
284 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
285
286 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
287 5d/pop-to-EBP
288 c3/return
289
290 test-is-hex-int-handles-negative-0x-prefix:
291
292 55/push-EBP
293 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
294
295 68/push _test-slice-hex-int-with-0x-prefix-end/imm32
296 68/push _test-slice-hex-int-with-0x-prefix-negative/imm32
297 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
298
299
300 51/push-ECX
301
302 e8/call is-hex-int?/disp32
303
304 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
305
306
307 68/push "F - test-is-hex-int-handles-negative-0x-prefix"/imm32
308 68/push 1/imm32/true
309 50/push-EAX
310
311 e8/call check-ints-equal/disp32
312
313 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
314
315 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
316 5d/pop-to-EBP
317 c3/return
318
319 parse-hex-int:
320
321 55/push-EBP
322 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
323
324 51/push-ECX
325 52/push-EDX
326 53/push-EBX
327 56/push-ESI
328
329 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
330
331 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 8/disp8 .
332
333 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 2/r32/EDX 4/disp8 .
334
335 8b/copy 0/mod/indirect 1/rm32/ECX . . . 1/r32/ECX . .
336
337 31/xor 3/mod/direct 6/rm32/ESI . . . 6/r32/ESI . .
338 $parse-hex-int:negative:
339
340 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
341 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
342 3d/compare-EAX-and 0x2d/imm32/-
343 75/jump-if-not-equal $parse-hex-int:initial-0/disp8
344
345 41/increment-ECX
346
347 be/copy-to-ESI 1/imm32/true
348 $parse-hex-int:initial-0:
349
350
351 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
352 3d/compare-EAX-and 0x30/imm32/0
353 75/jump-if-not-equal $parse-hex-int:loop/disp8
354
355 41/increment-ECX
356 $parse-hex-int:initial-0x:
357
358 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
359 7d/jump-if-greater-or-equal $parse-hex-int:end/disp8
360
361 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
362 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
363 3d/compare-EAX-and 0x78/imm32/x
364 75/jump-if-not-equal $parse-hex-int:loop/disp8
365
366 41/increment-ECX
367 $parse-hex-int:loop:
368
369 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
370 7d/jump-if-greater-or-equal $parse-hex-int:negate/disp8
371
372
373 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
374
375 e8/call from-hex-char/disp32
376
377 c1/shift 4/subop/left 3/mod/direct 3/rm32/EBX . . . . . 4/imm8
378 01/add 3/mod/direct 3/rm32/EBX . . . 0/r32/EAX . .
379
380 41/increment-ECX
381
382 eb/jump $parse-hex-int:loop/disp8
383 $parse-hex-int:negate:
384 81 7/subop/compare 3/mod/direct 6/rm32/ESI . . . . . 0/imm32
385 74/jump-if-equal $parse-hex-int:end/disp8
386 f7 3/subop/negate 3/mod/direct 3/rm32/EBX . . . . . .
387 $parse-hex-int:end:
388 89/copy 3/mod/direct 0/rm32/EAX . . . 3/r32/EBX . .
389
390 5e/pop-to-ESI
391 5b/pop-to-EBX
392 5a/pop-to-EDX
393 59/pop-to-ECX
394
395 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
396 5d/pop-to-EBP
397 c3/return
398
399 test-parse-hex-int-single-digit:
400
401 55/push-EBP
402 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
403
404 68/push _test-slice-hex-int-single-letter-end/imm32
405 68/push _test-slice-hex-int-single-letter/imm32
406 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
407
408
409 51/push-ECX
410
411 e8/call parse-hex-int/disp32
412
413 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
414
415
416 68/push "F - test-parse-hex-int-single-digit"/imm32
417 68/push 0xa/imm32
418 50/push-EAX
419
420 e8/call check-ints-equal/disp32
421
422 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
423
424 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
425 5d/pop-to-EBP
426 c3/return
427
428 test-parse-hex-int-multi-digit:
429
430 55/push-EBP
431 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
432
433 68/push _test-slice-hex-int-letters-end/imm32
434 68/push _test-slice-hex-int-letters/imm32
435 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
436
437
438 51/push-ECX
439
440 e8/call parse-hex-int/disp32
441
442 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
443
444
445 68/push "F - test-parse-hex-int-multi-digit"/imm32
446 68/push 0x34a/imm32
447 50/push-EAX
448
449 e8/call check-ints-equal/disp32
450
451 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
452
453 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
454 5d/pop-to-EBP
455 c3/return
456
457 test-parse-hex-int-0x-prefix:
458
459 55/push-EBP
460 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
461
462 68/push _test-slice-hex-int-with-0x-prefix-end/imm32
463 68/push _test-slice-hex-int-with-0x-prefix/imm32
464 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
465
466
467 51/push-ECX
468
469 e8/call parse-hex-int/disp32
470
471 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
472
473
474 68/push "F - test-parse-hex-int-0x-prefix"/imm32
475 68/push 0x34/imm32
476 50/push-EAX
477
478 e8/call check-ints-equal/disp32
479
480 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
481
482 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
483 5d/pop-to-EBP
484 c3/return
485
486 test-parse-hex-int-zero:
487
488 55/push-EBP
489 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
490
491 68/push _test-slice-hex-int-zero-end/imm32
492 68/push _test-slice-hex-int-zero/imm32
493 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
494
495
496 51/push-ECX
497
498 e8/call parse-hex-int/disp32
499
500 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
501
502
503 68/push "F - test-parse-hex-int-zero"/imm32
504 68/push 0/imm32
505 50/push-EAX
506
507 e8/call check-ints-equal/disp32
508
509 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
510
511 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
512 5d/pop-to-EBP
513 c3/return
514
515 test-parse-hex-int-0-prefix:
516
517 55/push-EBP
518 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
519
520 68/push _test-slice-hex-int-with-0-prefix-end/imm32
521 68/push _test-slice-hex-int-with-0-prefix/imm32
522 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
523
524
525 51/push-ECX
526
527 e8/call parse-hex-int/disp32
528
529 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
530
531
532 68/push "F - test-parse-hex-int-0-prefix"/imm32
533 68/push 0x3/imm32
534 50/push-EAX
535
536 e8/call check-ints-equal/disp32
537
538 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
539
540 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
541 5d/pop-to-EBP
542 c3/return
543
544 test-parse-hex-int-negative:
545
546 55/push-EBP
547 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
548
549 68/push _test-slice-hex-int-negative-with-0-prefix-end/imm32
550 68/push _test-slice-hex-int-negative-with-0-prefix/imm32
551 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
552
553
554 51/push-ECX
555
556 e8/call parse-hex-int/disp32
557
558 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
559
560
561 68/push "F - test-parse-hex-int-negative"/imm32
562 68/push 0xfffffffd/imm32
563 50/push-EAX
564
565 e8/call check-ints-equal/disp32
566
567 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
568
569 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
570 5d/pop-to-EBP
571 c3/return
572
573 is-hex-digit?:
574
575 55/push-EBP
576 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
577
578 51/push-ECX
579
580 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 1/r32/ECX 8/disp8 .
581
582 b8/copy-to-EAX 0/imm32/false
583 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x30/imm32
584 7c/jump-if-lesser $is-hex-digit?:end/disp8
585
586 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x66/imm32
587 7f/jump-if-greater $is-hex-digit?:end/disp8
588
589 b8/copy-to-EAX 1/imm32/true
590 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x39/imm32
591 7e/jump-if-lesser-or-equal $is-hex-digit?:end/disp8
592
593 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x61/imm32
594 7d/jump-if-greater-or-equal $is-hex-digit?:end/disp8
595
596 b8/copy-to-EAX 0/imm32/false
597 $is-hex-digit?:end:
598
599 59/pop-to-ECX
600
601 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
602 5d/pop-to-EBP
603 c3/return
604
605 test-hex-below-0:
606
607
608 68/push 0x2f/imm32
609
610 e8/call is-hex-digit?/disp32
611
612 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
613
614
615 68/push "F - test-hex-below-0"/imm32
616 68/push 0/imm32/false
617 50/push-EAX
618
619 e8/call check-ints-equal/disp32
620
621 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
622 c3/return
623
624 test-hex-0-to-9:
625
626
627 68/push 0x30/imm32
628
629 e8/call is-hex-digit?/disp32
630
631 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
632
633
634 68/push "F - test-hex-at-0"/imm32
635 68/push 1/imm32/true
636 50/push-EAX
637
638 e8/call check-ints-equal/disp32
639
640 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
641
642
643 68/push 0x39/imm32
644
645 e8/call is-hex-digit?/disp32
646
647 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
648
649
650 68/push "F - test-hex-at-9"/imm32
651 68/push 1/imm32/true
652 50/push-EAX
653
654 e8/call check-ints-equal/disp32
655
656 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
657 c3/return
658
659 test-hex-above-9-to-a:
660
661
662 68/push 0x3a/imm32
663
664 e8/call is-hex-digit?/disp32
665
666 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
667
668
669 68/push "F - test-hex-above-9-to-a"/imm32
670 68/push 0/imm32/false
671 50/push-EAX
672
673 e8/call check-ints-equal/disp32
674
675 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
676 c3/return
677
678 test-hex-a-to-f:
679
680
681 68/push 0x61/imm32
682
683 e8/call is-hex-digit?/disp32
684
685 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
686
687
688 68/push "F - test-hex-at-a"/imm32
689 68/push 1/imm32/true
690 50/push-EAX
691
692 e8/call check-ints-equal/disp32
693
694 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
695
696
697 68/push 0x66/imm32
698
699 e8/call is-hex-digit?/disp32
700
701 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
702
703
704 68/push "F - test-hex-at-f"/imm32
705 68/push 1/imm32/true
706 50/push-EAX
707
708 e8/call check-ints-equal/disp32
709
710 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
711 c3/return
712
713 test-hex-above-f:
714
715
716 68/push 0x67/imm32
717
718 e8/call is-hex-digit?/disp32
719
720 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
721
722
723 68/push "F - test-hex-above-f"/imm32
724 68/push 0/imm32/false
725 50/push-EAX
726
727 e8/call check-ints-equal/disp32
728
729 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
730 c3/return
731
732 from-hex-char:
733
734
735 3d/compare-EAX-with 0x39/imm32/9
736 7f/jump-if-greater $from-hex-char:else/disp8
737 2d/subtract-from-EAX 0x30/imm32/0
738 c3/return
739 $from-hex-char:else:
740
741 2d/subtract-from-EAX 0x57/imm32/a-10
742 c3/return
743
744 to-hex-char:
745
746
747 3d/compare-EAX-with 0x9/imm32/9
748 7f/jump-if-greater $to-hex-char:else/disp8
749 05/add-to-EAX 0x30/imm32/0
750 c3/return
751 $to-hex-char:else:
752
753 05/add-to-EAX 0x57/imm32/a-10
754 c3/return
755
756 == data
757
758 _test-slice-empty:
759
760 _test-slice-empty-end:
761
762 _test-slice-hex-int:
763 33/3 34/4
764 _test-slice-hex-int-end:
765
766 _test-slice-hex-int-letters-negative:
767 2d/-
768 _test-slice-hex-int-letters:
769 33/3 34/4 61/a
770 _test-slice-hex-int-letters-end:
771
772 _test-slice-hex-int-single-letter:
773 61/a
774 _test-slice-hex-int-single-letter-end:
775
776 _test-slice-char-and-digits:
777 71/q 33/3 34/4
778 _test-slice-char-and-digits-end:
779
780 _test-slice-digits-and-char:
781 33/3 34/4 71/q
782 _test-slice-digits-and-char-end:
783
784 _test-slice-hex-int-with-0x-prefix-negative:
785 2d/-
786 _test-slice-hex-int-with-0x-prefix:
787 30/0 78/x 33/3 34/4
788 _test-slice-hex-int-with-0x-prefix-end:
789
790 _test-slice-hex-int-zero:
791 30/0
792 _test-slice-hex-int-zero-end:
793
794 _test-slice-hex-int-with-0-prefix:
795 30/0 33/3
796 _test-slice-hex-int-with-0-prefix-end:
797
798 _test-slice-hex-int-negative-with-0-prefix:
799 2d/- 30/0 33/3
800 _test-slice-hex-int-negative-with-0-prefix-end:
801
802