Minimal Zlang bytecode runtime booting in a bare-metal x86_64 kernel

High-cde1 pts0 comments

ZDOS/os/x86_64 at main · high-cde/ZDOS · GitHub

//files/disambiguate" data-turbo-transient="true" />

Skip to content

Search/

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

high-cde

ZDOS

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

FilesExpand file tree

main

/x86_64<br>Copy path

Directory actions

More options<br>More options

Directory actions

More options<br>More options

Latest commit

History<br>History<br>History

main

/x86_64<br>Copy path

Top

Folders and files<br>NameNameLast commit message<br>Last commit date<br>parent directory<br>..<br>assets

assets

boot

boot

include

include

kernel

kernel

programs

programs

tools

tools

ARCHITECTURE.md

ARCHITECTURE.md

LEARNING_PATH.md

LEARNING_PATH.md

Makefile

Makefile

README.md

README.md

linker.ld

linker.ld

View all files

README.md<br>Outline<br>ZDOS x86_64 — prototipo avviabile con Zlang

Questo percorso costruisce un’immagine ISO bootabile in QEMU. L’immagine contiene un kernel bare-metal x86_64, una console seriale COM1 e un runtime Zlang minimo che esegue un programma incorporato durante il boot.

Prerequisiti

Sono necessari gcc, ld, make, python3, grub-mkrescue, xorriso e qemu-system-x86_64. Il compilatore Zlang viene cercato, per impostazione predefinita, nel clone affiancato ../../../../Zlang/tools/zlangc.py rispetto a questa directory; il percorso può essere sovrascritto con la variabile ZLANGC.

Compilazione totale

Dalla directory os/x86_64:

make clean<br>make all

La sequenza costruisce il seguente percorso:

Passaggio<br>Input<br>Output

Compilazione Zlang<br>programs/boot.zlang<br>build/programs/boot.zlb e header C incorporato

Compilazione kernel<br>bootstrap assembly e C freestanding<br>build/zdos.elf

Packaging bootabile<br>kernel ELF e configurazione GRUB<br>build/zdos-x86_64.iso

Per verificare che il kernel sia caricato da GRUB con Multiboot2:

make verify

Per avviare manualmente l’ISO in QEMU e osservare COM1 sulla console:

make run

Per eseguire la prova end-to-end automatica:

sh tools/verify_qemu.sh

L’esito positivo deve contenere ZDOS x86_64 bootstrap, Zlang runtime v1 ready, ZDOS: native Zlang program executed e ZDOS: Zlang halted cleanly.

Per comprendere il flusso, il formato bytecode e i confini tra programma, runtime e kernel, segui il Laboratorio ZDOS x86_64 + Zlang . La guida include esercizi riproducibili, esempi negativi e la progressione teorica verso capacità future.

Profilo Zlang disponibile

Il profilo ZLB0 v1 supporta soltanto:

emit Testo da inviare alla console seriale

Righe vuote e commenti con # sono ignorati. Ogni altra sintassi viene rifiutata dal compilatore con exit status non-zero. Il runtime nel kernel convalida magic, versione, opcode, lunghezze e terminazione; non esegue bytecode sconosciuto.

Limiti espliciti

Questo è un prototipo di OS avviabile , non un sistema operativo generale. Non include ancora processo utente, scheduling, filesystem, driver, rete, multitasking, isolamento di memoria, caricamento ELF, package manager o syscall pubbliche. Il programma Zlang è incorporato nel kernel per dimostrare una catena nativa verificabile; un loader di programmi esterni è un passo futuro, non una funzionalità già disponibile.

You can’t perform that action at this time.

zlang x86_64 kernel zdos runtime directory

Related Articles