Leanpub Header

Skip to main content

Developing a Computer Operating System from Scratch

An Attempt to Introduce OS Development at Beginner Level

The first-ever book aimed at introducing operating system development to absolute beginners. The topics begin with programming in C and programming in assembly, and progress toward practical OS development.

The book uses only simple methods, so it covers only a few essential topics in C and assembly programming, making it suitable for beginners.

Minimum price

$25.99

$35.99

You pay

$35.99

Author earns

$28.79

Packages

Details
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
About

About

About the Book

Operating System Development, or OS Development, is a topic often labeled as ONLY FOR GEEKS.” Newcomers frequently find it difficult to understand and implement due to the lack of beginner-friendly documentation. A change is needed.

The aim of this book is to make OS Development approachable for anyone interested in the subject.

In this book, we will begin with programming in C and programming in assembly, and then move on to practical OS Development.

To make learning easier, the book uses only simple methods, so it covers only a few essential topics from C and assembly. However, every necessary topic that cannot be avoided is included.

Most existing resources on OS Development are poorly documented and rely on many tools just to introduce the subject. They often involve tools like Make, techniques such as linker scripts, and heavy use of the C programming language and assembly language.

This often prevents beginners from grasping the concepts. Therefore, this book will not use automation tools like Make or techniques like linker scripts, nor will it rely heavily on C or assembly. We will remove unnecessary complexity and use only the simplest methods.

If you are an experienced C or assembly programmer, you will also find this book useful. You can directly jump to the OS Development section.

The OS Development chapters in this book are explained in a clear and easy-to-understand manner.

The book covers a wide range of topics, including booting, creating graphical user interfaces and other graphical content, implementing a keyboard driver, accessing the hard disk, creating a simple file system, working with I/O devices, and much more.

By the end of this book, you will be confident enough to move forward and work on your dream project.

I hope this book adds great value to you and helps you pursue what you love.

And I hope it becomes your passion!

Thank you!

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$35.99

This package contains the Book in PDF , EPUB and WEB Formats.

$25.99

    The Book + Source Code

    Minimum price

    Suggested price$35.99

    This Package contains The Book + full source code for the OS Development chapters in this book.

    $25.99

    • SOURCE-CODE
      Source Code

    Author

    About the Author

    TINU TOM

    I am a Cyber Security Researcher specializing in application security, with a primary focus on security-related products such as antivirus software, firewalls, and similar technologies.

    As a self-taught programmer since the age of 13, I enjoy working with both hardware and software.

    Throughout my college years, I was often approached to explain programming-related questions, and I found great satisfaction in sharing my knowledge with others.

    Above all, I am passionate about creating value for people through my work. I wish you a happy and fulfilling learning experience.

    Thank you!

    Contents

    Table of Contents

    Preface

    Legal

    Getting Started

    1. Installing QEMU
    2. Installing A Hex Editor
    3. Installing Notepad++
    4. Installing NASM
    5. Installing SASM
    6. Installing MinGw For Compiling C Programs
    7. Adding The Downloaded Software To Environment Path

    Programming In C

    1. Introduction
    2. Hello , World
    3. Data Types
    4. Basic Data Types
    5. int Data Type
    6. char Data type
    7. void Data Type
    8. Derived Data Types
    9. Pointers
    10. Arrays
    11. Functions
    12. Structures
    13. Branching
    14. Looping
    15. Type Casting
    16. Arithmetic Operators
    17. Increment , Decrement Operators
    18. Bitwise Operators
    19. Bitwise AND and Bitwise OR Operators
    20. Left shift and Right shift Operators
    21. Macros
    22. Hexadecimal Notations
    23. Comments
    24. Let’s Have A Game

    Programming in Assembly Language

    1. Introduction
    2. What is an Assembly Language
    3. What is a Compiler actually?
    4. x86 Processor data sizes
    5. Assembly Hello , World
    6. Registers
    7. General Registers
    8. Data Registers
    9. Pointer Registers
    10. Index Registers
    11. Control Registers
    12. Segment Registers
    13. x86 Processor Endianess
    14. Commands For Register Operations
    15. mov Command
    16. add Command
    17. sub Command
    18. push And pop Commands
    19. Working With Stack
    20. Practical Implementation Of Stack
    21. pushAll And popAll Commands
    22. inc And dec Commands
    23. Extra Commands
    24. jmp Command
    25. call Command
    26. cmp Command
    27. Variables
    28. Memory Addressing
    29. Comments
    30. Conclusion

    Beginning Operating System Development

    1. Introduction
    2. Writing Programs For Boot Sector
    3. Printing To Screen (Hello , World OS)
    4. Filling The Screen With Characters(For Fun)!!
    5. Filling The Screen With Colours
    6. Other Bios Display Related Routines
    7. Running Programs Written In C
    8. Switching To Protected Mode
    9. Defining The GDT
    10. Life Without Bios
    11. Implementing The GDT
    12. Making The Switch
    13. Making Way For Running C Code
    14. Making A Boot Loader
    15. Calling Our C Kernel

    Video Graphics

    1. Introduction
    2. Poking Video Memory
    3. Displaying Text and Colours To Screen
    4. Examples
    5. Alpha
    6. Beta
    7. Gamma
    8. Delta
    9. Implementing Graphics Driver
    10. Developing a Simple Video Player
    11. Theory
    12. Practical Implementation

    Implementing Keyboard Driver

    1. Introduction
    2. Scan Codes
    3. Implementing Keyboard Driver
    4. The PIC Chip
    5. Practical Implementation
    6. External References

    Making Our First Prototype : OS0

    1. Introduction
    2. Developing the First Prototype
    3. Explanation

    Accessing Hard Disks

    1. Introduction
    2. Working With Hard Disks
    3. Types of Hard Disk
    4. HDD
    5. SSD
    6. How Hard Disk is Divided
    7. Implementing a Hard Disk Driver
    8. How it Works?
    9. External References

    Creating a Simple File System

    1. Introduction
    2. The Implementation
    3. Formatting
    4. File Allocation Table And Storage Space
    5. Create
    6. Save
    7. Retrieve
    8. Conclusion
    9. External References

    Graphics Mode GUI Creation

    1. Introduction
    2. Drawing In Graphics Mode
    3. Modes
    4. Choosing A Mode
    5. Making Switch To The Selected Mode
    6. Video Memory and Drawing
    7. Sample User Interface Using Graphics Mode
    8. External References

    Audio

    1. Introduction
    2. Generating Sound : First Try
    3. Generating Sound : Second Try | Integrating With OS0
    4. External References

    Going Advanced

    1. CD-ROM
    2. ATAPI
    3. External Reference
    4. USB
    5. Universal Serial Bus
    6. External Reference
    7. Networking
    8. Networking
    9. External Reference
    10. Paging
    11. Paging
    12. External Reference
    13. GDT
    14. Global Descriptor Table
    15. External Reference
    16. IDT
    17. Interrupt Descriptor Table
    18. External Reference
    19. Timers
    20. Programmable Interval Timer
    21. External Reference
    22. GRUB
    23. UEFI

    How To Move Further?

    The Thank You Summary

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub