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



3. You will want to learn the classifications of operations available
WITHOUT getting hung up in the details of how 8086 opcodes are con-
structed.

8086 opcodes are complex. Fortunately, the assembler opcodes used to
assemble them are simple. When you read a book like Morse, you will
learn some things which are worth knowing but NOT worth dwelling on.

a. 8086 and 8088 instructions can be broken up into subfields and bits
with names like R/M, MOD, S and W. These parts of the instruction
modify the basic operation in such ways as whether it is 8 bit or
16 bit, if 16 bit, whether all 16 bits of the data are given,
whether the instruction is register to register, register to
memory, or memory to register, for operands which are registers,
which register, for operands which are memory, what base and index
registers should be used in finding the data.

b. Also, some instructions are actually represented by several differ-
ent machine opcodes depending on whether they deal with immediate
data or not, or on other issues, and there are some expedited forms
which assume that one of the arguments is the most commonly used
operand, like AX in the case of arithmetic.

There is no point in memorizing any of this detail; just distill the
bottom line, which is, what kinds of operand combinations EXIST in the
instruction set and what kinds don't. If you ask the assembler to ADD
two things and the two things are things for which there is a legal ADD
instruction somewhere in the instruction set, the assembler will find
the right instruction and fill in all the modifier fields for you.

I guess if you memorized all the opcode construction rules you might
have a crack at being able to disassemble hex dumps by eye, like you
may have learned to do somewhat with 370 assembler. I submit to you
that this feat, if ever mastered by anyone, would be in the same class
as playing the "Minute Waltz" in a minute; a curiosity only.

Here is the basic matrix you should remember: