-
-
Notifications
You must be signed in to change notification settings - Fork 5
Userspace
kazah-png edited this page Jul 6, 2026
·
10 revisions
Ring-3 ELF64 loading with full address-space isolation.
See also: Syscalls, Process Management, Security, Architecture
Validates ELF64 magic, parses PT_LOAD segments, maps code/data at p_vaddr, allocates stack at 0xD0000000.
- Private PML4 per process (no identity mapping in user tables)
- NX bit on user stack and data pages
- SMEP (optional): kernel can't execute user pages
- Kernel entry at PML4[511] cloned from master kernel PML4
Minimal C library: printf, snprintf, malloc, free, file I/O wrappers via Syscalls.
Nyx C is a Go/Zig-inspired typed subset of C that transpiles to C and links against the nyxrt runtime. The runtime provides:
-
Types:
nyx_str,nyx_slice,nyx_result, fixed-width ints -
Syscall ABI:
__nyx_syscall6for all ring-3 syscalls -
String interpolation:
__nyx_fmt_begin/_str/_i64for"{var}"syntax
Assembly entry that extracts argc/argv from stack, calls main(), then exit().
| Binary | Description |
|---|---|
hello.elf |
Minimal "Hello World" in assembly |
init.elf |
Syscall regression test (getpid, malloc, file I/O) |
spin.elf |
Spin loop for multitasking testing |
fdleak.elf |
Tests fd cleanup on process exit |
hello_nyx.elf |
Primer programa Nyx C — write + getpid + string interpolation |
NyxOS v6.4.363 · GPL v2 · GitHub · uselessalter on Discord · nyxos@inbox.lv
NyxOS Wiki
Getting started
Kernel
Storage & network
Graphics & apps
Userspace
HOWTO
- HOWTO-Add-a-system-call
- HOWTO-Write-a-userspace-program
- HOWTO-Add-a-shell-command
- HOWTO-Add-a-GUI-application
Reference
- Syscall-Reference
- Command-Reference
- Hardware-Reference
- Format-Reference
- Kernel-Data-Structures
- Source-Tree-Reference
Project