KagamiOS ASM Edition

x86 Operation System

KagamiOS is an opearting system for x86 PCs, written in assembly language. It is a learning tool to show how simple 16-bit, real-mode OSes work. Features:

  • A text-mode dialog and menu-driven interface.
  • Boots from a floppy disk, CD-ROM or USB drive.
  • Over 60 system calls for use by third-party programs.
  • File manager, text editor, image viewer, games…
  • Includes a BASIC interpreter with 46 instructions.
  • PC speaker sound and serial terminal connection.

The code is completely open source (under a BSD-like license), and written by Team KagamineP.
KagamiOS is a fork of MikeOS by Mike Saunders.


The link below contains the source code (see the source and programs directories), along with disk images for floppy, USB drive and CD-Rs in the disk_images folder.

You can write the images to a floppy disk, USB drive or CD-R and boot your PC from them to test — or use a PC emulator such as QEMU, VirtualBox, VMware and Hyper-V. See the User Handbook below for a guide. System requirements: minimum 386 PC with a keyboard and 1MB of RAM.


Here are some forked add-on programs:

  • KagamiBASIC apps — Visualizer, Calculator, Memory Manipulator, KagamiBASIC++ dev kit and more.
  • Mouse library — Add mouse support to KagamiOS programs.
  • KagamiOS C library (84K) — Write programs in C (see Readme.txt)
  • KagamiOS Xfer (68K) — Xmodern file uploader (see Xfer.htm) based on MikeOS Xfer.
  • BFM File Manager — With editor and viewer by Ondrej Cerman.
  • BIN2POKE — Convert .bin files to BASIC POKE routines, from Paulo Valongo.

And projects that use KagamiOS:

  • Analogue to Digital Converter (244K) — Project for Education.
  • Test Card Generator (17K) — Basic engineering tool (see README.TXT)
  • Monitor alignment tool (14K) — Written in KagamiOS BASIC.
  • Arduino project (216K) — Arduino Diecimila board access using KagamiOS.
  • USB keyboard project (585K) — USB KB I/O project/guidelines.


There is screenshots of KagamiOS ASM Edition:


These four Handbooks provide the complete documentation for KagamiOS:

  • User handbook — Running KagamiOS and programs.
  • BASIC App Developer Handbook — Writting KagamiOS software in BASIC.
  • Assemblt App Developer Handbook — Writting KagamiOS software in assembly language.
  • Forth Handbook — For using the supplied Forth interpreter KagamiOS.
  • System Developer Handbook — Modyfying and building the OS.

Note that the handbooks are also included with KagamiOS, in the doc directory. If you’re new to the world of OS development, see our guide: write a simple assembly language operating system from scratch.