Chapter 9.
About R & B K & B
C & S T E M E
The authors of the operating system and BASIC interpreter in
the ZX-SPECTRUM completed excellent job, but could not be saved
from a few mistakes.
9. 1 Error fission
Under the address # 3200 placed the value of # E1
instead of # DA. As a result, sometimes lost
the last bit, which leads to erroneous
rounding. The consequences of errors demonstrates the program:
10 LET A = A / B
20 IF A THEN GO TO 10
30 PRINT "received zero"
Starting it with the values of A = 1 and B = 3,
obtain a second printing: "received
zero. "launching it anew, with values
A = 1 and B = 2, loops, since SPECTRUM
believes that 2 -128 = 2 -128 / 2.
9. 2 Error '-65536'
The authors have made an inaccuracy in the representation of
that number. Once it is stored in representation of floating
point to another - as an integer code to add 2. The
consequences of ambiguity there For example, under the
directive: PRINT -65536. This will display the number of
-1.
9. 3 mistakes CHR # 8
This control character must move the cursor left or
the end of the previous line. It is well
occurs in lines 1 ... 123, but from the beginning
the first row at the end of the 0th row move
impossible. By a curious effect is
a request to move the cursor to the left of the field
(0. 0).
9. 4 Error CHR # 9
This character must move the cursor
right by one position. Here, however, admitted a serious
mistake: all necessary calculations are carried out, however,
the authors have forgotten modify the system variables.
9. 5 Error "PRESS ANY KEY ..."
In some situations, SPECTRUM interrupts and waits for a push
by pressing any keys by the user. Error leads to the fact that
the computer does not respond to key And , although
both immediately reacts.
9. 6 Error index ticker
Assume that the last line in the program has the number
1000. When you press 1001 and <ENTER>, And then , in the
lower part of screen is scanned line 1000, but
together with an index ticker, who before writing a line must
be removed.
9. 7 Error DELETE
When you delete the contents of the bottom
screen using , in the lower part of
the screen is scanned current line of the program and can not
return to the control the size of this area. Required again to
press <ENTER>.
9. 8 Error leading spaces
Some key words during the display are not always separated
by spaces from earlier: try, for example,
perform
PRINT CHR # 255; CHR # 13; CHR # 255.
9. 9 Error mode K
After pressing the mode K and its
Hold this position, the key begins to multiply. The cursor
changes to a L or C, but still being printed in the character
mode K.
9. 10 Error SCRFEEN #
In cell # 2 570 should be located # C9
instead of # C3. As a result, the program instead of
the expected number 12 will display 22:
10 PRINT "1234567890"
1920 LET A # = SCRFEEN # (0. 0) + SCREEN # (0.
1)
30 PRINT A #
Even more amazing printing obtain
If at the end of line 20's update + SCREEN # (0.
2) + SCREEN # (0. 4). Variable takes the value "55". This
mistake is easily avoided by adding to the value of A # SCREEN
# (0. 1) at a time, rather than a single expression.
9. STR # 1911 Error
Working with numbers -1