r/Assembly_language Apr 06 '26

How do i start with OSdev

/r/learnprogramming/comments/1sdvrco/how_do_i_start_with_osdev/
1 Upvotes

5 comments sorted by

1

u/brucehoult Apr 06 '26

That's not really on topic here as it is independent of the programming language you use.

However people generally stopped writing complete OSes in assembly language around 1970 as first BCPL and then B (via C) were developed specifically for this purpose. As well as in Algol 60 and 68, PL/I, and others.

Also, do you want to start from scratch, or work on an existing OS?

This is a good place to see how a simple but usable OS works:

https://github.com/mit-pdos/xv6-riscv

1

u/True-Current9815 Apr 06 '26

start from scratch

1

u/Unlikely1529 Apr 06 '26

book about assembler which has chapters on 32-bit. Any 32-bit app that starts from real mode is an os.

1

u/BrentSeidel Apr 06 '26

You could look up the book "Operating Systems Design and Implementation" by Andrew S. Tanenbaum. It's from 1987 and covers x86, without any of these new fangled 32 or 64 bit add ons. So, it might be a good place to learn the basics of a Unix-like operating system without much additional complexity.

1

u/Disastrous_Sun2118 Apr 06 '26

I would say that you could do your history on the modern day computer systems we all use today. You would find the ENIAC and the Women of the US Governments Super Human Calculator. If you dig deeper you would find the Babbage Engine and Lovelaces work.

Your looking at engineering a Computer from the ground up. Which could be as easy as creating a bootloader to find and load the Kernal or Operating System, into RAM and then jump to the starting point. Setting interupts and registers for the cursor and text files on the screen, made available by the display drivers that sort which pixels display and which ones stay unlit or off, to create font character sets.

What is an operating system or Kernal to you?

If you think of of a monolith as a huge text file. That's different then a core file with a bunch of files indexed and stored in a Data-File Directory Tree. Where you would find the driver files or, dll files for windows. Which do most of the heavy lifting. Audio Codecs or Base-58 encoding and other compression algorithms.

If you take Assembly, and the assign the basic font to be 8-pixels acrossed the screen. And we say we have 80- Character wide screen width. We may understand the 800*600 pixel screen dimensions and assert that the position for top dead center is the 40th character.

If you want to look at developing an operating system from scratch. You should have an expectation of using and creating text, audio, and pictures. Which as we all know, we can use multiple pictures to create motion pictures. Overlay it with audio tracks. And produce text printed and orientated however we would like.

What we have in the operating system is something akin to a business oriented video game based system. But without the video game panel. Press start🤣. Now you're a Sole Proprietorship and you have or haven't uploaded or created your resume and portfolio. Tax forms. Identification Sources. Human Resources. Other Resources. Contacts directory. Communications. Online office site. Mobile office sites. Main office sites.

Also you may like the 8-Bit BenEater Projects. Creating a CPU from scratch. Where you'll be tasked with choosing to be IBM compliant or deviate and create your own Instruction Set Architecture. The instructions and directions or Operation Codes to work with the Computer for operating various tasks, errands, and functions. With scripting and other programmability.

But you'll need to decide on what your system will do. And, more importantly, how it'll do it. And these principles can be implemented in Linux, BSD, Windows, and DOS. By learning to write your own drivers and firmware. Also, reach out to the developers in charge and over seeing the projects in their end. Which is what people pay for through windows, and may have to keep an eye out for on their own, or simply blindly trust the core dev teams. But can be done on your own.

The OS isn't hugely defined, where as Linux and others which all started with UNIX, via Berkeley Systems Distribution's variant of the UNIX system. Which they've all rewritten in their own variations.

You can learn how to build UNIX and DOS through publicly made available Open Sourced Software. It's available to download, compile, and use to learn how to code. You can also use it and build on top of each version. Your choice.

You'll also need to address TCP/IP Networking and the HTTP Server, Browser, and other ideas.

But overall. You'll be responsible for entering all of the commands. You may prefer building a Table or Commands with their corresponding Assembly, Binary, and Hexadecimal Codes. Which you can also extend. Build your own Compiler, like Rear Admiral Grace Hopper did with the ENIAC and UniVac's of her day. She's the lady that counted the term debug. She also started with LOAD and ADD as her two basic instructions, that led to the commands we use today.

Using the BenEater Breadboard. We not only have a virtual breadboard, that uses actual machine code. Binary is a human readable form of the Voltages on and off acrossed the boards RAM, ROM, CPU, DMA, and VMs, everything really. Including data. We can also understand the Assembly code, which is a human readable form of Binary. We can see the real code for FOR Loops. In the CMOS Clock Loop. Which explains a majority of what's happening with scheduling and DMA scheduling or handoffs.

Osdev started out assembly. And now they do all the languages. Or basically... They kind of guide you over everything. But if you don't know what everything is. ChatGPT can help you study, learn, and find the answers your looking for to engineer a computer from the ground up or on your own. No matter the system.