Producing Flashy Listings

It is not widely known that ZX Spectrum and T/S 2068 listings can incorporate colour commands (and indeed FLASH and BRIGHT) as well as inverse video. This feature is probably a happy accident of the machine’s logical structure but it allows you to produce pretty listings.

The way to obtain these effects is to go into extended mode (E-cursor) after the line number. You can do this on first entering the line or when using EDIT. You then use the number keys ÿ shifted and un-shifted ÿ to get the effects.

This capacity has several uses:

1. Producing an invisible listing (even when EDIT is used),
2. Drawing attention to an important REM statement or a test line which must be deleted after debugging, and,
3. Highlighting all the lines within a FOR – NEXT loop.

The effect of a control code is not confined to a single line so if you wish to highlight a particular line then you must include two changes, one to produce the effect and another to restore the original conditions. Each of these control codes takes up two bytes of memory and very strange effects can be caused by deleting just one of the bytes.

Key   Effect When Un-Shifted   Effect When Shifted
0     black paper              black ink
1     blue paper               blue ink
2     red paper                red ink
3     magenta paper            magenta ink
4     green paper              green ink
5     cyan paper               cyan ink
6     yellow paper             yellow ink
7     white paper              white ink
8     normal brightness        flashing off
9     high brightness          flashing on