Hi,
I reversed the order of your queries so that my responses make more sense..
J wrote:2. I know the specific pieces of the OS I have to design and write but where do I start when it comes to actually programming the OS?
The best place to start when it comes to the actual programming is to avoid the actual programming for as long as possible!
I recommend researching the hardware for all architectures you intend to support, and research how other OSs do things (here I'd include a version of Unix, a version of Windows and something like L4). Then create a list of features you want the OS to have, and a statement explaining the goals of the project (to create a unique OS, for educational purposes only, for research purposes) and why you feel the OS is worth doing.
After that, use the results of your research in conjunction with the list of features and statement of goals to develop the general design of the OS. This large document should include details on how each component works, how each component interacts with other components, and how portable each component needs to be (if portability was on your list of features). It should also include some details of protection, security, re-entrancy, which components belong in which binary/executable, how the boot works, etc.
Once this is done you can start working on the documentation for the kernel's API, and possibly any other interfaces between components. Start with the calling convention/s to be used, followed by details of each function/operation.
Then, for each binary/executable select which tools will be used to create it. It's possible to write an entire OS with nothing more than an assembler, but on the other hand you might want to use make, sed, grep, perl, assembly, C, C++ and a linker. Don't forget that one day you may wish to be "self hosted" and may need to port any tools you've used over to your own OS (sort of hard if you've used Delphi or something). Anyway, for each tool you'd need to research what it's capable of - for e.g. there's no point trying to write a boot loader in C if the compiler/linker can't generate 16 bit code.
I'd also recommend getting hold of one or more emulators for each target architecture - it can reduce your testing/debugging/development time a lot.
At this point it may be worthwile estimating how long it's going to take to write each binary/executable (then double the estimate), and then re-read your OS's goals (especially the "why you feel the OS is worth doing" part). You may find that (at some point during implementation) you will need to attract volunteers to assist with parts of the project (it's lucky you've got all that documentation for them already isn't it!).
Once all of the above is done it's time to start writing code
. Start with a bootable "Hello World" and build on it. The actual coding should be relatively easy as all you do is implement things according to the documentation. At times you may need to adjust the documentation (especially if you did the research quickly, or if your design goals change) or add more detail to it, but this is normal.
J wrote:
1. Which language is best for writing my OS? C?, Assembly? both?
I am leaning more towards just writing it in assembly but what r ur opinions?
You must use assembly for some (smaller) parts of the kernel (and part or all of the boot code, depending on your design). Apart from this you can use any language/s you like. I'd recommend using the language you are most familiar with - it's hard enough writing an OS without learning a new language at the same time. When you research the tools you want to use you'll find out the problems associated with each.
NOTE: I haven't followed my own advice, and I don't know of anyone who actually has. Instead, most people are either writing a little hobby OS for education purposes (unlike me) or continually rewriting stuff they've already done several times (like me). This advice is intended to prevent the constant rewriting...
Cheers,
Brendan