Skip to content

originalmk/mkos32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💾 MKOS32

MKOS32 is very basic operating system, the only thing it can do is printing current date and time twice a second.

mkos running in bochs emulator

Steps

General list of steps which led me to the current state of project:

  1. Cross compilation, preparing gcc and bintuils to compile programs for my OS
  2. Loading operation system, I used GRUB and Multiboot 1 to achieve that
  3. Printing text (useful for debugging), based on VGA, based on osdev wiki code, but extended with ability to:
    • scrolling text when there is no space left
    • ability to use newline character
    • printing numbers in various bases or with '0' padding
    • basic and limited printf
  4. Setting up GDT to a flat memory model (currently only supported model in newer versions of GCC) - for memory protection/isolation paging should be used
    • sources/gdt.h
    • refreshing segment registers (far jump for CS)
    • placing GDT table in memory and loading it using lgdt instruction
  5. Installing and setting up bochs emulator, which made debugging significantly easier
    • memory dumping
    • breakpoints (xchg %bx, %bx)
    • displaying GDT/IDT tables
  6. Interruption handling
    • sources/idt.h
    • set IDT table
    • 8259A PIC initialisation (master and slave, appropriate masks etc)
    • written basic ISRs
    • loaded IDT with lidt
    • one of ISRs is used to handle clock interruptions coming from RTC (real time clock)
    • communication through ports (helper functions outb and inb)
    • RTC configuration

Sources

I used mainly OsDev wiki, Intel x86 ISA and some other related pages as my knowledge source.:

About

💾 32-bit operating system displaying current date and time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published