VMS Help
MACRO, VAX MACRO Assembler, Operand Formats

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Operands for  instructions  identify  the  memory  locations  or
    the registers  that  are  used  by the machine operation.  These
    operands specify the addressing mode for the instruction.

  1 - Absolute

    The address specified is the address of the operand.  The address
    is stored  as  an absolute virtual address (compare relative mode,
    where the address is stored as a displacement from the PC).
    Absolute  mode can be used with index mode.

    @#address

    address

    An expression specifying an address.

  2 - Autodecrement

    The processor decrements the contents of the register by the size
    of the  operand data type; then the register contains the address
    of the operand.  The processor decrements the register by 1, 2, 4,
    8, or  16 for   byte,   word,   longword,   quadword,   or
    octaword  operands, respectively.  Autodecrement mode can be used
    with index mode.

       -(Rn)
       -(AP)
       -(FP)
       -(SP)

    n

    A number in the range of 0 through 12.

  3 - Autoincrement

    The register contains the address of the operand.   After
    evaluating the   operand  address  contained  in  the  register,
    the  processor increments the contents of the register by 1, 2, 4,
    8, or  16  for  a byte,   word,   longword,   quadword,   or
    octaword   respectively. Autoincrement mode can be used with index
    mode.

       (Rn)+
       (AP)+
       (FP)+
       (SP)+

    n

    A number in the range of 0 through 12.

  4 - Autoincrement deferred

    The register contains an address that is the address of  the
    operand address  (a  pointer  to  the operand).  After evaluating
    the operand address, the processor increments the contents of the
    register  by  4 (the  size  in bytes of an address).  Autoincrement
    deferred mode can be used with index mode.

       @(Rn)+
       @(AP)+
       @(FP)+
       @(SP)+

    n

    A number in the range of 0 through 12

  5 - Branch

    The address is stored as an implied displacement from the  PC.
    This mode  can  be used only in branch instructions.  The
    displacement for conditional branch instructions and the BRB
    instruction is stored  in a byte.  The displacement for the BRW
    instruction is stored in a word (two bytes).  A byte displacement
    allows a range of 127 bytes forward and  128 bytes backward.  A
    word displacement allows a range of 32767 bytes forward and 32768
    bytes backward.  The displacement is relative to  the  updated  PC,
    the  byte  past  the  byte  or  word where the displacement is
    stored.

    address

    address

    An expression that represents an address.

  6 - Displacement

    The contents of the register plus the displacement (sign-extended
    to a  longword)  produce  the address of the operand.  Displacement
    mode can be used with index mode.

       displ(Rn)
       displ(AP)
       displ(FP)
       displ(SP)

    n

    A number in the range of 0 through 12.

    displ

    An expression  specifying  a  displacement;  the  expression  can
    be preceded  by  one  of  the  following displacement length
    specifiers, which indicate the number of bytes needed to store the
    displacement.

          B^    Displacement requires one byte.
          W^    Displacement requires one word (two bytes).
          L^    Displacement requires one longword (four bytes).

    If no displacement length specifier precedes the expression, and
    the value  of the expression is known, the assembler chooses the
    smallest number of bytes (one, two, or four) needed to store the
    displacement. If  no length specifier precedes the expression, and
    the value of the expression is unknown, the assembler reserves one
    word  (two  bytes) for  the  displacement.   Note  that  if  the
    displacement is either relocatable or defined later in the  source
    program,  the  assembler considers it unknown.  If the actual
    displacement does not fit in the memory reserved, the Linker
    displays an error message.

  7 - Displacement deferred

    The contents of the register plus the displacement (sign-extended
    to a  longword) produce the address of the operand address (a
    pointer to the operand).  Displacement deferred mode  can  be  used
    with  index mode.

       @displ(Rn)
       @displ(AP)
       @displ(FP)
       @displ(SP)

    n

    A number in the range of 0 through 12.

    displ

    An expression  specifying  a  displacement;  the  expression  can
    be preceded  by  one  of  the  following displacement length
    specifiers, which indicate the number of bytes needed to store the
    displacement.

       B^    Displacement requires one byte.
       W^    Displacement requires one word (two bytes).
       L^    Displacement requires one longword (four bytes).

    If no displacement length specifier precedes the expression, and
    the value  of the expression is known, the assembler chooses the
    smallest number of bytes (one, two, or four) needed to store the
    displacement. If  no length specifier precedes the expression, and
    the value of the expression is unknown, the assembler reserves one
    word  (two  bytes) for  the  displacement.   Note  that  if  the
    displacement is either relocatable or defined later in the  source
    program,  the  assembler considers it unknown.  If the actual
    displacement does not fit in the memory reserved, the Linker
    displays an error message.

  8 - General

    The address you specify is the address of the  operand.   The
    Linker converts the addressing mode to either relative or absolute
    mode.  If the address is relocatable,  the  Linker  converts
    general  mode  to relative  mode.   If  the  address  is  absolute,
    the Linker converts general mode to absolute mode.  You should use
    general mode to  write position-independent code when you do not
    know whether the address is relocatable or absolute.  A general
    addressing mode operand  requires five bytes of storage.  You can
    use general mode with index mode.

    G^address

    address

    An expression specifying an address.

  9 - Immediate or Literal

    In both immediate and literal mode,  the  literal  specified  is
    the operand.   In  immediate mode, the operand is stored in a byte,
    word, or longword following the operand specifier.  In  literal
    mode,  the operand specifier is the operand.

    #literal

    The assembler selects immediate or literal  mode,  depending  on
    the value of the literal.

    ^I#literal

    This forces immediate mode.

    ^S#literal

    This forces literal mode.  The  value  of  the  literal  must  be
    an integer  in  the  range  0  through  63,  or  one of a limited
    set of floating-point numbers.

  10 - Indexed

    Index mode is a general register  mode  that  can  be  used  only
    in combination  with another mode (the base mode).  The base mode
    can be any addressing mode except register, immediate,  literal,
    index,  or branch.   The assembler first evaluates the base mode to
    get the base address.  To get the operand address, the  assembler
    multiplies  the contents  of the index register by the number of
    bytes of the operand data type, then adds the result to the base
    address.

       base-mode[Rx]
       base-mode[AP]
       base-mode[FP]
       base-mode[SP]

    base-mode

    Any addressing mode except register, immediate,  literal,  index,
    or branch, specifying the base address.

    x

    A number in the range 0 through 12, specifying the index register.

  11 - Register

    The register contains the operand.

       Rn
       AP
       FP
       SP

    n

    A number in the range 0-12.

    For quadword, D_floating, G_floating, or variable-bit field
    operands, the  operand  is  the  contents  of  register n
    concatenated with the contents of register n+1.  For octaword and
    H_floating operands,  the operand  is the contents of register n
    concatenated with the contents of registers n+1, n+2, and n+3.  In
    each of these  cases,  the  least significant  bytes  of  the
    operand  are  in register n and the most significant bytes are in
    the highest register used.

    The results of the operation are  unpredictable  if  PC  is  used
    in register  mode or if the use of a large data type extends the
    operand into the PC.

  12 - Register deferred

    The register contains the address of the operand.  Register
    deferred mode can be used with index mode.

       (Rn)
       (AP)
       (FP)
       (SP)

    n

    A number in the range of 0 through 12.

  13 - Relative

    The address specified is the address of the operand.   The
    assembler stores  the address as a displacement from the PC.
    Relative mode can be used with index mode.

    address

    address

    An expression specifying an address; the expression can  be
    preceded by  one  of  the  following  displacement  length
    specifiers,  which indicate the number of bytes needed to store the
    displacement.

          B^    Displacement requires one byte.
          W^    Displacement requires one word (two bytes).
          L^    Displacement requires one longword (four bytes).

    If no displacement length specifier precedes the address
    expression, and  the  value of the expression is known, the
    assembler chooses the smallest number of bytes (one, two, or  four)
    needed  to  store  the displacement.    If   no   length
    specifier  precedes  the  address expression, and the value of the
    expression is unknown, the assembler uses  the  default
    displacement length.  If the address expression is either defined
    later in the program or  defined  in  another  program section, the
    assembler considers the value unknown.

  14 - Relative deferred

    The address specified is  the  address  of  the  operand  address
    (a pointer  to the operand).  The assembler stores the address
    specified as a displacement from the PC.  Relative deferred mode
    can  be  used with index mode.

    @address

    address

    An expression specifying an address; the expression can  be
    preceded by  one  of  the  following  displacement  length
    specifiers,  which indicate the number of bytes needed to store the
    displacement.

          B^    Displacement requires one byte.
          W^    Displacement requires one word (two bytes).
          L^    Displacement requires one longword (four bytes).

    If no displacement length specifier precedes the address
    expression, and  the  value of the expression is known, the
    assembler chooses the smallest number of bytes (one, two, or  four)
    needed  to  store  the displacement.    If   no   length
    specifier  precedes  the  address expression, and the value of the
    expression is unknown, the assembler uses  the  default
    displacement length.  If the address expression is either defined
    later in the program or  defined  in  another  program section, the
    assembler considers the value unknown.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.