https://github.com/akkartik/mu/blob/master/examples/ex4.subx
1
2
3
4
5
6
7 == data 0x0a000000
8
9
10 X:
11 0/imm32
12
13 == code 0x09000000
14
15 Entry:
16
17
18 bb/copy-to-EBX 0/imm32
19
20 b9/copy-to-ECX X/imm32
21
22 ba/copy-to-EDX 1/imm32
23
24 b8/copy-to-EAX 3/imm32/read
25 cd/syscall 0x80/imm8
26
27
28
29 bb/copy-to-EBX 1/imm32
30
31 b9/copy-to-ECX X/imm32
32
33 ba/copy-to-EDX 1/imm32
34
35 b8/copy-to-EAX 4/imm32/write
36 cd/syscall 0x80/imm8
37
38
39 b8/copy-to-EAX 1/imm32/exit
40 cd/syscall 0x80/imm8
41
42