Working with the IDESJASMPLUS Integration

SJASMPLUS Integration

Klive IDE supports SJASMPLUS out-of-the-box, provided you installed the SjasmPlus Z80 assembler utility on your machine. After setting up SjasmPlus integration, you can use Klive IDE to edit, run, and debug programs created with this assembler.

💡

Running and debugging SjasmPlus-compiled code is tested only with the ZX Spectrum 48K model.

As Klive IDE does not know where to find the SjasmPlus compiler on your machine, you must set it up before using it.

Setting up SJASMPLUS

Visit the GitHub page of SjasmPlus for details about this excellent Z80 assembler. You can read information about installing it here. Note the installation folder; you will need it to set up the integration with Klive.

The IDE provides a command, sjasmp-reset (or shorter, sjasmpr), to connect Klive with SjasmPlus. You can issue this command from the Command window:

SjasmpReset

The command expects a single parameter: the path of the SjasmPlus installation folder. When Klive invokes the assembler, the SjasmPlus executable name is added to this path.

💡

Klive stores the SjasmPlus settings in the Klive.setting file. If you want to change this path for a particular project (perhaps you want to test with another SjasmPlus version), use the -p switch to save this setting into the currently open project.

Using SJASMPLUS

After setting up the SjasmPlus integration, you can create Klive projects with the sjasmplus template:

SJASMPLUS project

This template creates a project with a code.asm file as the build root and associates the .asm and .sjasm file extensions with the SjasmPlus compiler.

If you start with an existing project, you can create source code files with the .sjasm extension and promote them to build roots. Such a file will leverage the SjasmPlus compiler.

When you run the SjasmPlus code in the default Klive project template, you can see the result in the Emulator window:

ZxbRunning