Skip to content

glossary

Mohiuddin Khan Inamdar edited this page Jun 21, 2026 · 3 revisions

Glossary

Concise definitions of every term used across the MyOS-Simple wiki, each linked to its concept page.

Alphabetical where practical, otherwise grouped by topic. Each entry is one to three sentences; follow the link for the full treatment.

A

A20 line — The 21st address line (bit 20). On the original PC it was forced low for 8086 compatibility, wrapping addresses at 1 MiB. It must be enabled to use memory above 1 MiB in protected mode; modern firmware/QEMU enable it before the OS runs.

Attribute byte — The second byte of each VGA text cell, encoding background << 4 | foreground (4-bit color each). It sets the color of the character byte beside it.

B

BCD (Binary-Coded Decimal) — Each decimal digit stored in its own nibble, so 59 decimal is 0x59, not 0x3B. The CMOS RTC returns time fields in BCD by default; the kernel converts with ((bcd >> 4) * 10) + (bcd & 0x0F).

BIOS — The firmware that runs at power-on, performs POST, and loads the boot sector. It provides real-mode services (int 0x10, int 0x13, int 0x16) that vanish once in protected mode.

Boot sector — The first 512-byte sector of the boot disk, loaded by the BIOS to 0x7C00 and ending in the 0xAA55 signature. See boot sector.

0xAA55 boot signature — The two-byte marker the BIOS checks at offset 510–511 of the boot sector. Stored little-endian as the bytes 55 AA. Its absence means "not bootable."

C

CHS addressing — Cylinder-Head-Sector disk geometry used by int 0x13. Sectors are 1-based, so the boot sector is sector 1 and the kernel begins at sector 2.

CMOS / RTC — Battery-backed CMOS RAM containing the real-time clock. Read via ports 0x70 (register select) and 0x71 (data). See CMOS / RTC.

Context switch — Saving one task's CPU state (registers, stack) and restoring another's, so execution resumes where it left off. The basis of multitasking.

Cooperative vs preemptive multitasking — Cooperative: a task runs until it voluntarily yields (process_yield()); preemptive: a timer interrupt forcibly switches tasks. MyOS-Simple is purely cooperative — see cooperative scheduling.

CR0 / PE bit — Control register 0; setting bit 0 (the Protection Enable bit) switches the CPU into protected mode. MyOS-Simple does or eax, 0x1; mov cr0, eax.

crt0 / startup — The C runtime startup object that normally sets up the stack, zeroes .bss, and calls main. A freestanding build omits it (-nostartfiles); a hand-written assembly stub jumps to the kernel entry instead.

F

Far jump — A jump that reloads CS along with EIP. After setting CR0.PE, jmp CODE_SEG:init_pm flushes the prefetch pipeline and loads the new code selector, completing the switch to protected mode.

Fixed-point arithmetic — Representing fractions with scaled integers instead of an FPU. The calc command scales by 1000 (three decimals). See fixed-point arithmetic.

Flat binary — A raw output file with no headers, just the bytes to load and run. The boot sector is built nasm -f bin; the BIOS executes it directly. See toolchain-and-build.

Flat memory model — All segments span the whole 4 GiB at base 0, so a pointer equals a physical address. Established by the GDT entries with limit 0xFFFFF and 4 KiB granularity.

Framebuffer — A memory region whose contents the display hardware renders. The VGA text framebuffer is at 0xB8000; writing it changes the screen — see VGA text mode.

Freestanding C — C compiled without a hosted runtime or standard library; main has no special meaning and only the language core is assumed. See freestanding C.

G

GDT (Global Descriptor Table) — The table of segment descriptors the CPU consults in protected mode. MyOS-Simple installs three entries (null, code, data) — see GDT and the descriptor format reference.

GDB stub — A debug server inside QEMU (enabled by -s, i.e. -gdb tcp::1234) that a host gdb connects to with target remote :1234. With -S the CPU halts at reset. See debugging with GDB.

