Page 2 of 2
Posted: Wed Mar 12, 2008 6:04 am
by StephanvanSchaik
Piranha,
It doesn't matter if you know C or C++. If you know one of those then you will easily understand the other one. So you don't need to learn C to understand the examples if you know C++.
You should learn Assembly for OS Dev though since some examples are in Assembly and because some parts can only be done in Assembly.
The Art Of Assembly e-Book
If you are going to use NASM or something else instead of something like FASM then read the manual and the e-Book, some things will be different.
Example: in FASM they use "array db 32 dup (?)" as showed in the e-Book to create an array of 32 elements where the elements are undefined. In NASM they will most likely use "array resb 32" as showed in the NASM manual.
Regards, Stephan J.R. van Schaik.
Posted: Wed Mar 12, 2008 6:22 am
by Solar
lukem_95 wrote:yeah, there are some things you CANT do in C++ for osdev.
Name one thing you can do in C that you cannot do in C++. (Aside from bad programming habits.)
Really. I'm interested.
Posted: Wed Mar 12, 2008 6:27 am
by JamesM
Reading his post I think really he's referring to things that you can't do in C/C++, and require ASM for (hence his post about learning asm). That's how I interpret it.
Posted: Wed Mar 12, 2008 7:03 am
by lukem95
yeah James is right, ill be clearer next time
Posted: Wed Mar 12, 2008 8:43 am
by piranha
You lug around the manuals in school?
Wow.
Piranha,
It doesn't matter if you know C or C++. If you know one of those then you will easily understand the other one. So you don't need to learn C to understand the examples if you know C++.
I understand that.....Just if you don't know C++ then I think it's better to start in C than to learn C++ and start then. I also look at kernel code of both languages and find that C++ is generally more confusing at this level.
-JL
Posted: Wed Mar 12, 2008 10:27 am
by StephanvanSchaik
I only ever read an e-Book of Assembly on my school and I viewed the OSDev wiki and forum a few times on my school but other than nothing else about OSDev like a manual (we may not download anything).
Regards, Stephan J.R. van Schaik.
Posted: Wed Mar 12, 2008 2:46 pm
by nekros
piranha wrote:You lug around the manuals in school?
Wow.
Piranha,
It doesn't matter if you know C or C++. If you know one of those then you will easily understand the other one. So you don't need to learn C to understand the examples if you know C++.
I understand that.....Just if you don't know C++ then I think it's better to start in C than to learn C++ and start then. I also look at kernel code of both languages and find that C++ is generally more confusing at this level.
-JL
Something to do at school, my math teacher barely speaks english, her native tongue is from India, but it is a language that is not widely spread.
Posted: Wed Mar 12, 2008 4:25 pm
by neon
Solar wrote:lukem_95 wrote:yeah, there are some things you CANT do in C++ for osdev.
Name one thing you can do in C that you cannot do in C++. (Aside from bad programming habits.)
Really. I'm interested.
There actually *are* some constructs that are allowed in C, but not C++. While most of C will work fine compiled as C++, C++ adds some extra rules that make some C code generate errors. ...This is in relation to the languages themselves, not OS development, though, so it may not be what you are referring to here.
This is one of the reasons why I consider C and C++ different languages, rather then "C++ being a superset of C".
Clicky - C and C++ compatibility
Posted: Thu Mar 13, 2008 5:00 am
by jal
StephanVanSchaik wrote:Regards, Stephan J.R. van Schaik.
<g> You may feel yourself lucky not to have been living in the 80s :).
JAL
Posted: Thu Mar 13, 2008 10:39 am
by StephanvanSchaik
If you mean Dallas (the TV show), yeah, my teacher calls me sometimes Mister J.R. Ewing or something. I don't really remember how he calls me. But I do not really care about it since I actually don't know that show. It's before my time
. I just like to write down my full name. I never knew about Dallas until my teacher physics came with it.
Regards, Stephan J.R. van Schaik.
Posted: Thu Mar 13, 2008 2:11 pm
by jal
StephanVanSchaik wrote:If you mean Dallas (the TV show), yeah, my teacher calls me sometimes Mister J.R. Ewing or something.
Indeed,
J.R. Ewing, a very nasty dude indeed.
JAL