PASTA/80 Integration
Klive IDE supports PASTA/80 out-of-the-box, provided you have the PASTA/80 Pascal compiler installed on your machine. After setting up the integration, you can use Klive IDE to edit, compile, run, and debug ZX Spectrum Pascal programs written for PASTA/80.
PASTA/80 uses SjasmPlus as its assembler backend. You must install and configure SjasmPlus in Klive before setting up PASTA/80. See the SJASMPLUS Integration page for instructions.
Prerequisites
1. Install SjasmPlus
PASTA/80 does not assemble the generated Z80 code itself — it delegates that step to SjasmPlus. Install SjasmPlus and note its installation folder.
2. Configure SjasmPlus in Klive
Run the sjasmp-reset command (alias sjasmpr) from the Klive Command window, passing the SjasmPlus installation folder:
sjasmp-reset <full path to the SjasmPlus installation folder>For example:
sjasmp-reset /usr/local/binKlive will append the sjasmplus executable name to this path automatically.
3. Install PASTA/80
Visit the PASTA/80 releases page to download the compiler for your platform. After installing it, note the full path to the pasta80 (or pasta) executable.
Setting up PASTA/80 in Klive
With SjasmPlus already configured, run the pasta80-reset command (alias p80r) from the Command window:
pasta80-reset <full path to the pasta80 installation folder>For example:
pasta80-reset /usr/local/binKlive stores only the installation folder; the pasta executable name is added automatically.
The command will:
- Verify that SjasmPlus is configured (and stop with an error if it is not).
- Store the pasta80 installation folder in
Klive.setting. - Check whether
~/.pasta80.cfgexists:- If not, it creates a minimal
~/.pasta80.cfgcontaining the correctassemblerpath pointing to your SjasmPlus executable and prints a confirmation message. - If it does exist, it reads the
assemblersetting and warns you if it does not match the SjasmPlus path that Klive has configured.
- If not, it creates a minimal
Klive stores PASTA/80 settings in the Klive.setting file. Use the -p switch to save the setting into the currently open project instead of globally:
pasta80-reset /usr/local/bin -pTo remove all PASTA/80 settings from Klive, run the command without arguments:
pasta80-resetCompiler settings
The following settings control PASTA/80 compilation. You can read or change them with the set / setl commands or by editing Klive.setting directly.
| Setting key | Type | Description |
|---|---|---|
pasta80.installFolder | string | Full path to the PASTA/80 installation folder (the pasta executable must be inside it) |
pasta80.target | string | Compilation target — see table below (default: zx48) |
pasta80.opt | boolean | Enable peephole optimiser (--opt) |
pasta80.dep | boolean | Enable dependency (smart-link) analysis — strips unused units (--dep) |
pasta80.ovr | boolean | Enable bank-switched overlays — requires zx128 or zxnext (--ovr) |
pasta80.release | boolean | Disable Assert and Debug breakpoint code (--release) |
Supported targets within Klive IDE
pasta80.target value | Description | Load address |
|---|---|---|
zx48 (default) | ZX Spectrum 48K | $8000 (32768) |
zx128 | ZX Spectrum 128K | $8000 (32768) |
zxnext | ZX Spectrum Next | $8000 (32768) |
When --ovr (overlays) is active the addressable limit is reduced: $C000 for zx128 and $E000 for zxnext.
Using PASTA/80
After completing the setup, create a Klive project and add .pas source files. Promote a .pas file to the build root to designate pasta80 as the compiler for that file.
When you build, pasta80 compiles the Pascal source to a raw binary and Klive injects it into the emulator at the target’s load address (the entry point is always the first byte of the binary — a jp __init instruction generated by the runtime).
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
”SjasmPlus is not configured” on pasta80-reset | sjasmp-reset has not been run | Run sjasmp-reset first |
| ”sjasmplus: command not found” during compilation | SjasmPlus is not on PATH and ~/.pasta80.cfg is missing or wrong | Check ~/.pasta80.cfg; the assembler key must point to the full path of the sjasmplus executable |
| ”pasta80 did not produce an output binary” | Compilation errors — check the Build output pane | Fix the errors shown in the output pane |
Warning about mismatched assembler path | ~/.pasta80.cfg was edited manually and differs from Klive’s SjasmPlus setting | Update ~/.pasta80.cfg or re-run sjasmp-reset to align the paths |