How do you program an OS in c++ without the libraries at han
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:How do you program an OS in c++ without the libraries at
KISS?! You don't mean that crazy heavy metal band, do you?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:How do you program an OS in c++ without the libraries at
KISS: Keep It Simple, Stupid!beyond infinity wrote: KISS?! You don't mean that crazy heavy metal band, do you?
no, that wasn't even personal but actually in the acronym.
Re:How do you program an OS in c++ without the libraries at
beyond infinity: Have you been living in a box the last couple of years?
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:How do you program an OS in c++ without the libraries at
@bubach: yeah: in a house. For 30 years now. *chuckle* Sure you too are living in such an odd thing are you? *sfg*
You know KISS?
You know KISS?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:How do you program an OS in c++ without the libraries at
Well, the C++ ABI is a good starting point. The gcc implementation can be found in gcc source under "libsupc++". That's what is needed for gcc to support c++.Solar wrote: I admit I haven't (since I went KISS, and not very far for that matter), but I didn't find any references to indicate they were not working out-of-the-box. Thanks for the warning (in case I'd pick up my kernel project sometime).
If I remember correctly, virtual functions need support because of the pure virtual exception that is thrown...
Re:How do you program an OS in c++ without the libraries at
I meant a really small box, with no connection to the world whatsoever..
KISS is wellknown around here, you can't have missed it..
KISS is wellknown around here, you can't have missed it..
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:How do you program an OS in c++ without the libraries at
Ah! You mean HERE! *rofl* And I have refered to real world aaaall the time. Now look, who is the unhappy hippopotamus here *lolbhtf*
Small box ... Hm, I'm about 2 meters tall. And sure you don't mean a wooden night gown, do you?];->
Small box ... Hm, I'm about 2 meters tall. And sure you don't mean a wooden night gown, do you?];->
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:How do you program an OS in c++ without the libraries at
lol.. well, no.
we better end this pointless thing now.
we better end this pointless thing now.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How do you program an OS in c++ without the libraries at
am i hearing distant voices from beyond infinity talking about a mystical box where people have "house" instead of homepages ?
and what's that "real world" you're all talking about ?
soz. currently reading a novel by Tad Williams (otherland) about minds trapped in omnipresent-VR-internet-has-become... couldn't resist
and what's that "real world" you're all talking about ?
soz. currently reading a novel by Tad Williams (otherland) about minds trapped in omnipresent-VR-internet-has-become... couldn't resist
Re:How do you program an OS in c++ without the libraries at
Ah, but virtual functions and pure virtual functions are two different beasts - and you could easily avoid pure virtuals if the exception is all you have to worry about.ineo wrote: The gcc implementation can be found in gcc source under "libsupc++". That's what is needed for gcc to support c++. If I remember correctly, virtual functions need support because of the pure virtual exception that is thrown...
It would be interesting to have someone verify the capability of using virtual / pure virtual functions in kernel space without additional support code.
Every good solution is obvious once you've found it.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:How do you program an OS in c++ without the libraries at
Ah, Otherland ... that's one cool series. More than just a bit dark I daresay, but really good. And that cruel murderer with his twist ... oh lad. Already got a clue why that vr-specialist woman is blind and why they can't escape from VR? *gg* in which part of the four volumes are you?Pype.Clicker wrote: am i hearing distant voices from beyond infinity talking about a mystical box where people have "house" instead of homepages ?
and what's that "real world" you're all talking about ?
soz. currently reading a novel by Tad Williams (otherland) about minds trapped in omnipresent-VR-internet-has-become... couldn't resist
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:How do you program an OS in c++ without the libraries at
I'll check that tonight. I did some tests a year ago, I think I still have it at home.Solar wrote: It would be interesting to have someone verify the capability of using virtual / pure virtual functions in kernel space without additional support code.
Here are the results I remember:
- You can use virtual method (& inheritance) "out-of-the-box"
- You must reimplement libsupc++ for exceptions (stack unwinding ), new, delete, pure virtual.
But I always considered C++ as a whole, that's why it was obvious I needed the libsupc++ part. But that's a design choice, maybe not the best one.
Re:How do you program an OS in c++ without the libraries at
My main consideration why I want my kernel in C++ is the better scoping (namespaces, class members), syntax (kout << ... instead of printf(...)) and stricter error checking. That's why I was perfectly comfortable with not having new(), exceptions etc. - as long as the FirstStep kernel lasted.
Every good solution is obvious once you've found it.
Re:How do you program an OS in c++ without the libraries at
In theory, an operating system would be an excellent candidate for OO programming, as the devices in a machine are objects. Take the floppy drive for example, there could be member functions for reading and writing, plus properties for any other device registers etc.Solar wrote: My main consideration why I want my kernel in C++ is the better scoping (namespaces, class members), syntax (kout << ... instead of printf(...)) and stricter error checking. That's why I was perfectly comfortable with not having new(), exceptions etc. - as long as the FirstStep kernel lasted.
srg
Re:How do you program an OS in c++ without the libraries at
Yes, of course - that is a welcome bonus. But You can code at least object-based in plain C, too. And you don't need pure virtual functions to implement an OO kernel, either - that's what I wanted to say.
Overly ambitious object hierarchies are usually a telltale sign of someone infatuated with the OO paradigm, disliking templates and more at home with Java than with C++. No offense intended.
Overly ambitious object hierarchies are usually a telltale sign of someone infatuated with the OO paradigm, disliking templates and more at home with Java than with C++. No offense intended.
Every good solution is obvious once you've found it.