Radio Shack TRS-80 Trsdos & Disk Basic Reference Manual page 92

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

DISK BASIC
Error Messages
When
an
error occurs,
DISK BASIC
"spells
out"
the
full
error
message, not
just
the
abbreviation.
This
saves
you
from
having
to
look
it
up.
Example:
error<i4)
mma
DISK BASIC
responds
with:
OUT
OF
STRING SPACE
Note:
The
ERROR
function,
used
to
simulate
error conditions,
will
work
only with non-disk
error codes.
&H
and
&O
(hex
and
octal constants)
Often
it is
convenient
to use
hex
(base 16) or octal (base
8)
constants rather
than
their
decimal
counterparts.
For
example,
memory
addresses
and byte
values
are easier
to
manipulate
in
hex
form.
&H
and
&0
let
you
introduce such constants
into
your
program.
&H
and
&O
are
used
as
prefixes for the
numerals
that
immediately
follow
them:
&Hdddd
where
dddd
&Oddddd
where
ddddd
is
a
1
to
4
digit
sequence
composed
of
hexadecimal numerals
0,
1
,
.
.
.
9,A,B,
.
.
.
,F
is
a
sequence of
octal
numerals
0,
1
,
.
.
.,7.
and
&Oddddd<
=
1
77777
decimal.
Note:
The
O
can be omitted from
the
prefix
&0.
Therefore
&Oddddd=&ddddd.
The
constants
always
represent signed
integers.
Therefore any
hex
number
greater
than
&H7FFF,
or
any
octal
number
greater
than
&077777,
will
be
interpreted
as
a
negative
quantity.
The
following
table
illustrates
this:
Octal
Hex
Decimal
&1
&H1
1
&2
&H2
2
&77777
&H7FFF
32767
&
100000
&H8000
-32768
&1
00001
&H8001
-32767
&100002
&H8002
-32766
&177776
&HFFFE
-2
&177777
&HFFFF
-1
a
7-6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents