How to initialize 20,000 bytes in the Assembler?

Submitted by: Administrator
since the machine-code for MVC moves up to 256 bytes, you would need to do a series of MVCs to initialize 20000 bytes. this requires that you maintain a register or two to keep track of how far you've progressed through initialization.

possibly, you could get MVCL to do it; i've never tried...

MVCL uses 2 sets of even-odd pairs of registers to do the move.
you specify source address, destination address, length of source, length of destination, and fill character in the registers. the fill-character goes into the high order byte of (I THINK...) the destination length register (in this case r4)
l r4,=f'20000'
l r6,=f'20000'
la r7,source_field
la r5,dest_field
mvcl r4,r6
Submitted by: Administrator

MVCL will do it. The answer already provided is correct except that the Fill Character(which fills the remaining bytes in the destination field after all the bytes of the source field have been moved to the destination field , when L'Destination > L'Source) should be moved to the first byte of the Source Length field and NOT the destination length field.
Submitted by: Mohit

Read Online IBM Assembler Job Interview Questions And Answers