| English | Português (Brasil) |
Code-generation diagnostics use the E5000-E5999 range.
Trigger:
python -m nes_pascal.cli examples/minimal.nsp -o build/minimal.nes
with cc65 absent from PATH.
Expected compiler output:
E5001: missing toolchain component: ca65 and ld65.
PATH.Trigger:
ca65 or ld65 rejects its generated input
Expected compiler output:
E5002: ca65 failed.
<tool output>
$0300-$07FF regular user region. The focused regression source is
tests/fixtures/diagnostics/user_ram_exhausted.nsp, used with a deliberately
constrained internal test layout.Expected compiler output:
E5003 program.nsp:5:5
User RAM cannot allocate Second: requested 1 byte, but 0 bytes remain in User RAM.
tests/fixtures/diagnostics/temporary_ram_exhausted.nsp, whose nested
expression needs 17 temporary bytes.Expected compiler output:
E5004 temporary_ram_exhausted.nsp:1:1
Expression and loop code requires 17 temporary bytes, but the Zero Page temporaries region has only 16 bytes available.
$00FF,
overlapping reservations, a region beyond $07FF, or a non-page-aligned
OAM shadow.MemoryLayoutSettings; no public CLI option changes these values.Expected compiler output:
E5005 <input>:1:1
The OAM shadow region must start on a 256-byte page boundary.
Expected compiler output:
E5006 <input>:1:1
Generated segment for User RAM requires 1281 bytes, but its RAM region contains 1280 bytes.
$0100-$01FF) than the ABI permits. Every active JSR reserves two bytes
for its return address; the remaining capacity keeps 10 bytes for runtime
JSR frames and NMI headroom, so the supported maximum source-call depth is
E3014, so this diagnostic fires
only for long acyclic call chains.tests/test_functions.py (124
functions chained through the deepest call emits this diagnostic).Expected compiler output:
E5007 <input>:1:1
Callable nesting depth of 124 exceeds the supported maximum of 123. Each nested procedure or function call consumes two bytes of the 256-byte NES hardware stack for its JSR return address, and 10 bytes are reserved for runtime and NMI stack usage.