How this TZX was constructed

This Pool Source Code TZX was constructed with Codex. Read the verbatim construction conversation to see how the tape image was put together.

Short Instruction Manual

How to use Pool Source Code

  1. Type A to assemble.
  2. Type R to return to BASIC.
  3. Type PRINT USR 59000 to run the game. "P" for PRINT. Ctrl-Shift to change mode, then "L" for USR

Keyboard in the browser

The Spectrum keyboard is unlike a PC keyboard. In JSSpeccy, Ctrl acts as Symbol Shift. On a real Spectrum running Aspect, delete is Symbol Shift + 0 — not Caps Shift + 0.

This page remaps common PC keys automatically. You can also type the Spectrum combinations directly:

You want Press (PC) Or Spectrum-style
DeleteBackspaceCtrl + 0
,,Ctrl + N
;;Ctrl + O
:Shift + ;Ctrl + Z
"Shift + 'Ctrl + P
..Ctrl + M

Click the emulator screen first if keys seem ignored. This page remaps PC punctuation and Backspace to the Symbol Shift combinations Aspect expects. You can also type them Spectrum-style, e.g. Ctrl+N for ,.

Source line syntax

Each line follows standard Z80 assembly form:

Label: Operator Operand; Comment

For example:

START: LD HL,MSG1; load message address
MSG1:  DB "Hello";     store a string

How labels work

A label marks a position in your source. Other instructions can refer to it by name:

START: JP START    ; jump to this label
MSG:   DB "text"
       LD HL,MSG      ; HL points at MSG

After assembly, command S prints a cross-reference of every label and its address. Labels are not required on every line — only where you need a named location.

Directives (pseudo-ops)

These are not Z80 instructions; Aspect understands them as assembler directives:

Directive Purpose
ORGSet the assembly origin — where the program counter starts.
LOADSet where object code is written in memory.
EQUAssign a value to a symbol, e.g. SCREEN: EQU 4000H.
DSReserve storage bytes. Put the label on one line, DS n on the next.
DWEmit a 16-bit word (bytes reversed, as the Z80 expects).
DBEmit one or more bytes, e.g. DB 20H,24H or DB "text".
ENDMarks the end of the source. Required — omitting it causes an EOF error.

ORG and LOAD — what to set them to

Every program must begin with both ORG and LOAD. In the common case they are the same address:

ORG 7800H
LOAD 7800H

Define storage (DS) — common pitfall

Put the label and DS on separate lines:

DATA:
DS 100

Do not write DATA: DS 100 on a single line.

Assembling and running

  1. Enter source with I (insert). Use V16 to review listing pages.
  2. Type A and press Enter to assemble. Press any key to pause or resume a long listing.
  3. At end of listing, EOF appears and object code sits in memory from the LOAD address.
  4. Type S to view the label cross-reference.
  5. R returns to BASIC with your source intact. Re-enter Aspect with PRINT USR 24576.

Saving and loading