SolvedWriting A Kernel ?

Posts 1–7 of 7 · Page 1 of 1
Writing A Kernel ?
I want to get started messing with OS dev. I have a desktop with Windows 7 64-bit(AMD64) and a laptop with Windows 7 64-bit(AMD64) and Ubuntu(x64) on it. What's the quickest and/or simplest way to get started with this? Should I work on linux or windows? I assume that using NASM and GCC would be the way to go, right? I just need some advice on setting up a simple/streamlined environment to work. I really appreciate anyone's input or advice.

Edit: Can I jump into writing a system for x64, or should I start out with x86 code?
Go here: BrokenThorn Entertainment

You can develop everything from inside win7x64 with visual studio

If I were you I'd start with x86, you'd have to start with that anyway since you change the processor mode from x16 to x86 and then ultimately to x64. You'll not start in x64 or x86, you need code to switch.

My devchain was:

NASM => Bootloader ( or use grub )
VC++ 2005 => Kernel
Manual c+p => Osimage ( BL + kernel )
Bochs => Emulate
Start over !!
So, when I assemble code with NASM, will it make a difference if the bootloader is assembled with 'BITS 64'? Can a processor run x64 code while in real mode, or do I have to write some 16-bit code for the first part? Also, could I just use Code::Blocks? I have a much easier time with MingW than I do VC++. Thanks for answering, I don't know much in this area, but I want to learn so I can write a very basic OS. Would it be worthwhile to look at some open-source operating systems?
No you must first code in x16 and then switch to x64. The processor will interpret everything in x16 as x16 instructions. So you can't just let it run x64 code. If Code::blocks can generate independent C code that doesn't need a library to function, sure. If it can't then you're out of luck

I don't know much about using linux for osdevving, I used windows so I can't help you there.
Code::Blocks uses MingW, a windows GCC port. I think I'll stick with assembly as much as possible though. I want to learn more with assembly anyway. Have you ever written code for microcontrollers? Also, if you know any good articles, books, or papers on assembly, I'd love to hear about it. >
Yep, I've written code for the PIC and APIC, some code for the floppy disk controller and the keyboard controller. The only book on asm you'll ever need to read is:

http://www.planetpdf.com/codecuts/pdfs/aoa.pdf

It basically installs an assembler right into your brain

But you'd better not stick with asm all the way, it'll be too hard to manage once you get further with your osdev.
Alright, thanks for all your help man, I've got plenty of stuff to read up on now. That book looks packed, I really appreciate it! I mentioned mcu's because I got a few dozen TI MSP430's, a launchpad dev board, and an arduino. I'm really interested in the low-level stuff more than anything. I got the arduino to work with a small LCD, but the class they have handles it all for you. Thanks again!
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us