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 #112 background imageLoading...
Page #112 background image
Chapter
10
I
BASIC Keywords
Sample Program
2
Enter NEW and this program:
10 REM THIS PROGRAM DEMONSTRATES CHAINING USING
20 A$="MAINPROG.BAS"
30 CHAIN MERGE
"overlayl",
1000,
ALL
40 END
THE MERGE AND
ALL
OPTIONS.
Save this program as
mainprog.bas,
using the A option. Enter
NEW, and then type:
1000 PRINT
A$;"
HAS CHAINED TO OVERLAY1
.BAS."
1010
A$
=
"overlayl
.bas"
1020
B$
=
"overlay2.ba5"
1030 CHAIN MERGE
"overlay2.ba5",
1000,
ALL,
1040 END
DELETE 1020
-
1040
Save this program
as
overlayl.bas,
using the A option. Enter
NEW, and then these lines:
1000 PRINT
A$;
"
HAS CHAINED
TO
";E$;"."
1010 END
Save this program
as
overlay2.bas,
using the A option. Load
mainprog.bas
and run it. Your screen should display:
MAINPROG.BAS HAS CHAINED TO OVERLAY1.BAS.
OVERLAY1.BAS HAS CHAINED TO OVERLAY2.BAS.
Hints:
The CHAIN statement with the MERGE option leaves the
files open and preserves the current OPTION BASE setting.
0
The CHAIN statement without the MERGE option does not
preserve variable types or user-defined functions for use by the
chained program. That is, any DEFINT, DEFSNG, DEFDBL,
DEFSTR, or DEF FN statements containing shared variables
must be restated in the chained program.
0
When using the MERGE option, place user-defined functions
before any CHAIN MERGE statements in the program. Oth-
erwise, the user-defined functions will be undefined after the
merge
is
complete.
0
CHAIN automatically executes a RESTORE before running
the chained program. The next READ statement starts at the
first item of the first DATA statement.
110

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