EasyManuals Logo

Atari 65XE User Manual

Atari 65XE
135 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 #66 background imageLoading...
Page #66 background image
Delay Loops
Erase all the PRINT statements so that absolutely nothing is in the
FOR-NEXT sandwich loop, except the FOR and the NEXT statements.
Run the program and see what happens:
15
16
17
18
19
20
21
22
23
LIST
RUN
Nothing happens. Change the number in line 10 and watch carefully
again:
10 FOR JKL=1 TO 500
RUN
The Ready prompt takes a few seconds to appear. Change line 10
again:
10 FOR JKL = 1 TO 5000
RUN
This time the Ready prompt takes considerably longer to appear. The
computer is counting but not printing its calculations. The process is
similar to counting silently to yourself. The time it takes the Ready
prompt to appear on the screen is the time it takes the computer to
count to 5000.
FOR-NEXT loops are excellent devices for keeping the computer from
moving on. In fact, FOR-NEXT loops are used so frequently for this
purpose that they are sometimes called "delay loops," and the
common variable name is DELAY. Rewrite the FOR-NEXT loop, using
DELAY as the variable name and different numbers in the FOR
statement:
NEW
10 FOR DELAY=1 TO 300
20 NEXT DELAY
LIST
RUN
61

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 65XE and is the answer not in the manual?

Atari 65XE Specifications

General IconGeneral
CPUMOS Technology 6502C
CPU Speed1.79 MHz (NTSC) / 1.77 MHz (PAL)
RAM64 KB
ROM16 KB
Release Year1985
GraphicsANTIC and GTIA
Display Resolution320x192
SoundPOKEY sound chip, 4 channels
Operating SystemAtari BASIC
PortsJoystick, Cartridge
StorageExternal 5.25" floppy disk drive

Related product manuals