EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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 #229 background imageLoading...
Page #229 background image
Chapter
10
I
BASIC Keywords
Example
10 COM(1)
ON
200 ON COM(1
1
GOSUB 1000
Line 10 turns on communication trapping on Channel 1. After
each program statement is executed, BASIC checks
to
see if the
communication buffer contains characters. If it does, BASIC im-
mediately executes the subroutine beginning at Line 1000.
10 COM(1)
ON
20 ON COMC1) GOSUB 1000
30 FOR
I
=
1
TO
10
40 PRINT
I
50 NEXT
I
1000
SUBROUTINE CODE
1050 RETURN 200
If activity occurs on Communication Channel
1
while the FOR/
NEXT loop
is
executing, BASIC immediately executes the sub-
routine beginning
at
Line 1000. But the subroutine returns
to
Line 200 instead
of
completing the FORiNEXT loop. This results
in a “For without next” error because any GOSUB, FOR,
or
WHILE statement remains active during key trapping.
If
the RETURN statement does not include a line number, pro-
gram control returns to complete the FOR/NEXT loop, and no
error occurs.
227

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals