Os "noob" intrested in os development
Os "noob" intrested in os development
I wan t to make an os,i am familiar with assembly(z80,6502,x86 with linux kernal) an low level programing(C++ ..i'll love using something higher level for machine programing). Many things are different in x86 "real"(as without a pre-made kernal) assembly. I've planned out my basic os structure(structure is very important in assembly) and i want to make a OS.How can i do this on windows 8. Also, how can i multitask programs efficiently in my os? Can some one tell me some things i should know or os dev stories.
Re: Os "noob" intrested in os development
I use Windows Server Hyper-V. And NASM. NASM never gave mi problems with optimization disabled. And Hyper-V is very stable too. Glad to see people using Windows.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Os "noob" intrested in os development
It's "kernel", not "kernal". Also, start with everything that says "search this first" or "required reading" because you seem to have missed both.fuffie wrote:Can some one tell me some things i should know or os dev stories.
Re: Os "noob" intrested in os development
?fuffie wrote: Can some one tell me some things i should know or os dev stories
"OS-Dev Stories"?
You really need to go to a doctor.
This is a forum my friend, not a day-care.
I really jumped out of my chair when I read this.
I am not.newanabe wrote:Glad to see people using Windows.
When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds
64 bit Kernel in early development
http://github.com/nerdguy12/core64
64 bit Kernel in early development
http://github.com/nerdguy12/core64
Re: Os "noob" intrested in os development
I second everything just said above (accept the the windows thing), but, it sounds like your actually completely new to even the fundamental starting points, so some constructive recommendations (a few days late but being constructive is always good):
EDIT: Slip of the finger... meant yasm instead of fasm.
EDIT2: Added some recommended first step experiments.
- The osdev wiki is a good, very basic (but light years beyond the question you just asked), starting place. Google google google google google.
- Download DOSBox or setup a DOS VM and learn to write simple DOS programs (COM, not EXE) before you even start in on a kernel. DOS lets you do everything in ring0 and basically only adds some "helper" functions via int 21. Play around with things like I/O ports (a VM would be better than DOSBox for this, but try using the soundblaster), interrupts, segmentation, etc. It's much easier to learn the basics that way rather than starting with a bootstrap directly into a kernel. Here's a list of challenges you can do in DOS before you start in on a kernel (sort of in order of difficulty)...
- Switch into protected mode, do a bunch of stuff, and switch into unreal mode, and do a bunch of stuff, and switch back into protected mode, and finally back into real mode.
- Create a TSR mouse driver from scratch (using io ports only) that provides all the INT 33 functionality that DOS programs expect.
- Read/write from a hard drive using only I/O ports.
- Manually parse, load, and transfer control to a DOS EXE from your own COM program.
- Create a TSR that suspends/resumes a running program on a specific keystroke (tasks involved: register state tracking, memory swapping, video state save/restore, etc).
- Create a TSR that facilitates some kind of slow hardware action (like reading from a floppy) asynchronously via a custom interrupt function (like non-blocking sockets, but with disk reads and DOS).
- Developing an OS in Windows is perfectly possible, but probably not your best choice. If nothing else your toolchain options are much more limited and much less portable. This will definitely hurt you in the long run. Nearly all code snippets and tutorials out there are for the gcc toolchain. I strongly recommend you start there. Your assembler choice should be just as portable (nasm/yasm/gas/etc).
- Avoid most Windows only compilers in general (or any compiler that was only designed for only one OS). It usually means that there are very unpleasant compiler limitations (MSVC and Borland C++ are great examples) because of the assumptions that the compiler developers are allowed to make given the implicit usage of their product. If nothing else, you'll find yourself re-writing a bunch of code down the road with a bunch of #if #endif blocks for that specific compiler... which is bad.
- Pick at least one virtual machine with a solid built-in debugger. Bochs and VirtualBox both come to mind. I don't know if QEMU qualifies, but I think it does. In the end (even in the beginning) you'll be "trying" and debugging your OS in multiple virtual machines to test for differences and take advantage of different debugging/emulation features.
- Remember, learning OS development is an extremely frustrating pursuit (all the lack of documentation and compatibility is a killer), but just remember to have fun.
- Finally, do not expect hand-holding from anyone. Anyone you approach and ask about OS development will expect you to already be familiar with tons of basics before you even approach them. See point 1 again.
EDIT: Slip of the finger... meant yasm instead of fasm.
EDIT2: Added some recommended first step experiments.
Re: Os "noob" intrested in os development
I started developing my OS on windows 8 (but that was purely the bootloader).
I use a weird combination of MintOS running in VirtualBox (to use GCC) and Bochs and VirtualBox (to test my kernel). Works better than you would expect.
I had a computer architecture course three years ago, and I've tried a little x86 reverse engineering and some x86 asm programming, which may have helped me. Nonetheless I think the path I took is one of the easier. A lot of people recommend starting on linux, but it's perfectly fine to start developing a bootloader on windows. If osdev is nothing for you, you'll probably know it before you start working on a kernel anyway. I've spent like a week on just the bootloader (I used this series, I can really recommend it). I came to the conclusion (helped by the reactions on this forum ) that it's easier to use GCC to compile the kernel.
I use NASM, sublime text (but any IDE where you can use some kind of build script suffices), bfi.exe, and a self-written program to write the bootsector to the floppy image.
I use a weird combination of MintOS running in VirtualBox (to use GCC) and Bochs and VirtualBox (to test my kernel). Works better than you would expect.
I had a computer architecture course three years ago, and I've tried a little x86 reverse engineering and some x86 asm programming, which may have helped me. Nonetheless I think the path I took is one of the easier. A lot of people recommend starting on linux, but it's perfectly fine to start developing a bootloader on windows. If osdev is nothing for you, you'll probably know it before you start working on a kernel anyway. I've spent like a week on just the bootloader (I used this series, I can really recommend it). I came to the conclusion (helped by the reactions on this forum ) that it's easier to use GCC to compile the kernel.
I use NASM, sublime text (but any IDE where you can use some kind of build script suffices), bfi.exe, and a self-written program to write the bootsector to the floppy image.
Re: Os "noob" intrested in os development
What's wrong with OS development stories? It is a good way to spread imperative ("know-how") knowledge. There are respected journals that carry reports (stories) on software projects:http://onlinelibrary.wiley.com/journal/ ... ation.html. In fact, two of the most interesting papers I've ever read were stories: how to build an OS http://www.cs.utexas.edu/users/EWD/ewd01xx/EWD196.PDF, and how to build a programming language http://www.sics.se/~joe/pubs/prac_appl_prolog.ps.nerdguy wrote:?fuffie wrote: Can some one tell me some things i should know or os dev stories
"OS-Dev Stories"?
You really need to go to a doctor.
This is a forum my friend, not a day-care.
I really jumped out of my chair when I read this.
Why not? What's wrong with somebody using Windows. I don't use it myself but I can't see what's wrong with somebody else using it?nerdguy wrote:I am not.newanabe wrote:Glad to see people using Windows.
Last edited by bwat on Sat Nov 09, 2013 6:57 am, edited 1 time in total.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Os "noob" intrested in os development
Well said! The last thing we need is snobbery about operating systems. It's up to the individual to decide which suits them best.
-
- Member
- Posts: 89
- Joined: Tue Feb 26, 2008 10:47 am
- Location: Sweden
Re: Os "noob" intrested in os development
I keep comming back to the stories surrounding the development of the original macintosh - hardware and software - whenever I need a bit of inspiration.
http://folklore.org
http://folklore.org
Re: Os "noob" intrested in os development
Faaan va' konstigt!
That website was independently referenced twice within two hours: http://forum.osdev.org/viewtopic.php?f= ... 9&start=33.
Weird!
thomasloven wrote:I keep comming back to the stories surrounding the development of the original macintosh - hardware and software - whenever I need a bit of inspiration.
http://folklore.org
That website was independently referenced twice within two hours: http://forum.osdev.org/viewtopic.php?f= ... 9&start=33.
Weird!
Every universe of discourse has its logical structure --- S. K. Langer.