📄 nanochess/bootOS/getting-started/quickstart

File: quickstart.md | Updated: 11/18/2025

Quick Start Guide

An interactive tutorial to get you started with bootOS.

Step 1: Build and Run

Build bootOS:

make

Run in QEMU:

make runqemu

You should see the bootOS prompt:

$

Step 2: Initialize the System

Before using bootOS, format the disk:

$format
bootOS
$

This initializes the directory structure and copies bootOS to the boot sector.

Step 3: Basic Commands

Try these basic commands:

Show Version

$ver
bootOS
$

List Directory

$dir
$

The directory is empty since we just formatted.

Step 4: Create Your First Program

Let's create a "Hello, World" program.

Enter the Program

Type enter to start entering hexadecimal code:

$enter
h

Now enter the machine code for "Hello, World":

hbb 17 7c 8a 07 84 c0 74 0c 53 b4 0e bb 0f 00 cd
h10 5b 43 eb ee cd 20 48 65 6c 6c 6f 2c 20 77 6f
h72 6c 64 0d 0a 00
h

Press Enter on an empty line to finish.

Save the Program

Now give it a name:

*hello
$

Step 5: Run Your Program

List the directory:

$dir
hello
$

Run the program:

$hello
Hello, world
$

Congratulations! You've created and run your first bootOS program.

Step 6: File Management

Create Another File

Create a second program:

$enter
hcd 20
h
*goodbye
$

This creates a program that just exits (int 0x20).

List Files

$dir
hello
goodbye
$

Delete a File

$del goodbye
$dir
hello
$

Understanding the Machine Code

The "Hello, World" program in assembly:

; Point to string
mov bx, 0x7c17

loop:
; Load character
mov al, [bx]
test al, al
jz done

; Print character
push bx
mov ah, 0x0e
mov bx, 0x000f
int 0x10
pop bx
inc bx
jmp loop

done:
; Exit to OS
int 0x20

; String data
db "Hello, world", 0x0d, 0x0a, 0x00

Next Steps

Learn More About Commands

See the Commands Reference for all available commands.

Write Programs

Check out Creating Programs to learn how to write programs for bootOS.

Explore the API

Read about System Interrupts to use bootOS services in your programs.

Try Existing Software

bootOS has a growing collection of games and utilities. See Available Software.

Common Tasks

Copy the Last Executed Program

$hello
Hello, world
$enter
h            (just press Enter on first prompt)
*hello2
$

This copies the hello program to hello2.

Hexadecimal Input Tips

  • Enter bytes in pairs: ff 00 12 ab
  • Break input into chunks (4, 8, or 16 bytes per line)
  • Maximum line length is 128 characters
  • Press Enter on empty line to finish

Managing Limited Space

bootOS supports up to 32 files (one per track). To make room:

$dir
file1
file2
file3
$del file1

Troubleshooting

"Oops" Error

This error appears when:

  • File not found
  • Cannot load file
  • Cannot save file

Program Doesn't Work

  • Verify you entered the hexadecimal correctly
  • Check that the program ends with int 0x20 (cd 20) to exit
  • Programs must be boot sector style (loaded at 0x7C00)

Can't Save More Files

The directory is limited to 32 files. Delete unused files with del.

Practice Exercises

  1. Create a program that just exits
  2. Modify the Hello World program to print your name
  3. Create multiple programs and manage them
  4. Experiment with copying programs using the enter command

Getting Help