PBXB64 V23 language reference

Forth supported commands and scope

Windows x64 dictionary with stack/integer/float words, loops, byte I/O, counted strings, source inclusion and numeric PB embedding. BASE, HEX, U<, UM*, */ and other listed words are explicit non-goals; no Forth 2012 claim. Recovery cases remain unrun.

Status: experimental. Source basis: PBXB64/docs/FORTH_SCOPE.md and PBXB64/src/frontends/forth/forth_register.c plus execution files.

Back to language detailPBXB64 overviewDeutsch

Stack / Stapel

NameSyntax / formScopeBoundary
DROP DUP ?DUP SWAP OVER ROT NIP TUCKword ( x -- ... )Core data-stack manipulation words registered by forth_register.c.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.
2DROP 2DUP 2SWAP 2OVERword ( ... -- ... )Two-cell stack operations.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.
DEPTH PICK ROLLwordDepth and rearrangement helpers where registered.Words outside the registered dictionary diagnose.

Arithmetic / Vergleiche

NameSyntax / formScopeBoundary
+ - * / MOD /MOD 1+ 1- 2+ 2- 2* 2/n1 n2 wordInteger arithmetic and quotient/remainder words.Cell results are i64; divide-by-zero follows the runtime error path.
NEGATE ABS MIN MAXn wordUnary and range helpers.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.
= < > 0= 0< 0>n1 n2 wordComparisons producing the Forth flag convention.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.
AND OR XOR INVERT LSHIFT RSHIFTu1 u2 wordBitwise operations and shifts.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.

Definitions / Definitionen

NameSyntax / formScopeBoundary
: ; IMMEDIATE EXECUTE: name ... ;Colon definitions, immediate words and execution tokens.Nested/invalid definitions are diagnosed.
IF ELSE THEN BEGIN UNTIL AGAIN WHILE REPEATcontrol wordStructured control flow.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.
DO LOOP +LOOP I J ?DO LEAVE UNLOOPcontrol wordCounted and conditional loops.Source-/syntax-backed subset; no whole-language or aggregate qualification claim.

I/O, strings, memory / I/O, Strings, Speicher

NameSyntax / formScopeBoundary
KEY EMIT ACCEPT TYPE CR SPACEwordByte input/output and counted-string display.Device behavior is host-dependent.
S" EVALUATES" text"String literals and evaluation path.Source-token-consuming forms are bounded by the dynamic allow-list.
ALLOT CREATE , @ ! C@ C!wordMemory cells, buffers and byte fetch/store.Bounds/ownership rules are explicit in the scope; no general heap claim.