You are probably used to compiling your main.bas
file with fbc main.bas
, creating a file main.exe
. This is an oversimplified view however. Let's see what the docs have to say about that:
At its simplest, fbc takes a source file as a command-line argument and produces an executable file. It does this by compiling the source file (.bas) into an assembly (.asm) file, then compiling this into an object file (.o) using GAS and finally linking using LD this object file to other object files and libraries it needs to run, producing the final executable file. The assembly and compiled object files are deleted at this point by default.
So, actually, this is a multistep process:
main.bas
is turned into a generated assembly code filemain.asm
(or with-gen gcc
it would be a generated C code filemain.c
). We can execute that step alone usingfbc -r main.bas
.main.asm
is compiled (using GAS, the assembler) to an object