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 #153 background imageLoading...
Page #153 background image
Chapter
10
I
BASIC Keywords
E
OF/Communications
Function
EOF(
buffer)
Detects an empty input queue
for
communications files.
Buffer
is the number assigned
to
the file when you opened it. It
must access an open file.
The value EOF returns depends on the mode (ASCII
or
binary)
in which the file was opened. In ASCII mode, EOF returns a
-1
(true) if a CONTROL-Z is received. EOF remains true until the
device is closed. In binary mode, EOF returns a
-1
(true) when
the input queue is empty. EOF becomes false when the input
queue is not empty.
Sample
Program
These lines are useful in a program when you want
to
run the
program while waiting for communications activity.
10 OPEN "COM1:300,N,8,1"
AS
1
20 COM(1) ON
30 ON COM(1
1
GOSUB
1000
1000 "Communication Subroutine
Begin5
Here
io50
IF
EOF(1) THEN RETURN
Line 10 opens
a
file
for
Communications Channel
1
and allocates
Buffer
1.
Line 30 causes BASIC to perform the subroutine begin-
ning at Line 1000
as
soon as there is activity on the communi-
cations channel. When all the communications data has been
processed, Line 1050 returns to the main program.
151

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