0000000004_ ๐Ÿ“˜ VDOS Step 04: Shell with Commands - MohammadMovi/VDOS GitHub Wiki

๐Ÿ“Œ Overview

In this step, the VDOS Shell evolves from a keystroke echoer into a primitive command-line interpreter, allowing it to recognize typed commands and take action.

๐Ÿงฌ Key Concepts

  • Manual string matching via BIOS-level Assembly
  • Command buffer using DI register
  • Echo loop terminated by Enter key (0x0D)
  • Handling multiple commands via simple compare routine

๐Ÿ›  BIOS Interrupts Used

Interrupt Purpose
int 10h Display characters on screen
int 16h Read keyboard input

๐Ÿงช Test Workflow

nasm -f bin shell.asm -o shell.img
qemu-system-x86_64 -drive format=raw,file=shell.img

Then test:

  • help
  • vdos
  • clear

๐Ÿงพ Example Interaction

๐ŸŸข VDOS Shell Ready
> help
Commands: help, clear, vdos

> vdos
VDOS v0.1 - Real Mode Shell

> clear
[screen clears]

๐Ÿ” Takeaways

  • Foundation of shell parsing in bare-metal environments
  • How command-line systems work at BIOS level
  • How to handle keyboard, screen, and memory in raw Assembly

๐Ÿงญ Next Steps

โ†’ INT 13h: Reading sectors from disk โ†’ Implementing a basic file system parser โ†’ Running custom programs from disk