How to initialize 20,000 bytes in the Assembler..

Answer Posted / roocarlin

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

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many maximum base registers we can have in a program?

787


how to initialize a register to 0000?

859


Explain about base register?

790


What is maximum displacement?

831


How many maximum base registers we can have in a single program?

791


Explain how to access vsam file?

836


How do you round the addition or subtraction of two numbers in assembler?

778


Explain the difference between various read and find statement?

809


How to pass the parameters from jcl to assembler program?

718


Explain the difference between various read and find statement and which one should be used when for better adabas performance?

748


What is the use of trt instruction?

769


explain about maximum displacement and how to cross this limit?

868


how to pass the parameters from jcl to assembler pgm?

815


Ap wkur,=p5 where wkur is a label?

857


What does the following code do? Ap wkur,=p5 where wkur is a label?

802