So I was thinking.. If i wanted to make a basic os (GUI not required) from scratch, is Assembly a appropriate language? How long time would it take to learn the basics of Assembly and make a little OS? What would I be able to do with this OS with only Assembly? (:
At the moment I have a little knowledge of C++, Autoit and Python, and I though that making an operating system would be a good little project.
17 replies to this topic
#1
Posted 02 November 2011 - 06:00 AM
|
|
|
#2
Posted 02 November 2011 - 07:13 AM
You can learn the basics of assembly in a matter of weeks, but understanding memory management concepts will take longer. It could take a while for you to learn OS design concepts and theory. Start with a bootloader and work your way up to the actual OS. With assembly you can do pretty much anything.
MenuetOS was written entirely in assembly.
MenuetOS was written entirely in assembly.
#3
Posted 02 November 2011 - 07:52 AM
2Root said:
You can learn the basics of assembly in a matter of weeks, but understanding memory management concepts will take longer. It could take a while for you to learn OS design concepts and theory. Start with a bootloader and work your way up to the actual OS. With assembly you can do pretty much anything.
MenuetOS was written entirely in assembly.
MenuetOS was written entirely in assembly.
How long could it take to make a small working OS? (with really no prior knowledge)
How hard is it to make small programs for my OS in assembly then (what kinds of other program would be usable?)? :o
Recommended reading? ;) (know any good books, pdfs, forums w/e) (:
#4
Posted 02 November 2011 - 08:43 AM
Operating System Concepts is the book for OS development. I would suggest you learn assembly first or do some reading on OS organization. The FASM forums has a section dedicated to OS construction using FASM as the assembler. flat assembler - View Forum - OS Construction
osdev has valuable information on os development. Expanded Main Page - OSDev Wiki
Here is a good starting tutorial for using NASM to build a simple os. How to write a simple operating system in assembly language
Look at the source for some open source all-asm based operating systems. From where you are starting, making your os load programs is a ways away, you should focus on getting your os to load first.
osdev has valuable information on os development. Expanded Main Page - OSDev Wiki
Here is a good starting tutorial for using NASM to build a simple os. How to write a simple operating system in assembly language
Look at the source for some open source all-asm based operating systems. From where you are starting, making your os load programs is a ways away, you should focus on getting your os to load first.
#5
Posted 02 November 2011 - 02:45 PM
It all depends on what you want the OS to do. Expanded Main Page - OSDev Wiki is a great source, has tutorials for beginners.
Latinamne loqueris?
#6
Posted 02 November 2011 - 03:46 PM
You're going to have to write at least the bootloader in assembly language, but that's not too hard. I'd say C (without standard libraries, mind you) is a good idea.
sudo rm -rf /
#7
Posted 02 November 2011 - 04:00 PM
dargueta said:
You're going to have to write at least the bootloader in assembly language, but that's not too hard. I'd say C (without standard libraries, mind you) is a good idea.
I dont know much about C (and i dont know alot about other languages either), what is the best way to write a simple OS? Using purely assembly or f.ex. also mix in C and make the classic hybrid thingy?
#8
Posted 02 November 2011 - 04:10 PM
If you find C easier than directly programming in assembly (you probably will) you would either need to program the bootloader (in assembly) to load, say, an ELF file programmed with C, or use a bootloader like GRUB. Either way, you will need at least some assembly coding. The GRUB route is probably easier, as it will load the ELF executable for you.
Latinamne loqueris?
#9
Posted 02 November 2011 - 04:12 PM
mebob said:
If you find C easier than directly programming in assembly (you probably will) you would either need to program the bootloader (in assembly) to load, say, an ELF file programmed with C, or use a bootloader like GRUB.
Or you can just compile to a raw binary image that can be loaded directly into memory.
sudo rm -rf /
#10
Posted 02 November 2011 - 04:17 PM
2Root said:
MenuetOS was written entirely in assembly.
I think MS-DOS was also built using assembly language.
The resources I like to use are osdev (mentioned earlier) and supernovah (Supernovah).
I would say, practicing assembly language programming would be a good idea. You can use NASM (with combination of ALINK) to make Win32 programs, for practice. After all, practice makes perfect :) .
Also, reading the code is just as important as writing it; if one doesn't read his code, and/or doesn't understand what it does and what it actually should do, then he would, about 99% of the time, get weird results.
It is also a good idea to keep things organized, especially when it comes to protected mode programming, if you want to go that far. Maybe even make the TSS for each program as part of its structure in memory, or in the program file, to make things easier to keep track of (that's sort of what I'm planning on doing for my OS).
#11
Posted 02 November 2011 - 04:28 PM
How much time can it take to "learn assembly" and write a simple os, with let say no prior knowledge? :)
How hard (?) /time consuming would it be to write that simple os in just assembly?
How hard (?) /time consuming would it be to write that simple os in just assembly?
#12
Posted 02 November 2011 - 05:58 PM
Well, lets say you wanted to make an OS that starts up and has a simple command line with a few commands. There are many routes you could take. Probably the easiest would be to stay in 16 bit mode and use BIOS interrupts to print text and read keyboard input. The longest part would probably be learning assembly code and learning stuff about OS development.
---------- Post added at 09:58 PM ---------- Previous post was at 09:58 PM ----------
That is what I was referring to when I said 'bootloader'.
---------- Post added at 09:58 PM ---------- Previous post was at 09:58 PM ----------
dargueta said:
Or you can just compile to a raw binary image that can be loaded directly into memory.
Latinamne loqueris?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









