https://github.com/akkartik/mu/blob/master/examples/ex7.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14 == code 0x09000000
15
16
17
18
19 Entry:
20
21 bb/copy-to-EBX Filename/imm32
22 b9/copy-to-ECX 0x180/imm32/fixed-perms
23 b8/copy-to-EAX 8/imm32/creat
24 cd/syscall 0x80/imm8
25
26
27 bb/copy-to-EBX Filename/imm32
28 b9/copy-to-ECX 1/imm32/wronly
29 ba/copy-to-EDX 0x180/imm32/fixed-perms
30 b8/copy-to-EAX 5/imm32/open
31 cd/syscall 0x80/imm8
32
33 bb/copy-to-EBX Stream/imm32
34 89/copy 0/mod/indirect 3/rm32/EBX . . . 0/r32/EAX . .
35
36
37
38 bb/copy-to-EBX Stream/imm32
39 8b/copy 0/mod/indirect 3/rm32/EBX . . . 3/r32/EBX . .
40
41 b9/copy-to-ECX A/imm32
42 ba/copy-to-EDX 1/imm32/size
43 b8/copy-to-EAX 4/imm32/write
44 cd/syscall 0x80/imm8
45
46
47
48 bb/copy-to-EBX Stream/imm32
49 8b/copy 0/mod/indirect 3/rm32/EBX . . . 3/r32/EBX . .
50
51 b8/copy-to-EAX 6/imm32/close
52 cd/syscall 0x80/imm8
53
54
55 bb/copy-to-EBX Filename/imm32
56 b9/copy-to-ECX 0/imm32/rdonly
57 ba/copy-to-EDX 0x180/imm32/fixed-perms
58 b8/copy-to-EAX 5/imm32/open
59 cd/syscall 0x80/imm8
60
61 bb/copy-to-EBX Stream/imm32
62 89/copy 0/mod/indirect 3/rm32/EBX . . . 0/r32/EAX . .
63
64
65
66 bb/copy-to-EBX Stream/imm32
67 8b/copy 0/mod/indirect 3/rm32/EBX . . . 3/r32/EBX . .
68
69 b9/copy-to-ECX B/imm32
70 ba/copy-to-EDX 1/imm32/size
71 b8/copy-to-EAX 3/imm32/read
72 cd/syscall 0x80/imm8
73
74
75
76 bb/copy-to-EBX Stream/imm32
77 8b/copy 0/mod/indirect 3/rm32/EBX . . . 3/r32/EBX . .
78
79 b8/copy-to-EAX 6/imm32/close
80 cd/syscall 0x80/imm8
81
82
83 bb/copy-to-EBX Filename/imm32
84 b8/copy-to-EAX 0xa/imm32/unlink
85 cd/syscall 0x80/imm8
86
87
88
89 bb/copy-to-EBX B/imm32
90 8b/copy 0/mod/indirect 3/rm32/EBX . . . 3/r32/EBX . .
91
92 b8/copy-to-EAX 1/imm32/exit
93 cd/syscall 0x80/imm8
94
95 == data 0x0a000000
96
97 Stream:
98 0/imm32
99 A:
100 61/imm32/A
101 B:
102 0/imm32
103 Filename:
104 2e 66 6f 6f 00 00 00 00
105
106
107