Appendix
E/
Converting TRSDOS Version
1 BASIC Programs to TRSDOS Version 6
BASIC Programs
You
can
run
a TRSDOS Version 1 applications program
on
TRSDOS
Version
6.
However, you may need to make a few changes to the
program. The differences between the two BASICs are listed below.
(From here
on,
we will refer to TRSDOS Version 6
as
TRSDOS
6,
and to TRSDOS Version 1
as
TRSDOS
1).
1. ROM
Subroutines.
TRSDOS 1 BASIC
is
a ROM and RAM-based
language. TRSDOS 6 BASIC
is
strictly a RAM language;
therefore,
it
cannot access any of TRSDOS 1's ROM subroutines.
2.
Disk
Files.
TRSDOS 6 BASIC does not provide cassette support.
It
is exclusively a "disk system", that
is,
you can only use it with
floppy diskettes or with a hard disk system.
If
you have learned
BASIC through "Getting Started with
TRS-80 BASIC", or have
never worked with a disk system before, read about "Disk Files"
in
Chapter
5.
This chapter explains how you can store and access
data on disk.
You
also need to read Chapter
1,
"Sample
Session", which describes how to load disk BASIC and how to
save a program
on
disk.
3.
Characters
per
Line. Both TRSDOS 1 and TRSDOS 6 BASIC
allow you to type
up
to 255 characters per line. However, there is
a slight difference. With TRSDOS
6,
you can type up to 249
characters per line. The other six characters are reserved for the
line number and the space following the line number. With
TRSDOS
1,
you can type up to 240 characters
in
the command
mode, and add the extra 15 characters
in
the edit mode.
4.
Variable
Names.
TRSDOS 1 BASIC only recognizes the first two
letters of a variable name; TRSDOS 6 BASIC allows variable
names of
up
to 40 characters,
all
of which are significant.
5.
Converting
to
Integers.
In
converting a single or
double-precision number to integer value, TRSDOS 1 BASIC
truncates the number; TRSDOS 6 BASIC rounds the number.
This difference
in
conversions also affects assignment statements
and function
or statement evaluations. For example, if you typed
1%
= 2.5, TRSDOS 1 BASIC would convert 2.5 to
2;
TRSDOS 6
BASIC would convert
it
to 3. If you typed TAB(4.5), TRSDOS 1
would move to the fourth tab position; TRSDOS 6 would move to
the fifth tab position.
If
you enter a number
as
a constant
in
response to a command
that calls for
an
integer, and the number
is
out of integer range,
BASIC converts
it
to single or double precision. When the number
is printed, it appears with a type-declaration tag at the end.
6.
Print
Zones.
TRSDOS 1 BASIC includes 16 spaces between print
zones; TRSDOS 6 BASIC includes
20 spaces. This
is
because
TRSDOS 1's screen displays up to 64 characters horizontally,
A-75