Chapter 13 - Slow & fast

The ZX81 can run at two speeds - SLOW and FAST. When first switched on, the computer runs in the SLOW mode and can compute and display information on the screen simultaneously. This mode is ideal for animation displays.

    However, it can go about four times as fast, & it does this by forgetting about the picture except when it has nothing else to do. To see this working, type


    Now whenever you press a key, the screen will blink - this is because the computer stops displaying a picture while it works out what key you pressed.

    Type in a program, say

        10 FOR N=0 TO 255

        20 PRINT CHR$ N;

        30 NEXT N

    When you run this, the whole screen will go an indeterminate grey until the end of the program, when the output from the PRINT statement will come up on the screen.

    The picture is also displayed an INPUT statement, while the computer is waiting for you to type the INPUT data. Try this program:

        10 INPUT A

        20 PRINT A

        30 GOTO 10

    To get back into the normal (compute & display) mode, type


    It will often be just a matter of taste whether you want compute & display mode for neatness, or fast mode for speed, but in general you will use the fast mode when

    (i) your program contains a lot of numerical calculation, especially if it doesn't print much but in compute and display mode time doesn't seem to linger quite as much is you can see output coming up on the screen fairly frequently, or

    (ii) you are typing in a long program. You will already have noticed how the listing gets remade every time you enter a new program line, & this can get annoying.

    You can use SLOW & FAST statements in programs without any problems.

    For example,

        10 SLOW

        20 FOR N=1 TO 64

        30 PRINT "A";

        40 IF N=32 THEN FAST

        50 NEXT N

        60 GOTO 10


    Statements: FAST, SLOW

Previous: Chapter 12    Next: Chapter 14