https://github.com/akkartik/mu/blob/master/subx/055stream.subx
1
2
3
4
5
6
7
8
9
10
11
12 == code
13
14
15
16
17 clear-stream:
18
19 55/push-EBP
20 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
21
22 50/push-EAX
23 51/push-ECX
24
25 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 0/r32/EAX 8/disp8 .
26
27 8b/copy 1/mod/*+disp8 0/rm32/EAX . . . 1/r32/ECX 8/disp8 .
28
29 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 0xc/disp8 .
30
31 c7 0/subop/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32
32
33 c7 0/subop/copy 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 0/imm32
34
35 81 0/subop/add 3/mod/direct 0/rm32/EAX . . . . . 0xc/imm32
36
37 $clear-stream:loop:
38
39 39/compare 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . .
40 73/jump-if-greater-or-equal-unsigned $clear-stream:end/disp8
41
42 c6 0/subop/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm8
43
44 40/increment-EAX
45 eb/jump $clear-stream:loop/disp8
46 $clear-stream:end:
47
48 59/pop-to-ECX
49 58/pop-to-EAX
50
51 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
52 5d/pop-to-EBP
53 c3/return
54
55 rewind-stream:
56
57 55/push-EBP
58 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . <