Working with the IDEPASTA/80 Integration

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/bin

Klive 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/bin

Klive stores only the installation folder; the pasta executable name is added automatically.

The command will:

  1. Verify that SjasmPlus is configured (and stop with an error if it is not).
  2. Store the pasta80 installation folder in Klive.setting.
  3. Check whether ~/.pasta80.cfg exists:
    • If not, it creates a minimal ~/.pasta80.cfg containing the correct assembler path pointing to your SjasmPlus executable and prints a confirmation message.
    • If it does exist, it reads the assembler setting and warns you if it does not match the SjasmPlus path that Klive has configured.
💡

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 -p

To remove all PASTA/80 settings from Klive, run the command without arguments:

pasta80-reset

Compiler 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 keyTypeDescription
pasta80.installFolderstringFull path to the PASTA/80 installation folder (the pasta executable must be inside it)
pasta80.targetstringCompilation target — see table below (default: zx48)
pasta80.optbooleanEnable peephole optimiser (--opt)
pasta80.depbooleanEnable dependency (smart-link) analysis — strips unused units (--dep)
pasta80.ovrbooleanEnable bank-switched overlays — requires zx128 or zxnext (--ovr)
pasta80.releasebooleanDisable Assert and Debug breakpoint code (--release)

Supported targets within Klive IDE

pasta80.target valueDescriptionLoad address
zx48 (default)ZX Spectrum 48K$8000 (32768)
zx128ZX Spectrum 128K$8000 (32768)
zxnextZX 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

SymptomLikely causeFix
”SjasmPlus is not configured” on pasta80-resetsjasmp-reset has not been runRun sjasmp-reset first
”sjasmplus: command not found” during compilationSjasmPlus is not on PATH and ~/.pasta80.cfg is missing or wrongCheck ~/.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 paneFix the errors shown in the output pane
Warning about mismatched assembler path~/.pasta80.cfg was edited manually and differs from Klive’s SjasmPlus settingUpdate ~/.pasta80.cfg or re-run sjasmp-reset to align the paths