2020 New Year's gift - the development of an operating system from scratch


On the last day of 2019 finally completed the development of the whole system, and give it the name - Inios . Like the article name, written entirely from the kernel, non secondary development, from the initial "hello os" to have a system like the first time. Mainly written in C language, assembly language section. . The size of the entire operating system to complete 39.6 KBthe reason why so little is in fact the main reason for the language, another important reason is compressed on the part of the system code and font libraries and media in development. Among multiple iterations, the final completion of the development of the entire operating system Inios .

System Preview

The main development environment and tools

  • win 8.1 x64: Inios used to develop a "carrier"
  • qemu virtual machine: Testing Inios
  • wxmedit: 16 hex editor
  • nsak: Assembler
  • Notepad ++: code editor
  • Git: In addition to submit code, it is also used to generate special files

System functions

Command line terminal

  • mem: Display memory usage
  • cls: Empty the contents of the console
  • dir: To list
  • type: View the contents of the file
  • hlt: Run the executable program .hrb
  • shift+F1: Force programs to close
  • enter: Close the current application window
  • F11: The bottom of the window on top
  • Tab: Switching window
  • 鼠标点击: Switching window / moving window
  • shift+F2: Terminal Open / Open another terminal window (supported s)
  • exit: Close the current terminal window
  • ncst xx: A plurality of terminals can run programs

Protection System

Mainly to do with "Memory Access", "abnormal" and "Application DS segment address into the operating system used."


Commonly used multi-tasking, if a system can only run one program, then there is a lack of soul.

Text display

In the original basis, to achieve the Chinese display, use HZK16.fnt encoding library. Although a large font library, but after compression, or small half.

Mouse, keyboard control

An operating system commonly used functions, need to note is that during mouse control, using the mouse control is not easy now, probably changed the protocol, but the good news is that testing using the touchpad of the notebook, The effect is good.

Application window

Visualization window support program.

Media Player

Media here mainly refers to the "Audio", that is the audio, in fact, better to say "buzzer" to play good, because our music is to sound a "buzzer" in.










  • 《汇编语言(第三版)王爽著》
  • 《操作系统设计与实现 上册 Andrew S.Tanenbaum 著》
  • 《30天自制操作系统 川合秀实 著》

Guess you like

Origin www.cnblogs.com/yjlaugus/p/12132585.html