Page 1 of 1

PB compiler, newbie questions

Posted: Thu Sep 04, 2003 6:05 pm
by newbie
Hi,

i was just wondering which commands PB translate directly in Assembler, i heard of basics mathematics functions on this forum, is it the case for something else ?

I'm not sure of how a PB code is compiled, i think that the code is translated
into API commands and others in ASM code ? the hole at the end converted in ASM ?
So is it worth to code small piece of code in ASM while the rest is in PB?

I'm really lost :?

Posted: Thu Sep 04, 2003 6:20 pm
by Pupil
You can compile from the console with the /commented switch and see the ASM output that PB produce, then decide if it's worth doing inline ASM.. :)

Posted: Thu Sep 04, 2003 10:11 pm
by newbie
thanks for the tip, very interesting ! ;)

But i don't know anything about compilers, this is why even if i agree that C++ is better than VB, and that Assembler is better than C++ (i think PureBasic is equal or better than C++) i don't fully understand why in fact.
I agree that VB do many DLL and API calls, whereas C++ like PureBasic are more self executable, but at least for all language, while compiling, all the code is translated in assembler right ? Why one should be better than the other ?
As i said, i perfectly agree that some are better, but i don't fully understand why.

For now i'm totally happy with PureBasic, it is what i always looking at, i just want to further my understanding of "how" and "why" ;)

Posted: Fri Sep 05, 2003 12:03 pm
by GedB
Theres a good article on compilers here:

http://www.wikipedia.org/wiki/Compiler