Hello everyone.

I have been programming since 1988 when I was 6 years old. However, I just started learning assembly (HLA for DOS) just recently. I am fed up with Windows and I want to make my own OS, if only for me to use. I'm not trying to make a kick ass OS to get rich. I just want to do it to see if I can do it.

I can imagine I have tons to learn about assembly; I already know that, and I am up to the task, because I will learn it. Please don't tell me not to waste my time since it will be extremely hard.

Ok, there's some background information. Now, my question is, which version of HLA should I use to make my own OS with? Would any version work? Is there a better version for this type of thing?

Also, is there any tips you experts can give to someone who is determined to do this for educational purposes? This is entirely intended for my own fun and challenge. I highly doubt I will market it.

Fyi, I don't care how long it takes, I will do it. If I have to look up every letter of information myself, I will do it. I just wondered if anyone here could offer me some advice on it.

Such as how to make programs that boot the computer up instead of having to run on Windows or DOS already, in order for them to even run. It would defeat the whole purpose.

Little things like that, that will make a big difference for me.

Thanks in advance guys.

- Diode
Posted on 2005-01-04 00:44:18 by Diode
Diode,

Probably NASM is the right tool for the job here, it will allow you to write the mixed real mode / protected mode code to start the machine and change it to protected mode. Apart from the startup code to get it going, you can program the rest of the OS in more or less whatever you like but C is generally a good candidate here and use assembler to tune hot spots.

I understand that FASM has similar capacity as well for writing mixed real/protected mode code.
Posted on 2005-01-04 00:48:43 by hutch--
I would suggest that you code in FASM. The author is a nice fellow that fix bugs as soon as it is reported. Also MeneutOS is a good example of an OS coded in FASM. There is even a FASM port for MeneutOS.
Posted on 2005-01-04 06:17:14 by roticv
HLA it's still in development doesn't suit for a development tool. If you want to use HLA you'll have to wait, Goasm it's great assembler too.
Posted on 2005-01-04 12:56:15 by Statix Star

HLA it's still in development doesn't suit for a development tool. If you want to use HLA you'll have to wait,

Just because it's still in development doesn't mean it's not a good tool. FASM is also in development, and that's a pretty nice tool. Same with VC++ :-)

I'd say go with FASM or NASM, those are both very suited for stuff like os-dev. Once you have the very lowlevel things like bootsector working, you can use just about anything. You should stay away from MASM though, unless you have a purchased versopm - the license for the freely available versions only allow you to develop windows apps.

HLA is probably fine by itself, but there's a lot of the HLA standard library you can't use because it requires some win32 API stuff (or well, linux).
Posted on 2005-01-04 15:19:25 by f0dder
Some general tips out of my personal experience: :)

- First of all code some kind of debugging helper functions. You will use that a lot! :twisted:
- Instead of just starting coding the kernel. Design it first, layout all the thing you want to implement and only then begin the coding. Implementing a bit of this and bit of the in parallel without any design will lead only to troubles.
- Start small. Don't star straight with difficult stuff. Code a simple kernel first (preemptive multitasking with some simple scheduling for example)
- And once again, design all the parts (such as drivers subsystem, system calls subsystem, etc.) at the beginning. Otherwise you will probably will need to spend some weeks rewriting it all from the beginning.
- Use http://bochs.sourceforge.net and may the force be with you 8)


P.S. I almost forgot the most important - get yourself lot of coffee!.
Posted on 2005-01-04 15:23:10 by arafel
I can only agree with arafel - although I do think that your first hobby project should be without much planning, that way you learn how important it really is ;-). Also, that way, once you start planning ahead, you have a better idea of pitfalls, and what kind of things you need to take into consideration.

As for debugging stuff, simple things like "formatted output" (printf or whatever syntax) is a really good thing to start out with, but if you're serious you'll want to develop a nice kernel-mode debugger. Not as hard as it sounds, when you're actually in control of the OS...
Posted on 2005-01-04 16:01:26 by f0dder
Just one thing; Microsoft in future will change all their products to be use
only for their OS. C is commonly as masm, instead of masm you can use
C. Now that masm is not anymore macro assembler, is; microsoft macro
assembler. Well, yeah. You can help Randall Hyde developing his HLA since he doesn't know how much the HLA lib is going to change. Then after
you help HLA and Randall improve HLA, develop your OS.
Posted on 2005-01-04 16:39:10 by Statix Star
Two good resource sites for os development..
http://www.osdev.org
http://www.osdever.net
Posted on 2005-01-04 16:48:44 by dev_zero