PB compiler, newbie questions

Just starting out? Need help? Post your questions and find answers here.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

PB compiler, newbie questions

Post 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 :?
- Registered PB user -

Using PB 4.00
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post 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.. :)
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post 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" ;)
- Registered PB user -

Using PB 4.00
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

Theres a good article on compilers here:

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