Chapter
10
I
BASIC
Keywords
BLOAD
Statement
BLOAD
pathname[,offsetl
Loads
a
memory image file into memory. See BSAVE
A memory image file is a byte-for-byte copy of what was origi-
nally in memory. See BSAVE for information about saving mem-
ory image files.
Pathname
is
a
standard file specification as defined in Chapter
1.
Offset
is an integer in the range
0
to
65535.
Offset
is the num-
ber of bytes into the current segment where BASIC loads the im-
age.
If
you omit
offset,
BASIC uses the offset specified when the
file was saved with BSAVE.
If you specify
offset,
BASIC assumes you want to BLOAD at an
address other than the one given when the program was saved
and uses the current segment address as set by the last DEF
SEG statement. Unless you want to load the file into BASIC’s
data segment, you must execute the DEF SEG statement before
the BLOAD statement.
If you used the
/M:
switch when you loaded BASIC, specify that
address as the offset.
If you specify an offset without using
a
DEF SEG statement or
the
/M:
switch, BASIC loads the file at that offset from BASIC’s
data segment, destroying BASIC’s workspace.
Note:
BLOAD does not perform an address range
check.
It
is possible to load
a
file anywhere in mem-
ory. Therefore, you must be careful not to load over
BASIC or over the operating system.
See the section “Interfacing With Assembly-Language Subrou-
tines” in Chapter
11
for more information on loading assembly-
language programs.
102