Skip to Content

The BASIC Listing

The BASIC Listing view lists the BASIC program that is in the machine’s memory right now, read straight from the BASIC program area. Use it to see what a loader or a game’s BASIC part does, or to watch a program arrive while it loads from tape.

Applies to: ZX Spectrum models, ZX80, ZX81, HT-1080Z, Videoton TVC, Enterprise 64 and 128.

Open it with View › Machine Views › BASIC Listing. The menu item is a switch: choose it again to close the view.

The view’s toolbar has these controls:

  • Refresh now reads the listing again.
  • Copy to clipboard copies the listing as text.
  • Auto Refresh: (on by default) reads the listing periodically, even while a program is loading.
  • Show Non-Printable: (off by default) shows non-printable characters as their two-digit hexadecimal code with a $ prefix on a shaded background.
  • Use ZX Spectrum font: shows the listing in the ZX Spectrum’s own font instead of Klive’s monospace font.

When there is nothing to list, the view says why:

  • Machine OS has not been initialized yet: the machine is still booting.
  • BASIC program area is empty: there is no BASIC program.
  • *** BASIC code corrupted or partially loaded ***: unexpected data was found in the program area, or the program is still loading. The message appears where the listing breaks off.

ZX81 and ZX80

The view lists ZX81 and ZX80 programs too, each in its own format, and spaces the keywords the way the machine’s own LIST does. A ZX80 with the 8K ROM upgrade is listed as a ZX81. On these machines the font switch is labelled Use Sinclair font.

The ROMs list a line up to its NEW LINE character, so a NEW LINE stored inside a REM (machine-code loaders often have one) starts a new row, often with an odd line number such as E393. The view shows it the same way the machine’s LIST does. A character LIST cannot print appears as ?, or as its code when Show non-printable is on.

HT-1080Z

On the HT-1080Z the view lists the Level II BASIC program the way the machine’s own LIST does: keywords as stored, with no spaces added, ELSE and ' without the colon BASIC keeps before them. It uses the model’s own characters, so Series II’s accented letters show as such, and on the /64 a backtick and a key show as the Hungarian or mathematical character they stand for. The font switch is not offered: the Sinclair fonts have no such characters. See Using the HT-1080Z.

Enterprise 64 and 128

On the Enterprise the view lists the IS-BASIC program with IS-BASIC’s own indentation, in EXOS’s characters. IS-BASIC can hold several programs, numbered from 0, but only program 0 is in the memory the CPU sees between IS-BASIC’s commands, so the view lists program 0, the one IS-BASIC starts in. See The Enterprise 64 and 128.

Last updated on