Appendix A – Character Set, Z80N Mnemonics and Control Codes

This is the complete ZX Spectrum Next / NextZXOS character set, with codes in decimal and hexadecimal, the character each code represents, as well as the control codes (shaded) together with their corresponding NextBASIC tokens, if any. Tokens that are shaded are specific to the ZX Spectrum Next and cannot be found in earlier ZX Spectrum models. As the codes are also Z80N machine code instructions, the right hand columns give the corresponding assembly language mnemonics. As you are probably aware if you understand these things, certain Z80N instructions are compounds starting with CBh or EDh; the two rightmost columns give you these. Note that ED instructions that are shaded, cannot be found in regular Z80 CPUs and are only native to Z80N, the variant of the Z80 CPU, found on the ZX Spectrum Next. Control codes are marked with UW if they refer to User Windows and SW if they refer to System Windows.

DecCharacter / Control Code / TokenHexZ80N Assembler- after CB- after ED
0colour: pale yellow Justify off (UW) Increase font (SW)00noprlc b
1colour: pale yellow Justify on (UW) Decrease font (SW)01ld bc,NNrlc c
2colour: pale yellow Save Window (UW) Change font (SW)02ld (bc),arlc d
3colour: pale yellow Restore Window (UW)
Regenerate Small Fonts (SW)
03inc bcrlc e
4colour: pale yellow Cursor to top left (UW)(SW)04inc brlc h
5colour: pale yellow Cursor to bottom left (UW)(SW)05dec brlc l
6colour: pale yellow PRINT comma06ld b,Nrlc (hl)
7colour: pale yellow EDIT, Scroll (SW)(UW)07rlcarlc a
8colour: pale yellow ⇦08ex af,af'rrc b
9colour: pale yellow ⇨09add hl,bcrrc c
10colour: pale yellow ⇩0Ald a,(bc)rrc d
11colour: pale yellow ⇧0Bdec bcrrc e
12colour: pale yellow DELETE / Backspace0Cinc crrc h
13colour: pale yellow ENTER / Carriage Return
PRINT apostrophe
0Ddec crrc l
14colour: pale yellow Clear Window (UW)(SW)0Eld c,Nrrc (hl)
15colour: pale yellow Wash Window (UW)(SW)0Frrcarrc a
16colour: pale yellow INK10djnz DISrl b
17colour: pale yellow PAPER11ld de,NNrl c
18colour: pale yellow FLASH12ld (de),arl d
19colour: pale yellow BRIGHT13inc derl e
20colour: pale yellow INVERSE14inc drl h
21colour: pale yellow OVER15dec drl l
22colour: pale yellow AT16ld d,Nrl (hl)
23colour: pale yellow TAB17rlarl a
24colour: pale yellow ATTR (UW)(SW)18jr DISrr b
25colour: pale yellow POINT (UW)(SW)19add hl,derr c
26colour: pale yellow AUTO PAUSE (UW)(SW)1Ald a,(de)rr d
27colour: pale yellow Fill window with character(UW)(SW)1Bdec derr e
28colour: pale yellow Set Double Width (UW)(SW)1Cinc err h
29colour: pale yellow Set Font Height (UW)1Ddec err l
30colour: pale yellow Justification mode (UW)
Set Font Width (SW)
1Eld e,Nrr (hl)
31colour: pale yellow Permit embed. codes in justif. mode
(UW)
Redefine Character Set (SW)
1Frrarr a
32Space20jr nz, DISsla b
33!21ld hl,NNsla c

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.