Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

syscall0

alpha.syscall0
pub fn syscall0(number: SYS) u64

File

Code

pub fn syscall0(number: SYS) u64 {
    return asm volatile (
        \\ callsys
        \\ beq $19, 1f
        \\ negq $0, $0
        \\1:
        : [ret] "={$0}" (-> u64),
        : [number] "{$0}" (number),
        : .{
          .r1 = true,
          .r2 = true,
          .r3 = true,
          .r4 = true,
          .r5 = true,
          .r6 = true,
          .r7 = true,
          .r8 = true,
          .r22 = true,
          .r23 = true,
          .r24 = true,
          .r25 = true,
          .r27 = true,
          .r28 = true,
          .memory = true,
          .r16 = true,
          .r17 = true,
          .r18 = true,
          .r20 = true,
          .r21 = true,
        });
}