zig/test/cases/hello_world_with_updates.6.zig
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00

21 lines
571 B
Zig

const builtin = @import("builtin");
extern "c" fn write(c_int, usize, usize) usize;
pub fn main() void {
print();
print();
}
fn print() void {
const msg = @intFromPtr("What is up? This is a longer message that will force the data to be relocated in virtual address space.\n");
const len = 104;
_ = write(1, msg, len);
}
// run
//
// What is up? This is a longer message that will force the data to be relocated in virtual address space.
// What is up? This is a longer message that will force the data to be relocated in virtual address space.
//