EasyManuals Logo

Sinclair ZX81 User Manual

Sinclair ZX81
92 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #78 background imageLoading...
Page #78 background image
Exercises
1. Try this program
10
FOR
N=0
TO
21
20
PRINT PEEK
(
PEEK
16400+256*
PEEK
16401+N)
30
NEXT
N
This tells you the first 22 bytes of the variables area: try to match up the control variable N with the
description in chapter 27.
2. In the program above, change line 20 to
20
PRINT PEEK
(16509+N)
This tells you the fist 22 bytes of the program area. Match these up with the program itself.
SN2 16415 MEM Address of area used for calculator's memory. (Usually MEMBOT, but
not always.)
S1 16417 not used
SX1 16418 DF_SZ
The number of lines (including one blank line) in the lower part of the
screen.
S2 16419 S_TOP The number of the top program line in automatic listings.
SN2 16421 LAST_K Shows which keys pressed.
SN1 16423 Debounce status of keyboard.
SN1 16424 MARGIN Number of blank lines above or below picture: 55 in Britain, 31 in
America.
SX2 16425 NXTLIN Address of next program line to be executed.
S2 16427 OLDPPC Line number of which
CONT
jumps.
SN1 16429 FLAGX Various flags.
SN2 16430 STRLEN Length of string type destination in assignment.
SN2 16432 T_ADDR Address of next item in syntax table (very unlikely to be useful).
S2 16434 SEED The seed for
RND
. This is the variable that is set by
RAND
.
S2 16436 FRAMES Counts the frames displayed on the telivision. Bit 15 is 1. Bits 0 to 14
are decremented for each frame set to the television. This can be used
for timing, but
PAUSE
also uses it.
PAUSE
resets to 0 bit 15, & puts in
bits 0 to 14 the length of the pause. When these have been counted
down to zero, the pause stops. If the pause stops because of a key
depression, bit 15 is set to 1 again.
S1 16438 COORDS x-coordinate of last point
PLOT
ted.
S1 16439 y-coordinate of last point
PLOT
ted.
S1 16440 PR_CC Less significant byte of address of next position for
LPRINT
to print as
(in PRBUFF).
SX1 16441 S_POSN Column number for
PRINT
position.
SX1 16442 Line number for
PRINT
position.
S1 16443 CDFLAG Various flags. Bit 7 is on (1) during compute & display mode.
S33 16444 PRBUFF Printer buffer (33rd character is
NEWLINE
).
SN30 16477 MEMBOT Calculator's memory area; used to store numbers that cannot
conveniently be put on the calculator stack.
S2 16507 not used

Other manuals for Sinclair ZX81

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair ZX81 and is the answer not in the manual?

Sinclair ZX81 Specifications

General IconGeneral
ProcessorZilog Z80A
Processor Speed3.25 MHz
ROM8 KB
InputMembrane keyboard
StorageCassette tape
Power Supply9V DC
Dimensions167 mm x 40 mm x 175 mm
Release Year1981
ManufacturerSinclair Research
Weight350 g
Operating SystemSinclair BASIC
RAM1 KB
PortsTV out, expansion port
DisplayTelevision (RF modulator output)

Related product manuals