Apperentis – Open Source Operating System

LEVEL: Expert

Whats in this post?

  1. Code
  2. Output
  3. Background and Explanation of the code
  4. Download Code


To copy code: Click  View Source “View Source” on the right of this code snippet.

Background and Explanation of the code

Prerequisites: Good knowledge of operating systems concepts - kernel, shell, interrupts, boot process, knowledge of C/C++ and assembly language. Basic knowledge of memory management, file management, disk management, process management, though these are not implemented as of now.

Apperentis is a an open source monolithic kernel based very basic operating system under development. It has been written in assembly language and C. Apperentis can be installed and run through a floppy disk, virtual machine or a disk drive. You are free to download it, access it, modify it and freely distribute it. Apperentis is a good start for those who want to learn how to start building their own very basic kernel. Current development scenario is as follows:
  • Very basic graphics engine has been implemented (graphical boot screen and graphical login)
  • Default font library has been made
  • Routines to make new commands and accept them- done
  • Interrupts section being worked upon to implement mouse support

Files information:

Kernel.cpp – The core kernel file that includes all other header files. Implements kernel logic, boot screen, welcome screen, font, window creation and shell (command line interface) for very basic commands.

Graphics.cpp – Implements core graphics functionalities – Video driver initialization, text and graphics mode, drawing of pixels, lines and rectangles, mouse support.

Mem.cpp – Uses interrupts to know RAM and VRAM size

String.cpp – Basic string processing functions  – string compare, copy, len and concat.

Sys.cpp – All routine functions such as clear screen, cursor position, get and put char and string, color settings etc.

Time.cpp – Gets system date and time

Video.cpp – Detects video card type – vga or mono and initializes it

Header Files:

Config.h – Basic kernel configurations

Defs.h – byte, word and color definitions

Graphics.h – Prototypes and definitions for graphics.cpp

Mem.h – Prototypes and definitions for mem.cpp

String.h – Prototypes and definitions for string.cpp

Sys.h – Prototypes and definitions for sys.cpp

Time.h – Prototypes and definitions for time.cpp

Video.h – Prototypes and definitions for video.cpp