MVI is used to move a one byte immediate constant to a field in storage. Operand 1 denotes the field in main storage, while the second operand is coded as a self-defining term that gets assembled as a one byte immediate constant (II2) in the second byte of the object code. Only the first byte of Operand 1 is affected by the move.

 

As an example, consider the following code,

 

MVI FIELDA,XC1

...

FIELDA DC X123456

 

After execution, FIELDA contains XC13456. Only the first byte of the field is altered by the immediate instruction.

 

The following example illustrates how an MVI instruction might be processed by the assembler.

 

LOC OBJECT CODE

 

000F12 92F4C044 MVI CUSTCODE,C4

...

001028 CUSTCODE DS CL1

In the example above, the op-code for MVI is x92, the self-defining term C4 is assembled as the one byte hexadecimal constant xF4, and CUSTCODE is translated into the base/displacement address C044.

 

 

Some Unrelated MVIs:

J DC CABC

 

MVI J,CX J = CXBC

MVI J,CB J = CBBC

MVI J,C5 J = C5BC

MVI J,XF5 J = C5BC

MVI J,197 J = C5BC

MVI J,=C5 ASSEMBLY ERROR - OPERAND 2 NOT A SELF-DEFINING

TERM

MVI J(1),XC5 ASSEMBLY ERROR - LENGTH SPECIFICATION NOT

ALLOWED IN OPERAND 1