Load
Purpose:
Loads a file into memory.
Syntax:
L[address [drive: record record))
Comments:
Set BX:CX
to
the
number
of
bytes read.
The
file
must
have
been
named
either
when
you
started
debug
or
with
the
N
(name)
command. Both
the
debug
invocation and
the
N
command
format
a filename properly in
the
normal format
of
a File Control Block
at
CS:5C.
If
you
use
the
L
(load)
command
without
any parameters,
debug
loads
the
file into memory beginning at address CS:IOO and sets
BX:CX
to
the
number
of
bytes loaded.
If
you type
the
L
command
with
an address parameter, loading begins at
the
memory
location
specified by
the
address.
If
you
use
the
L
command
with
all
parameters
included, absolute disk sectors
are
loaded, instead
of
a file.
Each
record is taken from
the
specified drive:
(the
drive desig-
nation is
numeric
here: 0 =
A:,
1 =
B:,
2 =
C:,
etc.).
Debug
begins
loading
with
the
first specified record, and
continues
until
the
number
of
sectors in
the
second
record have
been
loaded.
Example:
Suppose
once
you have
started
debug
that you type
the
following
commands:
-NFILE.COM
Now,
to
loadfile.com, you
would
simply type
the
L command.
Debug
would
then load
the
file and display
the
debug
prompt.
Suppose
now
that you
want
to
load only
portions
of
a file
or
cer-
tain
records
from a disk.
To
do
thiS, you
would
type
the
following:
L048A:100
2
OF
6D
Debug
would
then
load 109
(6D
hex)
records, beginning
with
logical
record
number
15,
into
memory
beginning at address
04BA:OIOO. Then,
once
it
had
loaded
the
records,
debug
would
simply
return
the
hyphen (-) prompt.
Debug
2251
(L)oad
Using the Load
command