Chapter
21
Loading
MS-DOS
and
BASIC
Examples
BASIC
DEBITS
initializes BASIC to
3
data files with all memory available.
BASIC then loads and runs the program DEBITS.
BASIC PAYROLL
/F:5
initializes BASIC to
5
data files with all memory available.
BASIC then loads and runs the program PAYROLL.
BASIC
/M:21000
initializes BASIC to
3
data files and sets the highest memory lo-
cation to be used by BASIC at
21000,
the first
21000
bytes of
BASIC’s data segment.
BASIC BUDGET /D
initializes BASIC to
3
data files with all memory available.
BASIC loads and uses the Double Precision Transcendental math
package.
Redirection
of
Input and Output
BASIC lets you redirect input and output. The syntax to redirec-
tion is:
BASIC
[pathname] [<input-file] [>[>loutput-file1
You can redirect standard input, normally from the keyboard, to
the file
input-file.
Standard output, normally
to
the video display, can be redi-
rected to the file
output-file.
If
output-file
already exists, it is ov-
erwritten. You can, however, append the
output-file
to
the
existing file by using the append notation:
>>output-file.
If
out-
put-file
does not exist, it is created.
The following BASIC statements use standard input:
INPUT
INPUT$
LINE INPUT
INKEY$
The BASIC statements PRINT and WRITE access standard
output.
Error messages are sent both to the standard output and
to
the
redirected output.
23