:: 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                      
Categories >> Software >> MainFrame >> IBM MainFrame >> Assembler


 COBOL interview questions  COBOL Interview Questions (849)
 JCL interview questions  JCL Interview Questions (700)
 CICS interview questions  CICS Interview Questions (448)
 DB2 interview questions  DB2 Interview Questions (668)
 IMS interview questions  IMS Interview Questions (79)
 IDMS interview questions  IDMS Interview Questions (6)
 Natural interview questions  Natural Interview Questions (39)
 ADABAS interview questions  ADABAS Interview Questions (7)
 REXX interview questions  REXX Interview Questions (21)
 Assembler interview questions  Assembler Interview Questions (29)
 CLIST interview questions  CLIST Interview Questions (1)
 QMF interview questions  QMF Interview Questions (4)
 MVS interview questions  MVS Interview Questions (11)
 OS390 interview questions  OS390 Interview Questions (9)
 OS 2 interview questions  OS 2 Interview Questions (0)
 VSAM interview questions  VSAM Interview Questions (177)
 QSAM interview questions  QSAM Interview Questions (3)
 Sysplex interview questions  Sysplex Interview Questions (5)
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions (128)
How to initialize 20,000 bytes in the Assembler..
 Question Submitted By :: Assembler
I also faced this Question!!     Answer Posted By  
# 1
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 R5,20000
XR R8,R8
XR R9,R9
ICM R9,B'1000',X'40'

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
Is This Answer Correct ?    20 Yes 3 No
Saurabh Biswas
# 2
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
# 3
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
# 4
initalization done by using below code.
MVI datafield,C' '
MVC datafield+1(L'datafield-1),datafield
Is This Answer Correct ?    3 Yes 24 No

Other Assembler Interview Questions
  Question Asked @ Answers
What is the difference in data type "X" and "P"?   5
How are data passed from JCL parm to assembler program. And how is data passed from a calling program to an assembler called program. HCL 3
How we can retrieve the instream data in SYSIN ? Tech-Mahindra 2
Why can only 256 bytes be moved from one address to another in a MVC? HCL 6
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
Why do we use "drop"? What does "using" do?   4
about ICM instruction. EDS 4
How do you initialize a register to 0000? HCL 9
What is base register?   17
How to initialize 20,000 bytes in the Assembler.. AMDOC 4
how to produce SOC7 abend EDS 1
For more Assembler Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::