https://github.com/akkartik/mu/blob/master/subx/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
16
17 bb/copy-to-EBX 0/imm32
18
19 b9/copy-to-ECX X/imm32
20
21 ba/copy-to-EDX 1/imm32
22
23 b8/copy-to-EAX 3/imm32/read
24 cd/syscall 0x80/imm8
25
26
27
28 bb/copy-to-EBX 1/imm32
29
30 b9/copy-to-ECX X/imm32
31
32 ba/copy-to-EDX 1/imm32
33
34 b8/copy-to-EAX 4/imm32/write
35 cd/syscall 0x80/imm8
36
37
38 b8/copy-to-EAX 1/imm32/exit
39 cd/syscall 0x80/imm8
40
41