https://github.com/akkartik/mu/blob/master/apps/random.subx
1
2
3
4
5
6
7 == code 0x09000000
8
9
10
11
12 Entry:
13
14 bb/copy-to-ebx Filename/imm32
15 b9/copy-to-ecx 0/imm32/rdonly
16 ba/copy-to-edx 0x180/imm32/fixed-perms
17 e8/call syscall_open/disp32
18
19 89/copy 3/mod/direct 6/rm32/esi . . . 0/r32/eax . .
20
21 $loop:
22
23
24 89/copy 3/mod/direct 3/rm32/ebx . . . 6/r32/esi . .
25 b9/copy-to-ecx N/imm32
26 ba/copy-to-edx 4/imm32/size
27 e8/call syscall_read/disp32
28
29
30
31 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . N/disp32
32 68/push Stdout/imm32
33
34 e8/call write-int32-hex-buffered/disp32
35
36
37
38 68/push Newline/imm32
39 68/push Stdout/imm32
40
41 e8/call write-buffered/disp32
42
43 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
44
45 eb/jump $loop/disp8
46
47
48 bb/copy-to-ebx 0/imm32
49 e8/call syscall_exit/disp32
50
51 == data 0x0a000000
52
53 N:
54 0/imm32
55 Filename:
56 2f 64 65 76 2f 72 61 6e 64 6f 6d 00
57
58
59