|
Back |
|
Last edited: 2007-09-23 kio |
Sinclair ZX Spectrum Technical Data
Sinclair Research pamphlet, 1982
Based on html version by Chris Owen.
Dimensions
- Width 233 mm
- Depth 144 mm
- Height 30 mm
CPU / memory
- Z80A microprocessor running at 3.5 MHz. 16K-byte ROM containing BASIC interpreter and operating system.
- 16K-byte RAM (plus optional 32K-byte RAM on internal expansion board) or 48K-byte RAM.
Keyboard
- 40-moving-key keyboard with full upper and lower case with capitals lock feature. All BASIC words obtained by single keys,plus 16 graphics characters, 22 colour control codes, and 21 userdefinable graphics characters. All keys have auto repeat.
Display
- Memory-mapped display of 256 pixels x 192 pixels; plus one attributes byte per character square, defining one of eight foreground colours, one of eight background colours, normal or extra brightness and flashing or steady. Screen border colour also settable to one of eight colours. Will drive a PAL UHF colour TV set, or black and white set (which will give a scale of grey), on channel 36.
Sound
- Internal loudspeaker can be operated over more than 10 octaves (actually 130 semitones) via basic BEEP command. Jack sockets at the rear of computer allow connections to external amplifier / speaker.
Graphics
- Point, line, circle and arc drawing commands in high-resolution graphics. 16 pre-defined graphics characters plus 21 user-definable graphics characters. Also functions to yield character at a given position, attribute at a given position (colours, brightness and flash) and whether a given pixel is set. Text may be written on the screen on 24 lines of 32 characters. Text and graphics may be freely mixed.
Colours
- Foreground and background colours, brightness and flashing are set by BASlC INK, PAPER, BRIGHT and FLASH commands. OVER may also be set,which performs an exclusive-or operation to overwrite any printing or plotting that is already on the screen. INVERSE will give inverse video printing. These six commands may be set globally to cover all further PRlNT, PLOT, DRAW or CIRCLE commands,or locally within these commands to cover only the results of that command. They may also be set locally to cover text printed by an INPUT statement.
- Colour-control codes, which may be accessed from the keyboard, may be inserted into text or program listing, and when displayed will override the globally set colours until another control code is encountered. Brightness and flashing codes may be inserted into programs or text, similarly. Colour-control codes in a program listing have no effect on its execution.
- Border colour is set by a BORDER command. The eight colours available are black, blue, red, magenta, green, cyan, yellow and white. All eight colours may be present on the screen at once, with some areas flashing and others steady, and any area may be highlighted extra bright.
Screen
- The screen is divided into two sections. The top section - normally the first 22 lines - displays the program listing or the results of program or command execution.
- The bottom section - normally the last 2 lines - shows the command or program line currently being entered, orthe program line currently being edited. It also shows the report messages. Full editing facilities of cursor left, cursor right, insert and delete (with auto-repeat facility) are available over this line. The bottom section will expand to accept a current line of up to 22 lines.
Mathematical operations and functions
- Arithmetic operations of +, -, X, +, and raise to a power. Mathematical functions of sine, cosine, tangent and their inverses; natural logs and exponentials, sign function, absolute value function, and integer function; square root function, random number generator, and pi.
- Numbers are stored as five bytes of floating point binary - giving a range of +3 X 10^-39 to +7 X 10^38 accurate to 9½ decimal digits.
- Binary numbers may be entered directly with the BIN function.=, >, <, >=,<= and <> may be used to compare string or arithmetic values or variables to yield 0 (false) or 1 (true) . Logical operators AND, OR and NOT yield boolean results but will accept 0 (false) and any number(true).
- User-definable functions are defined using DEF FN, and called using FN . They may take up to 26 numeric and 26 string arguments, and may yield string or numeric results.
- There is a full DATA mechanism, using the commands READ, DATA and RESTORE.
- A real-time clock is obtainable.
String operations and functions
- Strings can be concatenated with +. String variables or values may be compared with =, >, <, >=, <=, <> to give boolean results. String functions are VAL, VAL$, STR$ and LEN . CHR$ and CODE convert numbers to characters and vice versa, using the ASCII code.
- A very powerful string slicing mechanism exists, using the form a$ (x TO y).
Variable names
- Numeric - any string starting with a letter (upper and lower case are not distinguished between, and spaces are ignored).
- String - A$ to Z$.
- FOR-NEXT loops - A-Z.
- Numeric arrays - A-Z.
- String arrays -A$ to Z$.
- Simple variables and arrays with the same name are allowed and distinguished between.
Arrays
- Arrays may be multi-dimensional, with subscripts starting at 1.
- String arrays, technically character arrays, may have their last subscript omitted, yielding a string.
Expression evaluator
- A full expression evaluator is called during program execution whenever an expression, constant or variable is encountered. This allows the use of expressions as arguments to GOTO, GOSUB, etc.
- It also operates on commands allowing the ZX Spectrum to operate as a calculator.
Cassette interface
- The ZX Spectrum incorporates an advanced cassette interface. A tone leader is recorded before the information to overcome the automatic recording level fluctuations of some tape recorders, and a Schmitt trigger is used to remove noise on playback.
- All saved information is started with a header containing information as to its type, title, length and address information. Program, screens, blocks of memory, string and character arrays may all be saved separately.
- Programs, blocks of memory and arrays may be verified after saving to confirm successful saving.
- Programs and arrays may be merged from tape to combine them with the existing contents of memory. Where two line numbers or variable names coincide, the old one is overwritten.
- Programs may be saved with a line number, where execution will start immediately on loading.
- The cassette interface runs at 1500 baud, through two 3.5 mm jack plugs.
Expansion port
- This has the full data, address and control busses from the Z80A, and is used to interface to the ZX Printer, the RS232 and NET interfaces and the ZX Microdrives.
- IN and OUT commands give th e l/O port equivalents of PEEK and POKE.
ZX81 compatibility
- ZX81 BASIC is essentially a subset of ZX Spectrum BASIC. The differences are as follows.
- FAST and SLOW: the ZX Spectrum operates at the speed of the ZX81 in FAST mode with the steady display of SLOW mode, and does not include these commands.
- SCROLL: the ZX Spectrum scrolls automatically, asking the operator "scroll?" every time a screen is filled.
- UNPLOT: the ZX Spectrum can unplot a pixel using PLOT OVER, and thus achieves unplot.
- Character set: the ZX Spectrum uses the ASCII character set, as opposed to the ZX81 non-standard set.
- ZX81 programs may be typed into the ZX Spectrum with very little change, but may of course now be considerably improved. The ZX Spectrum is fully compatible with the ZX Printer,which can now print out a full upper and lower case character set, and the high resolution graphics; using LLIST, LPRINT and COPY. ZX81 software cassettes and the ZX 16K RAM pack will not operate with the ZX Spectrum.