Clarity about choice of compiler - C or ASM

Everything else that doesn't fall into one of the other PB categories.
Oso
Enthusiast
Enthusiast
Posts: 595
Joined: Wed Jul 20, 2022 10:09 am

Clarity about choice of compiler - C or ASM

Post by Oso »

I'm still unclear on the subject of compiling via C or ASM. When I first used PureBasic a few weeks ago (seems like a long time ago now :) ), I recall from other posts that ASM was being replaced by C, in order to target a greater number of CPUs.

I downloaded my current paid licence in July and I guessed that it was likely to be set to compile in C by default, but I'm not sure that's the case. In my ...\Compilers\ folder, there are two compilers. Are we supposed to manually switch to the C compiler? Can we remain with ASM anyway?

Code: Select all

 Directory of C:\Program Files\PureBasic\Compilers

28/06/2022  17:45           613,968 pbcompiler.exe
28/06/2022  17:45           533,072 pbcompilerc.exe
If I open Compiler - Compiler Options, it shows "PureBasic 6.00 LTS (Windows - x64)" as the compiler. Is this ASM or C ? There are no alternatives in that drop-down list. Thanks.
Last edited by Oso on Wed Oct 19, 2022 12:47 pm, edited 1 time in total.
User avatar
mk-soft
Always Here
Always Here
Posts: 6246
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Clarity about choice of compiler - C or ASM

Post by mk-soft »

The ASM backend compiler is the standard. The C-Backend compiler must be added manually in Preferences -> Compiler.

The exception here is Purebasic for macOS (M1) and Raspberry (Linux ARM). Here the compiler is the C-Backend by default and there is no ASM compiler because the processor instruction set is ARM.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Oso
Enthusiast
Enthusiast
Posts: 595
Joined: Wed Jul 20, 2022 10:09 am

Re: Clarity about choice of compiler - C or ASM

Post by Oso »

mk-soft wrote: Wed Oct 19, 2022 12:25 pm The ASM backend compiler is the standard. The C-Backend compiler must be added manually in Preferences -> Compiler.
Thanks mk-soft. I guess as things stand, the majority of developers, with the exceptions you mention, should leave it set as it is then.
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: Clarity about choice of compiler - C or ASM

Post by juergenkulow »

If you use the command line version of PureBasic pbcompiler.exe translates via ASM or pbcompilerc.exe translates via C to EXE.
Using the command line compiler
Please ask your questions, because switch on the cognition apparatus decides on the only known life in the universe.Wersten :DDüsseldorf NRW Germany Europe Earth Solar System Flake Bubble Orionarm
Milky Way Local_Group Virgo Supercluster Laniakea Universe
Post Reply