PILOT is an educational programming language supported by PBXB64 via standalone .pil files. The compiler produces native Windows x64 executables from PILOT source code through the unified IR backend.
.pil extension. Compile with PBXB64 program.pil -o program.exe.Implemented Commands
| Command | Description | Status |
|---|---|---|
R: | Remark (comment). Ignored by the compiler. | Full |
T: | Type text. Supports string literals, $variables, and multi-part comma-separated literals. | Full |
E: | End program. Returns 0 from the entry point. | Full |
C: | Compute / assign. C: $var = "string" or C: #var = number. | Full |
A: | Accept a complete line into $var or a signed 64-bit integer into #var. | Full |
J: | Jump unconditionally to *label. | Full |
M: | Match conditional jump. Jumps to *label if match slot is true. | Full |
Y: | Yes guard. Execute next line only if match slot is true. | Full |
N: | No guard. Execute next line only if match slot is false. | Full |
U: | Call *label as a subroutine. Calls may nest; E: returns to the most recent caller. | Full |
S: | Invoke the Windows sound/beep runtime helper. | Full |
V: | Bind a PILOT variable to a PowerBASIC GLOBAL in both directions. | Full |
*label | Label definition for J:, M:, and U: targets. | Full |
Variable Types
| Prefix | Type | Example |
|---|---|---|
$ | String variable | $name, $message |
# | Number variable (64-bit signed integer) | #count, #age |
Match Slot
The match slot is an internal boolean flag used by Y:, N:, and M: commands:
- After
C: #var = value, the match slot is set to true if value is non-zero, false if zero. - After
C: $var = "string", the match slot is set to true if the string is non-empty, false if empty. - After
A:, the match slot is true for a non-empty string or non-zero number and false otherwise.
Number Expressions
The C: command for number variables supports:
- Integer constants:
42,-5,0 - Boolean constants:
TRUE(1),FALSE(0) - Variable references:
#other - Signed integer arithmetic:
+,-,*,/, and%, with multiplicative operators taking precedence
Text Expressions
The T: and C: commands for strings support:
- Quoted string literals:
"Hello" - String variable references:
$var - Multi-part comma-separated literals (T: only):
T: "Hello", " ", "World"
PowerBASIC Variable Bridge
V: #LOCAL|pb_global_name|QUAD V: $LOCAL|pb_global_name|STRING
Reads import the current PB GLOBAL value. Assignments and accepted input export immediately. Multiple PILOT aliases may bind to the same PB global.
GLOBAL as an additional compiler input. The prefix and bridge type must match.Entry Point
PILOT programs compile to a pilot_main function returning a 64-bit integer. The E: command emits return 0. If no E: is present, the compiler adds an implicit return at the end.
Testing
The current qualification contains 31 link/run cases plus one code-generation route gate.