Chapter 13 / The DEBUG Utility
ASSEMBLE
A [address]
Assembles Macro Assembler statements directly into memory.
Parameters
address is
the
starting
address
for
the
instructions to be assem-
bled
in
memory.
If
you omit
the
address,
the
Assemble command begins
at
the
next address following
the
last
assembled program.
If
no
Assem-
ble
statement
was used previously, assembly
starts
at
CS:0100.
All numeric values
are
hexadecimal and can be entered as 1-4
characters.
Notes
•
If
a
statement
contains a syntax error, DEBUG displays:
tError
and redisplays
the
current
assembly address.
• The segment override mnemonics
are
CS:, DS:, ES:,
and
SS:.
The mnemonic
for
the far
return
is RETF.
String
manipula-
tion mnemonics
must
explicitly
state
the
string
size. For
example, use
MOVSW
to move word
strings
and
MOVSB
to
move
byte strings.
• Prefix mnemonics
must
be specified
in
front of the opcode to
which they refer.
Examples
Near/Far
1 !
L.J
I ,
: l
~
I I
J ,
'-'
: I
G
I
I
c...-J
I !
I '
The assembler automatically assembles short, near, or far jumps
and calls, depending on byte displacement, to the destination
address. These may be overridden
with
the NEAR or
FAR
prefix.
The NEAR prefix can be abbreviated to NE.
0100:
0500
JMP
0100:0502
JMP
0100:0505
JMP
502
NEAR
505
FAR
50A
a
2-byte
short
jump
a
3-byte
near
Jump
a
5-byte
far
Jump
i I
~
I I
'--.J
, i
I I
L..-J
268
i )
~