I found this website/forum when I went searching for x86 OS design help. I must say that it is a pretty neat site with alot of useful information (especially the A20 initialization routines.) I look forward to answering questions to the best of my knowledge and asking a few from time to time.
Now to fulfill the purpose of this forum section (OS Design questions... comments... etc...) I am designing an Operating System (not another one... I know I know) starting on the x86 architecture. I started the idea years ago of designing a new OS, mainly due to the fact that I was using Windoze and it loved to crash/fail on me when I least needed it. The idea grew into research and research grew into understanding and understanding grew into implementation. For the last year I have been studying assembly/OS design when I found the time to do so, some stuff is pretty trivial, other stuff is inane and mind boggling to comprehend. All in all it has been a pretty fun routine. In these last 2 months I have put the most time into my OS design than ever. So far I have designed an efficient MBR, LBR, and Basic Kernel. As of right now I'm working on the IDT design and implementation, then onto initializing paging/vm.
My hompage link on this forum points to the software/hardware/general development foundation I am starting up, I bought (am renting) the domain name as of 2 months ago, it is called the "Dynatos Development Foundation". As of now there are only 3 projects and one person working on them (me)... and I intend to keep it that way for a good while.
As for the name of the OS, I am of Greek descent, so I took the word "powerful" and looked it up in a English-Greek Dictionary and found the word "dynatos"... meaning potent/powerful. Considering the name had the letters "os" at the end of it... I found the perfect name on my first try... and the idea of DynatOS was born. The "Dynatos Development Foundation" took its name from the OS idea. The only specifics on the OS I can give you right now is that the kernel is written entirely in assembly and assembled using NASM or by me (opcode sheets). Once I get a basic CUI (Console User Interface) up and running I intend to write an assembler and re-assemble everything (as a test) and continue on assembling using that program. Main OS design will stem from the C compiler that I will (finish) designing.
Last, as for OS design itself... I have had fun and have been most pround at what I have accomplished so far albeit insignificant to many. I suggest learning the basics OS design and writting one up in your favorite language. The most fun I have had is taking the Intel Developer PDF files and MBR information and building code from manual opcode translation... it was a joy to see my ideas work (eventually) and to see something consist of mostly my ideas (except for the A20 initialization so far as that is about as efficient as assembly code gets ) and end up working. As I reach further into the OS void I will probably need a little more help designing things and that is why I am here. As I said before I'll pop in with questions from time to time... just don't be too harsh on this OS n00b
Hello...
Re:Hello...
I am also designing a new OS with the kernel written entirely in assembly using NASM. Yes, I know it is difficult but I really wanted to create an OS with the fastest possible speed. But there are parts which are difficult to program using assembly so I coded it in C and used borland c to convert it to TASM code and then I converted that to NASM code by hand and optimizing all the way. I wanted to know if there is a C compiler that could translate C directly to NASM code?
Re:Hello...
Just one question of you both: why do you write your kernels in assembly language? Why?
Why?
Why?!
Why?
Why?!
Re:Hello...
Oh boy... here we go... I can see it already... The Crusades. I can see that Tim is most likely a fanatic of C. It may be easy to use, but it lacks the absolute control over my code that I demand (I know you can argue this one, but there are no substitutes.) Personally, I don't like to use C for Kernel design as I am trying to design the Kernel to be FAST... sure the compiler can out optimize me in advanced OS design, but not in Kernel design. Also, as I stated before, I sometimes assemble the opcodes by "hand" and save it to a sector on my test HD.
To break it down... not everyone likes C or cares about how easy it is to use or how fast it can be, personally I feel that Kernel design in someone else's compiler is like throwing together your secret family recipe for a great dish, and going over to your friends house to bake it... you can't really call it your own if you had to use someone else as a crutch. I intend to write a new assembler and compiler in assembly on my new OS. "Why???", you ask? Simple, I can call it my own and have total control and understanding over it. It's all about your pride, do you want to sell-out to someone else's compiler when you are trying to redefine a whole system??? It is up to you.
To break it down... not everyone likes C or cares about how easy it is to use or how fast it can be, personally I feel that Kernel design in someone else's compiler is like throwing together your secret family recipe for a great dish, and going over to your friends house to bake it... you can't really call it your own if you had to use someone else as a crutch. I intend to write a new assembler and compiler in assembly on my new OS. "Why???", you ask? Simple, I can call it my own and have total control and understanding over it. It's all about your pride, do you want to sell-out to someone else's compiler when you are trying to redefine a whole system??? It is up to you.
Re:Hello...
There are a few reasons why I want to code it in C , first I have no plans to port my kernel to any other processor anyway. And in the future I also plan to add really great processor optimizations like 3dnow! , SSE, MMX and those stuff... you are not sure if your compiler supports those instructions. And besides, many people are doing their kernel in C so I'd like to have experience trying to program the whole thing in assembly.
Re:Hello...
There is a "version" of lcc out there which compiles to NASM assembly.
First you unzip lcc41.zip from here
ftp://ftp.mpi-sb.mpg.de/pub/misc/mirror ... n.edu/lcc/
Then unzip lcc41-nasm-win32.zip on top of the previous one. This can be found in the 'contrib' directory at the link above.
If you are into compilers, then you should probably check out LCC anyway.
If you have to use C libraries, you will have some linker problems. But if you are at this level, you can probably solve them.
First you unzip lcc41.zip from here
ftp://ftp.mpi-sb.mpg.de/pub/misc/mirror ... n.edu/lcc/
Then unzip lcc41-nasm-win32.zip on top of the previous one. This can be found in the 'contrib' directory at the link above.
If you are into compilers, then you should probably check out LCC anyway.
If you have to use C libraries, you will have some linker problems. But if you are at this level, you can probably solve them.
Re:Hello...
I have no real problem with kernels written in assembly... as long as the authors have good reasons for doing so (and can write better assembly code than a typical compiler).
Portability is still a problem even if you don't intend to move your kernel to another architecture. One of the reasons for writing a kernel in asm is so that you can perform optimisations yourself. This is OK, but it's very specific to just one model of a processor (say, the Pentium III). Once you upgrade (to, say, a Pentium 4), the optimisations become a lot less useful.
If you write your code in C you can just re-compile using different compiler settings (or even a different compiler -- the Intel C compiler is said to generate very fast code). If you write your code in assembler you've got to re-write large sections of it.
Portability is still a problem even if you don't intend to move your kernel to another architecture. One of the reasons for writing a kernel in asm is so that you can perform optimisations yourself. This is OK, but it's very specific to just one model of a processor (say, the Pentium III). Once you upgrade (to, say, a Pentium 4), the optimisations become a lot less useful.
If you write your code in C you can just re-compile using different compiler settings (or even a different compiler -- the Intel C compiler is said to generate very fast code). If you write your code in assembler you've got to re-write large sections of it.