mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
21 lines
338 B
Zig
21 lines
338 B
Zig
pub fn main() void {
|
|
print(4, 2);
|
|
print(3, 7);
|
|
}
|
|
|
|
fn print(a: u32, b: u32) void {
|
|
asm volatile ("svc #0"
|
|
:
|
|
: [number] "{r7}" (4),
|
|
[arg3] "{r2}" (a | b),
|
|
[arg1] "{r0}" (1),
|
|
[arg2] "{r1}" (@ptrToInt("123456789")),
|
|
: "memory"
|
|
);
|
|
return;
|
|
}
|
|
|
|
// run
|
|
//
|
|
// 1234561234567
|