~yujiri/compiler

465bd73a9192cc28d71f8fd14cd1667ff73e426b — Evin Yulo 1 year, 19 days ago 35c28fd
elf
1 files changed, 2 insertions(+), 2 deletions(-)

M elf.zig
M elf.zig => elf.zig +2 -2
@@ 101,9 101,9 @@ pub fn main() !void {

    // addr: 0x1000: exe
    // mov 60 to rax
    try writer.writeAll("\x48\xc7" ++ "\xc0" ++ "\x00\x00\x00\x03");
    try writer.writeAll("\x48\xc7" ++ "\xc0" ++ "\x3c\x00\x00\x00");
    // mov 6 to rdi
    try writer.writeAll("\x48\xc7" ++ "\xc7" ++ "\x00\x00\x00\x06");
    try writer.writeAll("\x48\xc7" ++ "\xc7" ++ "\x06\x00\x00\x00");
    // syscall
    try writer.writeAll("\x0f\x05");
    // string