Be a Supporter!

making your own OS

  • 374 Views
  • 9 Replies
New Topic Respond to this Topic
Peaceblossom
Peaceblossom
  • Member since: Dec. 23, 2003
  • Offline.
Forum Stats
Member
Level 25
Reader
making your own OS 2004-12-19 18:19:37 Reply

i was wondering what program i should use to make my own windows and mac and a thing i create compatible OS. is c++ good or should i use a more complex program. i've wanted to do it since some guy i knew did it


BBS Signature
chis
chis
  • Member since: Jun. 16, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to making your own OS 2004-12-19 18:30:38 Reply

You can do it in C++

And other languages..

CronoMan
CronoMan
  • Member since: Jul. 19, 2004
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to making your own OS 2004-12-19 18:38:13 Reply

Well, you can only do it in C/C++ or assembly. Most other languages are API dependant.

And it's a big job, no, it's enormous. And it requires a great deal of knowledge with OS architecture, and hardware interrupts.
And some things you have to write in ASM, like multi-tasking, threading, and the boot loader.


"no sound in ass"

WhiteBlackPerson
WhiteBlackPerson
  • Member since: Aug. 4, 2001
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to making your own OS 2004-12-20 10:23:24 Reply

Yeah it's way more complex than just making windows appear with some drawing API.
I doubt that you have the skill to do it if you don't even know what language to start using.
Anyways, good luck.

Sar-Casm
Sar-Casm
  • Member since: Dec. 13, 2002
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to making your own OS 2004-12-21 00:29:02 Reply

While it is true you'll have to know some assembly, you most certainly can make operating systems in languages other than C/C++:

- (goes without saying) Objective C (I'll admit I have no evidence, but seeing as it is a strict superset of C it must be possible [that is you can compile any C program perfectly in an ObjC compiler]).
- Wirthian languages: Pascal (derivatives especially), Modula, Oberon, et al. (the original MacOS is written in Pascal; Oberon is also an operating system).
- Forth, colorForth, et al. (Sun Microsystem's OpenFirmware BIOS is written in Forth; colorForth is an operating system as well [has only the boot-loader and basic kernel in assembly]).

This list is much bigger than above, it's hard to find languages explicity claim systems programming capability even 'though they do support low-level coding.

CronoMan
CronoMan
  • Member since: Jul. 19, 2004
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to making your own OS 2004-12-21 11:52:38 Reply

don't forget Fortran and COBOL. Those were the most common languages for developing operating systems in the 60's - 80's.
And you can also write it in QBasic ;)

Well, it's best to use as much ASM as possible, to get more speed. Or your window manager will be as crappy and slow as XWindows ;)


"no sound in ass"

Sar-Casm
Sar-Casm
  • Member since: Dec. 13, 2002
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to making your own OS 2004-12-21 21:43:58 Reply

Well, it's best to use as much ASM as possible, to get more speed.

You'd think that, but I've seen anecdotal evidence which suggests the contrary — even the best assembly programmers can't handle the huge scope of some projects with nearly as much efficiency as a compiler.

I used to be an assembly fan but in reality it seems today's large projects make [mainly/entirely] assembly [programs] redundant on two fronts: development time (in this corporate world where you are constructing software which was 'meant to be out yesterday') and the not-so-great speed increases over compilers, if any.

stickmoose
stickmoose
  • Member since: Mar. 10, 2003
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Response to making your own OS 2004-12-21 22:37:27 Reply

At 12/21/04 09:43 PM, BillGates wrote: WAaaaWAWAAAwawaawaawaaaaa

Yay for the knowledge of the Gate-inator!

Ravens-Grin
Ravens-Grin
  • Member since: Jun. 3, 2003
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to making your own OS 2004-12-21 22:37:46 Reply

A compatibilty OS? Maybe do something like an entirely java based program compilings(like mozilla, adobe, those kind of programs) and then on the different machine types you can use c++ to optimize it and make your own virtual machine so that it's a tadbit faster.

CronoMan
CronoMan
  • Member since: Jul. 19, 2004
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to making your own OS 2004-12-22 11:53:33 Reply

At 12/21/04 09:43 PM, BillGates wrote:
Well, it's best to use as much ASM as possible, to get more speed.
You'd think that, but I've seen anecdotal evidence which suggests the contrary — even the best assembly programmers can't handle the huge scope of some projects with nearly as much efficiency as a compiler.

The compilers often don't use stacking at all.
The code gets 1000 times bigger (thus slower)

Example :
Use a 16-bit dos compiler (like powerc or something similar)

Write a program that does the following

Sets the screen mode to mode 13h (setvmode(13), mov ax, 13; int 21)
Create a pointer to VGA memory (0xA000) (8-bit)
Create another pointer for a reference to the VGA pointer (8-bit)
Make three loops
One that loops infinitely (main loop)
Set the reference pointer to the VGA pointer
One loop for the y dimension of the screen (0 to 199)
One loop for the x dimension of the screen (0 to 319)
And here, set the value of the current position of the reference pointer to a random value between 0 and 255

and do the same in pure ASM. (MASM, MBASM whatever)

note the difference of about 100000 fps

If you're thinking about development time, I agree.

But no matter how you see it, human-made ASM code is way faster than any compiler can do.


"no sound in ass"