https://github.com/akkartik/mu/blob/main/baremetal/112read-byte.subx
1 == code
2
3
4
5
6
7
8
9
10 read-byte:
11
12 55/push-ebp
13 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
14
15 51/push-ecx
16 56/push-esi
17
18 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
19
20 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
21
22 3b/compare 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
23 0f 8d/jump-if->= $read-byte:end/disp32
24
25 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
26 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
27
28 ff 0/subop/increment 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 .
29 $read-byte:end:
30
31 5e/pop-to-esi
32 59/pop-to-ecx
33
34 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
35 5d/pop-to-ebp
36 c3/return
37
38