Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NyxOS, rebuilt from scratch in Pascal — a freestanding 64-bit kernel that boots on bare metal

     


About

Part of the NyxOS family — the same OS, rebuilt from zero in a different language each time. This is the Pascal cut, compiled with Free Pascal.

The interesting part is stripping the runtime away: the kernel is a Free Pascal unit, not a program, so there is no RTL startup and no heap. Compiled with -Cn for the x86_64 target it produces a freestanding object that exports a single kmain and — with short strings and range/stack checks off — references no external runtime symbols at all. A Multiboot assembly stub enables SSE, identity-maps memory, switches the CPU to long mode, and calls kmain, which paints the banner straight into VGA text memory.

NyxOS-Pascal booting in QEMU

NyxOS-Pascal booting in QEMU (GRUB → long mode → Pascal) on the VGA text buffer

Why Pascal: a whole generation of Apple's system software — Lisa OS and the classic Macintosh Toolbox — was written in Pascal, and Ultibo proves Free Pascal still runs bare-metal today.

Build & run

Needs fpc, nasm, ld, grub-mkrescue + xorriso, and qemu.

make        # -> nyxos-pascal.iso  (64-bit ELF booted via GRUB)
make run    # boot the ISO in QEMU

Because the kernel is a 64-bit ELF, it boots from a GRUB ISO (qemu -cdrom) rather than qemu -kernel.

Layout

  • kernel.pas — the freestanding Pascal kernel (VGA console), a unit exporting kmain
  • boot64.asm — Multiboot header + the 32-bit → long-mode trampoline that calls kmain
  • linker64.ld — links the 64-bit kernel at 1 MiB, Multiboot header first
  • grub.cfg / Makefile — ISO packaging and boot

Status

Early — it boots and paints the screen. Next up: a GDT/IDT, interrupts, and a VGA console.

About

NyxOS, rebuilt from scratch in Pascal — a freestanding x86_64 OS. Part of the NyxOS family.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages