https://github.com/akkartik/mu/blob/master/apps/ex7.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14 == code
15
16
17
18
19 Entry:
20
21 bb/copy-to-ebx Filename/imm32
22 b9/copy-to-ecx 0x180/imm32/fixed-perms
23 e8/call syscall_creat/disp32
24
25
26 bb/copy-to-ebx Filename/imm32
27 b9/copy-to-ecx 1/imm32/wronly
28 ba/copy-to-edx 0x180/imm32/fixed-perms
29 e8/call syscall_open/disp32
30
31 bb/copy-to-ebx Stream/imm32
32 89/copy 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . .
33
34
35
36 bb/copy-to-ebx Stream/imm32
37 8b/copy 0/mod/indirect 3/rm32/ebx . . . 3/r32/ebx . .
38
39 b9/copy-to-ecx A/imm32
40 ba/copy-to-edx 1/imm32/size
41 e8/call syscall_write/disp32
42
43
44
45 bb/copy-to-ebx Stream/imm32
46 8b/copy 0/mod/indirect 3/rm32/ebx . . . 3/r32/ebx . .
47
48 e8/call syscall_close/disp32
49
50
51 bb/copy-to-ebx Filename/imm32
52 b9/copy-to-ecx 0/imm32/rdonly
53 ba/copy-to-edx 0x180/imm32/fixed-perms
54 e8/call syscall_open/disp32
55
56 bb/copy-to-ebx Stream/imm32
57 89/copy 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . .
58
59
60
61 bb/copy-to-ebx Stream/imm32
62 8b/copy 0/mod/indirect 3/rm32/ebx . . . 3/r32/ebx . .
63
64 b9/copy-to-ecx B/imm32
65 ba/copy-to-edx 1/imm32/size
66 e8/call syscall_read/disp32
67
68
69
70 bb/copy-to-ebx Stream/imm32
71 8b/copy 0/mod/indirect 3/rm32/ebx . . . 3/r32/ebx . .
72
73 e8/call syscall_close/disp32
74
75
76 bb/copy-to-ebx Filename/imm32
77 e8/call syscall_unlink/disp32
78
79
80
81 bb/copy-to-ebx B/imm32
82 8b/copy 0/mod/indirect 3/rm32/ebx . . . 3/r32/ebx . .
83
84 e8/call syscall_exit/disp32
85
86 == data
87
88 Stream:
89 0/imm32
90 A:
91 61/imm32/A
92 B:
93 0/imm32
94 Filename:
95 2e 66 6f 6f 00 00 00 00
96
97
98