How to Read the Instruction Set Chart

The following chart summarizes the machine instructions you can
program with A86.  In order to use the chart, you need to learn
the meanings of the specifiers (each given by 2 lower case
letters) that follow most of the instruction mnemonics.  Each
specifier indicates the type of operand (register byte, immediate
word, etc.) that follows the mnemonic to produce the given
opcodes.


"c"  means the operand is a code label, pointing to a part of the
    program to be jumped to or called.  A86 will also accept a
    constant offset in this place (or a constant segment-offset
    pair in the case of "cd").  "cb" is a label within about 128
    bytes (in either direction) of the current location.  "cw" is
    a label within the same code segment as this program; "cd" is
    a pair of constants separated by a colon-- the segment value
    to the left of the colon, and the offset to the right.  Note
    that in both the cb and cw cases, the object code generated
    is the offset from the location following the current
    instruction, not the absolute location of the label operand.
    In some assemblers (most notably for the Z-80 processor) you
    have to code this offset explicitly by putting "$-" before
    every relative jump operand in your source code.  You do NOT
    need to, and should not do so with A86.

"e"  means the operand is an Effective Address.  The concept of
    an Effective Address is central to the 86 machine
    architecture, and thus to 86 assembly language programming.
    It is described in detail at the start of this chapter.  We
    summarize here by saying that an Effective Address is either
    a general purpose register, a memory variable, or an indexed
    memory quantity.  For example, the instruction "ADD rb,eb"
    includes the instructions: ADD AL,BL, and ADD CH,BYTEVAR, and
    ADD DL,B[BX+17].

"i"  means the operand is an immediate constant, provided as part
    of the instruction itself.  "ib" is a byte-sized constant;
    "iw" is a constant occupying a full 16-bit word.  The operand
    can also be a label, defined with a colon.  In that case, the
    immediate constant which is the location of the label is
    used.  Examples:  "MOV rw,iw" includes the instructions: MOV
    AX,17, or MOV SI,VAR_ARRAY, where "VAR_ARRAY:" appears
    somewhere in the program, defined with a colon.  NOTE that if
    VAR_ARRAY were defined without a colon, e.g., "VAR_ARRAY DW
    1,2,3", then "MOV SI,VAR_ARRAY" would be a "MOV rw,ew" NOT a
    "MOV rw,iw".  The MOV would move the contents of memory at
    VAR_ARRAY (in this case 1) into SI, instead of the location
    of the memory. To load the location, you can code "MOV
    SI,OFFSET VAR_ARRAY".

"m"  means a memory variable or an indexed memory quantity; i.e.,
    any Effective Address EXCEPT a register.

"r"  means the operand is a general purpose register.  The 8 "rb"
    registers are AL,BL,CL,DL,AH,BH,CH,DH; the 8 "rw" registers
    are AX,BX,CX,DX,SI,DI,BP,SP.

WARNING: Instruction forms marked with "*" by the mnemonic are
part of the extended 186/286/NEC instruction set. Instructions
marked with "#" are unique to the NEC processors.  These
instructions will NOT work on the 8088 of the IBM-PC; nor will
they work on the 8086; nor will the NEC instructions work on the
186 or 286. If you wish your programs to run on all PC's, do not
use these instructions!
