"IBM personal computer assembly language tutorial" - читать интересную книгу автора (Auerbach J.)

because 9 is a constant. The assembler will generate the NEAR form of RET
because that is the default and you have not told it otherwise.

The DB (define byte) pseudo-op is an easy one: it is used to put one or
more bytes of data into storage. There is also a DW (define word)
pseudo-op and a DD (define doubleword) pseudo-op; in the PC MACRO assem-
bler, the fact that a label refers to a byte of storage, a word of storage,


IBM PC Assembly Language Tutorial 16


or a doubleword of storage can be very significant in ways which we will
see presently.

About that OFFSET operator, I guess this is the best way to make the point
about how the assembler decides what instruction to assemble: an analogy
with 370 assembler:

PLACE DC ......
...
LA R1,PLACE
L R1,PLACE

In 370 assembler, the first instruction puts the address of label PLACE in
register 1, the second instruction puts the contents of storage at label
PLACE in register 1. Notice that two different opcodes are used. In the
PC assembler, the analogous instructions would be

PLACE DW ......
...
MOV DX,OFFSET PLACE
MOV DX,PLACE

If PLACE is the label of a word of storage, then the second instruction
will be understood as a desire to fetch that data into DX. If X is a
label, then "OFFSET X" means "the ordinary number which represents X's off-
set from the start of the segment." And, if the assembler sees an ordinary
number, as opposed to a label, it uses the instruction which is equivalent
to LA.

If PLACE were the label of a DB pseudo-op, instead of a DW, then

MOV DX,PLACE

would be illegal. The assembler worries about length attributes of its
operands.

Next, numbers and constants in general. The assembler's default radix is
decimal. You can change this, but I don't recommend it. If you want to