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