I

IVT (Interrupt Vector Table) — The real-mode table at physical 0x00000: 256 entries of 4 bytes (segment:offset) per interrupt. Used by BIOS services; irrelevant once in protected mode.

L

libc — The C standard library. Absent here; there is no printf, malloc, or strlen unless the kernel writes its own. See freestanding C.

Linker script — A file (linker.ld) telling ld where to place each section. It puts .text at 0x1000 so execution starts at the first byte. See linker scripts.

M

MMIO (Memory-Mapped I/O) — Talking to a device by reading/writing ordinary memory addresses instead of I/O ports. The VGA framebuffer at 0xB8000 is MMIO.

N

NASM — The Netwide Assembler, used for the boot sector (-f bin) and the kernel entry stub (-f elf32). See toolchain-and-build.

P

Paging — Hardware translation of virtual to physical addresses via page tables. Not used in MyOS-Simple — every address is physical, which is why the memory map lists physical addresses throughout.

PCB (Process Control Block) — The struct holding a process's PID, name, state, and saved context. The unit the scheduler manages.

Polling vs interrupts — Polling repeatedly reads a status register to check for events; interrupts let the device signal the CPU. MyOS-Simple polls the keyboard (status bit 0 of port 0x64).

POST (Power-On Self-Test) — The firmware's hardware check at startup, before it loads the boot sector.

Protected mode — The 32-bit CPU mode with segment descriptors, privilege rings, and a 4 GiB address space, entered by setting CR0.PE. See protected mode.

R

Real mode — The 16-bit mode the CPU boots into: 1 MiB address space, segment:offset addressing, BIOS services available. See real mode.

Round-robin — Scheduling that cycles through ready tasks in order, each getting a turn. MyOS-Simple's scheduler is cooperative round-robin — see cooperative scheduling.

S

Scancode (Set 1, make/break) — The byte a key sends. A make code on press, a break code (make | 0x80) on release. Translated via the scancode tables. See scancodes.

Sector — The smallest addressable disk unit, 512 bytes here. The image is padded to a whole number of sectors with truncate — see toolchain-and-build.

Segment descriptor — An 8-byte GDT entry defining a segment's base, limit, and access rights. Decoded bit-by-bit in the descriptor format reference.

Segment:offset — Real-mode addressing where a linear address is segment × 16 + offset. Replaced by selectors in protected mode. See real mode.

Selector — A value loaded into a segment register that indexes the GDT (low 3 bits = RPL and table indicator). CODE_SEG = 0x08, DATA_SEG = 0x10. See descriptor format.

U

UIP flag (Update-In-Progress) — Bit in CMOS Status Register A signaling the RTC is mid-update; reading time fields during it can return inconsistent values. MyOS-Simple does not synchronize against it — see CMOS / RTC.

V

VGA text mode — An 80×25 grid of character cells at 0xB8000, each a character byte plus an attribute byte. See VGA text mode.

Q

QEMU — The machine emulator that boots the disk images (qemu-system-x86_64 -drive format=raw,file=…) and provides the GDB stub. See toolchain-and-build.

Other

8042 controller — The PS/2 keyboard controller chip. Status on port 0x64, data on 0x60. See PS/2 keyboard & the 8042.

💡 Tidbit: 0xAA55 is stored on disk little-endian, so a hex dump of the boot sector shows the bytes 55 AA at offsets 510 and 511 — not AA 55. Reading them as a 16-bit word gives 0xAA55 back.

⚠️ Caveat: "Protected mode" does not by itself mean memory protection between tasks. With a flat model and no paging, every task can read and write all 4 GiB; the term refers to the privilege/segment machinery, not isolation.

💡 Tidbit: eflags bit 9 (0x200) is the Interrupt Flag (IF). The bootloader's cli clears it before switching modes so a stray interrupt cannot fire while the IVT is no longer valid and the GDT/IDT are mid-setup.

See also

Clone this wiki locally