What don't I have to implement?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
TheDragon
Member
Member
Posts: 43
Joined: Mon Aug 25, 2008 8:23 pm
Location: Middle of Nowhere

What don't I have to implement?

Post by TheDragon »

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
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: What don't I have to implement?

Post by CodeCat »

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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: What don't I have to implement?

Post by Love4Boobies »

TheDragon wrote:such as OOP, pointers, and other such things.
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.

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 ]
User avatar
TheDragon
Member
Member
Posts: 43
Joined: Mon Aug 25, 2008 8:23 pm
Location: Middle of Nowhere

Re: What don't I have to implement?

Post by TheDragon »

Love4Boobies wrote:
TheDragon wrote:such as OOP, pointers, and other such things.
As for pointers, why would you think you'd need to implement support? :) Pointers are just normal variables that are used as addresses.
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*

Thanks for the help, though.
Post Reply