How to initialize 20,000 bytes in the Assembler..
Answer Posted / saurabh biswas
To initialize a 20000 byte field you have to use MVCL
instruction. Let's say VAR1 is defined as " VAR1 DS XL20000"
For using MVCL instruction you require two even-odd regiter
pair, even registers will contain the destination and
source address respectively, first odd register will
contain the destination leght and from 2nd to 4th byte of
the second odd register will contain the source length and
the first byte will contain filler(it will come into play
if destination lenghth is shorter than source). Now if we
want to initialize VAR1 with spaces we have to code like
following way:
LA R4,VAR1
LA R5,20000
XR R8,R8
XR R9,R9
ICM R9,B'1000',X'40'
MVCL R4,R8
Here source length is 0 and destination length is 20000. So
no move ment will occur and all the 20000 byte will be
filled by the filler wich is space here. So as result of
this instruction all 20000 byte will be initialized by
spaces.
Is This Answer Correct ? | 25 Yes | 4 No |
Post New Answer View All Answers
What is the use of trt instruction?
how to initialize a register to 0000?
What is maximum displacement and how to cross this limit?
Explain the difference between various read and find statement?
How are data passed from jcl parm to assembler program?
how to pass the parameters from jcl to assembler pgm?
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 is need of start 0?
Explain how to initialize a register to 0000?
explain about maximum displacement and how to cross this limit?
Explain the difference between various read and find statement and which one should be used when for better adabas performance?
How is data passed from a calling program to an assembler called program?
how to retrieve the instream data in sysin?
Explain about house keeping in assembler?
How to pass the parameters from jcl to assembler program?