ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  MainFrame  >>  IBM MainFrame  >>  Assembler
 
 


 

 
 COBOL interview questions  COBOL Interview Questions
 JCL interview questions  JCL Interview Questions
 CICS interview questions  CICS Interview Questions
 DB2 interview questions  DB2 Interview Questions
 IMS interview questions  IMS Interview Questions
 IDMS interview questions  IDMS Interview Questions
 Natural interview questions  Natural Interview Questions
 ADABAS interview questions  ADABAS Interview Questions
 REXX interview questions  REXX Interview Questions
 Assembler interview questions  Assembler Interview Questions
 CLIST interview questions  CLIST Interview Questions
 QMF interview questions  QMF Interview Questions
 MVS interview questions  MVS Interview Questions
 OS390 interview questions  OS390 Interview Questions
 OS 2 interview questions  OS 2 Interview Questions
 VSAM interview questions  VSAM Interview Questions
 QSAM interview questions  QSAM Interview Questions
 Sysplex interview questions  Sysplex Interview Questions
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions
Question
How to initialize 20,000 bytes in the Assembler..
 Question Submitted By :: Shrishail102
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to initialize 20,000 bytes in the Assembler..
Answer
# 1
initalization done by using below code.
MVI datafield,C' '
MVC datafield+1(L'datafield-1),datafield
 
Is This Answer Correct ?    3 Yes 23 No
Munna
 
  Re: How to initialize 20,000 bytes in the Assembler..
Answer
# 2
fielda DC C20000’ ’

* The requirement is to initialize 20000 bytes
not "reinitialize" 20000 bytes.

* The above statment initializes 20000 bytes of storage to
spaces. The bonus is that it is done at assembly time and
not run time.
 
Is This Answer Correct ?    2 Yes 12 No
King Nahiku
 
 
 
  Re: How to initialize 20,000 bytes in the Assembler..
Answer
# 3
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 ?    9 Yes 3 No
Roocarlin
 
  Re: How to initialize 20,000 bytes in the Assembler..
Answer
# 4
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 ?    18 Yes 1 No
Saurabh Biswas
 

 
 
 
Other Assembler Interview Questions
 
  Question Asked @ Answers
 
Why do we have multiple base registers in certain programs?  4
How to pass instream data in sysin with Assembler? ANZ2
about ICM instruction. EDS4
cobol and assembler access EDS2
Why do we use "drop"? What does "using" do?  4
How are data passed from JCL parm to assembler program. And how is data passed from a calling program to an assembler called program. HCL3
Write the fetch cycle and execute cycle for following instructions:JMPNZ (jump to the given address if the accumulator not equal to zero) RET(return from a subroutine) ADB (add the contents of register B to the accumulator and save result in the accumulator).  1
how to access VSAm file EDS1
registers(0-15) ,where they are going be resides., does that mean here is it resides whether real or virtual memory? and why? then why we are assign even registers(0 to 6) for FP operations????  3
what is need of START 0?. In steed of '0' can we use any other numerics?. if we use what will happen?. CSC3
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. TCS5
Can we use an equated value as operand for an MVC instruction? Reason for the same  8
 
For more Assembler Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com