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 |
In the house keeping section of an MVS assembly language program, like the one below STM R14,R12,12(R13) BASR R12,R0 USING *,R12,R11 LA R11,2048 LA R11,2048(R11,R12) .... .... 1. What if BASR R12,R0 IS NOT PRECEDE USING *,R12,R11? 2. USING (base address), REGISTER does USING directive says assembler to treat particular Register as a base register with the mentioned base address..in the above case * i.e current location counter..well if that is the case why we need BASR R12,R0 ? 3. What if I write like STM R14,R12,12(R13) BASR R12,R0 LA R11,2048 LA R11,2048(R11,R12) USING *,R12,R11 there is no address resolution being calculated in both LA statements so is it a right way to set Base register?..will there be any issues with Domain regarding R11 and R12?
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?
Why do we have multiple base registers in certain programs?
HOW MANY MAXIMUM BASE REGISTERS WE CAN HAVE IN A PROGRAM AND ALSO HOW MANY MAXIMUM BASE REGISTERS WE CAN HAVE IN A SINGLE PROGRAM.
What is maximum displacement?
What is the use of TRT instruction and how it is working?
cobol and assembler access
What does the following code do? Ap wkur,=p5 where wkur is a label?
What is need of start 0?
What does LA R3,R3 ?
how to find the dump