Author Topic: programs with other programs  (Read 15295 times)

nobody

  • Guest
programs with other programs
« on: February 20, 2009, 03:48:42 AM »
Im want to make a os type of thing, just as a challenge. should I make features all be right in one program that gets booted, or should the booted program run the others when there requested?

nobody

  • Guest
Re: programs with other programs
« Reply #1 on: February 20, 2009, 06:53:40 AM »
> Im want to make a os type of thing

!!! WARNING: VERY HARD TASK !!!

>  the booted program run the others when there requested?

Do you know what a KERNEL is ? It's a good idea not to put garbage like a "pizza-feature" into the kernel.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: programs with other programs
« Reply #2 on: February 20, 2009, 08:40:05 PM »
It's *your* OS! What do you want it to do?

The "pizza-feature" sounds pretty good to me! Maybe eject the CD tray so you've got a place to putcher beer...

Obviously, it would be more flexible if these could be user-loadable programs. I might want the pizza but not the beer. I've quit drinkin' beer, so I want to delete it. You got a delete feature?

On the other hand, the folks who find downloading and installing a program to be a four-hour job might find it easier if everything was loaded and ready to run when you boot. :)

Good old "command.com" (it's been an .exe for years!) has both "intrinsic" and "extrinsic" commands - "dir" is intrinsic, "copy" is intrinsic... but the less brain-dead "xcopy" is extrinsic (xcopy.com or .exe is loaded from disk). So "both" is a possible answer...

Running separate programs from disk implies that you've got some sort of file system. FAT12 is pretty easy to implement, Fat16 is even easier. Or maybe you've got a better idea. Might not be the *first* thing you want to implement, though.

You'd need to decide on an executable format... ".com-like" would probably be easiest, but if you want to be able to load and use dynamic libraries, you might want something more complicated...

You'd need to figure out where in memory to load a program - if you've *got* enough memory to load it. Memory management is a complex topic. First thing would be to determine how much memory is installed. Turns out that "probing" for memory is a bad idea - some memory-mapped hardware will hang if you goose it wrong. Bios knows - I'd interrogate bios mercilessly before switching to pmode (I assume you'll be switching to pmode). An intrinsic "mem" command might be someplace to start...

You know about the A20 line? "A pain from the past!" Different methods for different machines... and some machines will hang if you try the wrong method first. I'd copy what Linux does... or BSD...

The news:alt.os.development guys will tell you to read, read, read before you code a byte. Starting with Tannenbaum. There's a *lot* of literature. If you read it all, you'll *never* get to coding! If you intend a "serious" OS - a "Windows-killer" - that's probably a good idea. If you just want something to play with - and learn from - I don't see too much harm in "start coding and see what it turns out to be".

I'm not writing an OS. I know how to do the bootsector and load another program, but I don't have any clear idea what I want to load. "How is my OS going to be better than... Windows, Linux, whatever?" No idea. If you've got an answer to that one, that's a good start. If not... you can still have fun with it...

It's *your* OS...

Best,
Frank

nobody

  • Guest
Re: programs with other programs
« Reply #3 on: March 06, 2009, 07:58:48 PM »
You might want to look at http://www.osdever.net and http://osdev.org  Both have tons of information about creating an OS.