Immediate Data

Immediate instructions contain a field of data that is 8 or 16 bits in length. The data field is specified in the second operand by an absolute value, and it is assembled as a binary value.  Therefore, the second operand may be a self-defining term or a symbol equated to a self-defining term.

*                        ALL HAVE THE SAME 8-BIT IMMEDIATE DATA
*                        --------------------------------------
         MVI   CHAR,C' '               CHARACTER TERM
         MVI   CHAR,X'40'              HEX TERM
         MVI   CHAR,HEX40              SAME USING EQUATE
         MVI   CHAR,B'01000000'        BINARY TERM
         MVI   CHAR,64                 DECIMAL TERM
         MVI   CHAR,BIT01              SAME USING EQUATE
*                             ---------------------------------
         MVC   CHAR(1),=AL1(64)   SAME DATA IN LITERAL BYTE
*
*                        ALL HAVE THE SAME 16-BIT IMMEDIATE DATA
*                        ---------------------------------------
         TMH   R7,X'8000'              HEX TERM
         TMH   R7,MASK8000             SAME USING EQUATE
         TMH   R7,32768                DECIMAL TERM
         TMH   R7,MASKBIT0             SAME USING EQUATE
*
CHAR     DS  CL1
HEX40    EQU X'40'
BIT01    EQU 64
*
MASK8000 EQU X'8000'
MASKBIT0 EQU 32768

Copyright © 2006 The Stevens Computing Services Company, Inc.  All rights reserved.