Can we use an equated value as operand for an MVC
instruction? Reason for the same
Answers were Sorted based on User's Feedback
Answer / guest
NO, Equated values are of single byte, so we can only use
that in MVI (Move Immediate) and not with the Move
Character.
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / saurabh biswas
Both the operands of a MVC operand is a storage operand.
But the equated value is an immediate data not a storage
operand. So if you use equated value in a MVC instruction
it will try to resolve the equated value in the form of
BDDD format. It will not cause any any error at compilation
time but will cause an unpredictable result at run time.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / phil
If you write an MVC statement with an equated value as the
sending operand, then the assembler will try to resolve that
operand value as a base and displacement, it will not
necessarily throw an error at assembly, but the results at
execution will be unpredictable and may well give rise to a
protection exception.
The point of the MVI statement is that the single byte
sending operand value is assembled as part of the
instruction itself and does not have to be 'fetched' at
execution time, therefore if you are only moving a single
byte of fixed value, then an MVI will be marginally more
efficient than an MVC
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / pazhanivel seethapathy
Yes. We can use an equated valuse as an operand in MVC
instruction wit the help of Y parameter.
The syntax for the same.
MVC SUM,=Y(VALUE)
where as VALUE is an equated value.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / deepu
Answer 4 is correct. Yes...An equate in MVC will not give
any compilation errors if the decimal equvalent of the
eqaute is less than 4096,the compilation of the code will
go fine.But the program execution will give S0C abends, as
the program will try to access from protected memory
area.
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / pazhanivel seethapathy
No. We cannot use equated value as operand for an MVC
instruction, Since it supports only SI instruction.
Since MVI comes under SI instruction, it can use equated
value as operand.
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / ajay tyagiom
Yes, we can but it is good practice to use MVI instruction
for equated value because it has only one byte and
generally assembler used for fast processing and MVI
instruction takes lesser time than MVC instruction in
execution.
Is This Answer Correct ? | 3 Yes | 7 No |
Answer / suvojyoti
Just to add to the second answer, MVC instruction is of 6
bytes and MVI is of 4 bytes,so space required is less for
MVI and hence i should be used.
Is This Answer Correct ? | 1 Yes | 6 No |
What does "using" do?
Explain the difference between various read and find statement and which one should be used when for better adabas performance?
What is the use of TRT instruction and how it is working?
Why do we use "drop"?
Explain how to pass instream data in sysin with assembler?
about ICM instruction.
How are data passed from JCL parm to assembler program. And how is data passed from a calling program to an assembler called program.
What is house keeping in assembler?
WHAT WILL HAPPEN IF WE DROP THE BASE REGISTER IN THE PGM WHICH CONTAINS ONLY ONE BASEREG?
What is maximum displacement and how to cross this limit?
What is need of start 0? In steed of can we use anyother numerics? If we use what will happen?
Explain about house keeping in assembler?