Hello. I am going to get serious in my endeavors to make an operating system. However, there is some confusion in my mind as exactly what I need to code, as many of the tutorials use features of C/C++ that I would have thought to have been implemented, such as OOP, pointers, and other such things. I know that one needs to at least implement a STL for some of the functions to work (such as cout and malloc), but what else needs to be done by me and what is built into the computer? Thanks for all your help
--The Dragon
What don't I have to implement?
Re: What don't I have to implement?
For OOP you don't need any support, except if you need RTTI features like typeid or dynamic_cast. You don't need support for templates either, they work right out of the box. But nothing from the standard include files will work, so pretty much anything you'd need to type #include < for is out of bounds. Include only your own files.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: What don't I have to implement?
There's an article on the wiki about using C++ for osdev. It clearly states there's no need to set up anything for OOP. As for pointers, why would you think you'd need to implement support? Pointers are just normal variables that are used as addresses.TheDragon wrote:such as OOP, pointers, and other such things.
Code: Select all
NULL: EQU 0
mov [ptr],var1 ; ptr points to var1
mov [ptr],var2 ; ptr points to var2
ptr: dw NULL
var1: db ..
var2: db ..
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: What don't I have to implement?
Darn. I knew they were variables that contained the address of another variable, but I wasn't thinking, I guess. I still have to completely grasp the whole pointer thing. *sigh*Love4Boobies wrote:As for pointers, why would you think you'd need to implement support? Pointers are just normal variables that are used as addresses.TheDragon wrote:such as OOP, pointers, and other such things.
Thanks for the help, though.