# k0lan4ik/helloos architecture

> Architecture diagram of the GitHub repository k0lan4ik/helloos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/k0lan4ik/helloos
- Repository: https://github.com/k0lan4ik/helloos

## Overview

HelloOS is an educational x86 operating system written in FASM, with separate 16-bit Real Mode and 32-bit Protected Mode versions. The documented 16-bit workflow includes a primary bootloader, a secondary loader that loads the kernel, and kernel components for FAT16, interrupts, and memory. The 32-bit version has a main kernel and documented interrupt, memory, device, input, display, timer, and threading subsystems. Source excerpts were unavailable, so relationships beyond the documented kernel-loading step are not asserted.

Main entry points: [`BootLoad.ASM`](https://github.com/k0lan4ik/helloos/blob/secure-mod/BootLoad.ASM) (Secondary Loader), [`KERNEL/KERNEL.asm`](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/KERNEL.asm) (16-bit Kernel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot16["16-bit Real Mode"]
  node_boot["Primary Loader<br/>[Boot.ASM]"]
  node_bootload["Secondary Loader<br/>[BootLoad.ASM]"]
  node_kernel16["16-bit Kernel<br/>[KERNEL.asm]"]
  node_fs16["FAT16 Driver<br/>[FILESYS.asm]"]
  node_interrupt16["Interrupt Handlers<br/>[INTERPUT.asm]"]
  node_memory16["Memory Management<br/>[MEMORY.asm]"]
end

subgraph group_kernel32["32-bit Kernel"]
  node_kernel32["32-bit Kernel<br/>[KERNEL.asm]"]
  node_interrupt32["Interrupt Table<br/>[Interrupt.asm]"]
  node_handlers32["Interrupt Handlers"]
  node_memory32["Protected Memory"]
end

subgraph group_services32["32-bit Services"]
  node_drivers["Device Drivers"]
  node_input["Input Handling<br/>[Input.asm]"]
  node_screen["Text Display<br/>[ScreenMode03.asm]"]
  node_timer["PIT Timer<br/>[Timer.asm]"]
  node_threads["Thread Support"]
end

node_machine(("x86 Machine"))
node_explorer["File Manager<br/>[EXPLORER.asm]"]

node_bootload -->|"loads kernel"| node_kernel16

click node_boot "https://github.com/k0lan4ik/helloos/blob/secure-mod/Boot.ASM"
click node_bootload "https://github.com/k0lan4ik/helloos/blob/secure-mod/BootLoad.ASM"
click node_kernel16 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/KERNEL.asm"
click node_fs16 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/FILESYS.asm"
click node_interrupt16 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/INTERPUT.asm"
click node_memory16 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/MEMORY.asm"
click node_kernel32 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/KERNEL.asm"
click node_interrupt32 "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Interrupt.asm"
click node_handlers32 "https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Interrupt"
click node_memory32 "https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Memory"
click node_drivers "https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Drivers"
click node_input "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Input.asm"
click node_screen "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/ScreenMode03.asm"
click node_timer "https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Timer.asm"
click node_threads "https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Threads"
click node_explorer "https://github.com/k0lan4ik/helloos/blob/secure-mod/EXPLORERCAM/EXPLORER.asm"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_boot,node_bootload,node_kernel16,node_fs16,node_interrupt16,node_memory16 toneBlue
class node_kernel32,node_interrupt32,node_handlers32,node_memory32 toneAmber
class node_drivers,node_input,node_screen,node_timer,node_threads toneMint
class node_machine toneIndigo
class node_explorer toneTeal
```

## Components

### 16-bit Real Mode

- [Primary Loader](https://github.com/k0lan4ik/helloos/blob/secure-mod/Boot.ASM): `Boot.ASM`
- [Secondary Loader](https://github.com/k0lan4ik/helloos/blob/secure-mod/BootLoad.ASM): `BootLoad.ASM`
- [16-bit Kernel](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/KERNEL.asm): `KERNEL/KERNEL.asm`
- [FAT16 Driver](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/FILESYS.asm): `KERNEL/FILESYS.asm`
- [Interrupt Handlers](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/INTERPUT.asm): `KERNEL/INTERPUT.asm`
- [Memory Management](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL/MEMORY.asm): `KERNEL/MEMORY.asm`

### 32-bit Kernel

- [32-bit Kernel](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/KERNEL.asm): `KERNEL_X32/KERNEL.asm`
- [Interrupt Table](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Interrupt.asm): `KERNEL_X32/Interrupt.asm`
- [Interrupt Handlers](https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Interrupt): `KERNEL_X32/Interrupt`
- [Protected Memory](https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Memory): `KERNEL_X32/Memory`

### 32-bit Services

- [Device Drivers](https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Drivers): `KERNEL_X32/Drivers`
- [Input Handling](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Input.asm): `KERNEL_X32/Input.asm`
- [Text Display](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/ScreenMode03.asm): `KERNEL_X32/ScreenMode03.asm`
- [PIT Timer](https://github.com/k0lan4ik/helloos/blob/secure-mod/KERNEL_X32/Timer.asm): `KERNEL_X32/Timer.asm`
- [Thread Support](https://github.com/k0lan4ik/helloos/tree/secure-mod/KERNEL_X32/Threads): `KERNEL_X32/Threads`

### Other components

- **x86 Machine**
- [File Manager](https://github.com/k0lan4ik/helloos/blob/secure-mod/EXPLORERCAM/EXPLORER.asm): `EXPLORERCAM/EXPLORER.asm`

## Connections

- Secondary Loader → 16-bit Kernel: loads kernel (evidence: `README.md`)
