Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

current

Public Function
std.debug.cpu_context.X86_16.current
pub inline fn current() X86_16

File

debug/cpu_context.zig:1742
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
    pub inline fn current() X86_16 {
        var ctx: X86_16 = undefined;
        asm volatile (
            \\ movw %%sp, 0x00(%%di)
            \\ movw %%bp, 0x02(%%di)
            \\ movw %%ss, 0x04(%%di)
            \\ pushw %%cs
            \\ call 1f
            \\1:
            \\ popw 0x06(%%di)
            \\ popw 0x08(%%di)
            :
            : [gprs] "{di}" (&ctx.regs.values),
            : .{ .memory = true });
        return ctx;
    }