CHARS system variable (See Chapter 24 – System Variables) will point NextBASIC to the location of this new character set.

Character Graphics Mode

In the following chapter, we will be introduced to Layer 3 – the Character Graphics mode; this is a hybrid graphics mode based around the notion of a character tile, that is to say an 8 × 8 pixel matrix very much like the ones we explored above with User Defined Graphics with four very crucial differences:

  • Each character tile can have up to sixteen colours and not only two.
  • All ASCII characters can be defined by tiles giving the user in effect a truly multi-lingual character display.
  • Layer 3 displays can be either 80 columns by 32 rows or 40 columns by 32 rows and not only 32 columns by 24 rows as the regular Spectrum display is.
  • Layer 3 cannot be accessed from NextBASIC (at the time of writing) in the same, straightforward way, other modes/layers are. You will need to write functions and procedures that utilise the PEEK, POKE, IN, OUT and REG facilities as well as the BANK commands at your disposal in order to make use of this powerful mode.

Layer 3 has other uses as well and we will be discussing those in the following 3 chapters.

Exercises

  1. Imagine the space for one symbol divided up into four quarters like a Battenburg cake. Then if each quarter can be either black or white, there are 2 x 2 x 2 x 2=16 possibilities. Find them all in the character set.

  2. Run this program:

    10 INPUT a
    20 PRINT CHR$ a;
    30 GO TO 10
    

    If you experiment with it, you'll find that CHR$ a is rounded to the nearest whole number; and if a is not in the range 0 to 255 then the program stops with error report:

    B integer out of range.

  3. Which of these two is the lesser?

    "EVIL"
    "evil"


ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.