📄 nanochess/bootOS/api/interrupts

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

System Interrupts

Complete reference for all bootOS interrupt services.

INT 0x20 - Exit to Operating System

Purpose: Return control to bootOS

Parameters: None

Returns: Does not return

Example:

int 0x20        ; Exit to OS

INT 0x21 - Input Key

Purpose: Read keyboard with echo

Returns: AL = ASCII key

Example:

int 0x21        ; Read key into AL

INT 0x22 - Output Character

Purpose: Display character

Parameters: AL = character

Example:

mov al,'A'
int 0x22        ; Print 'A'

INT 0x23 - Load File

Purpose: Load file from disk

Parameters:

  • DS:BX = Filename
  • ES:DI = Buffer (512 bytes)

Returns: CF = 0 (success) or 1 (error)

Example:

mov bx,filename
mov di,buffer
int 0x23
jc error

INT 0x24 - Save File

Purpose: Save file to disk

Parameters:

  • DS:BX = Filename
  • ES:DI = Data (512 bytes)

Returns: CF = 0 (success) or 1 (error)

INT 0x25 - Delete File

Purpose: Delete file

Parameters: DS:BX = Filename

Returns: CF = 0 (success) or 1 (error)

Related Documents