First program

Create hello.pas:

program hello;
begin
  writeln('Hello, world!');
end.

Compile it:

./pxx hello.pas hello

Run the executable:

./hello

The first compiler argument is the source file. The optional second argument is the output path. If you omit the output path, PXX derives one from the source name and refuses to overwrite the source file.

PXX emits a final ELF executable directly. There is no assembler or linker subprocess in the normal path. That's the default, but not the only output PXX can produce — --emit-obj writes a relocatable .o instead, and its assembly-source frontend can write a shared .so; see the command-line reference.

Next