This cartridge for the ZXC2 and ZXC3 PCB mimics the behaviour of the Currah uSource peripheral. The uSource provides a ROM based assembler, debugger and FORTH interpreter.
The assembler uses a two pass process and features a range of assembler directives, the ability to include from and output to any stream, e.g. Microdrive, ZX Net, etc, and
provides support for macros. The FORTH interpreter implements a cut-down version of the FORTH language. Both the assembler and FORTH interpreter can be mixed with BASIC and
data passed between them, e.g. assembler labels are actually stored as BASIC variables and so can be manipulated from within BASIC.
Although the real uSource device was only compatible with the 48K Spectrum, the ZXC3 version works with both the 48K Spectrum and the Spectrum 128.
The uSource embeds its commands within BASIC REM statements. Assembler commands are specified using REM ! and FORTH commands specified using REM #. The assembler
and FORTH interpreter are invoked using BASIC LET commands: LET assemble=1 invokes the assembler and LET forth=1 invokes the FORTH interpreter. The debugger is
started in a similar manner using LET debug=address, where address is the location to start debugging from and can even be a ROM address.
In the real device, the uSource ROM is paged in whenever a BASIC LET command processes a numeric variable. This is achieved by detecting an instruction fetch from address $2BAE.
The uSource ROM then examines the name of the variable that follows the LET command and if it is not one of the special variable names then a return is made to the Spectrum ROM
and the BASIC program continues. The return to the Spectrum ROM is also made by an instruction fetch from address $2BAE.
The instruction manual for the uSource can be downloaded from the World of Spectrum website.
Screenshots showing example assembler and FORTH listings can be seen below.
The uSource Emulator is available in a number of different configurations, selected using the drop down lists below.
Emulate a 48K Spectrum, a Spectrum 128 or a Spanish 128.
ROM 0 (Editor)
Include bug fixes to the resolve errors present in the 128 Editor ROM.
ZX Interface 1
Include a version of the Interface 1 ROM.
Emulate a ZX Microdrive using the FLASH ROM as a virtual Microdrive cartridge.
Click here to download the selected uSource Emulator ROM cartridge.
I have produced a partial disassembly of the real uSource ROM and this can be downloaded below.