https://github.com/akkartik/mu/blob/master/310copy-bytes.subx
1
2
3 == code
4
5 copy-bytes:
6
7
8
9
10
11
12
13
14
15
16
17
18 55/push-ebp
19 89/<- %ebp 4/r32/esp
20
21 50/push-eax
22 51/push-ecx
23 52/push-edx
24 56/push-esi
25 57/push-edi
26
27 8b/-> *(ebp+8) 6/r32/esi
28
29 8b/-> *(ebp+0xc) 7/r32/edi
30
31 b9/copy-to-ecx 0/imm32
32
33 8b/-> *(ebp+0x10) 2/r32/edx
34 {
35
36 39/compare %ecx 2/r32/edx
37 7d/jump-if->= break/disp8
38
39 8a/byte-> *esi 0/r32/AL
40 88/byte<- *edi 0/r32/AL
41
42 46/increment-esi
43 47/increment-edi
44 41/increment-ecx
45 eb/jump loop/disp8
46 }
47 $copy-bytes:end:
48
49 5f/pop-to-edi
50 5e/pop-to-esi
51 5a/pop-to-edx
52 59/pop-to-ecx
53 58/pop-to-eax
54
55 89/<- %esp 5/r32/ebp
56 5d/pop-to-ebp
57 c3/return