YouTube Icon

Interview Questions.

Ibm Assembler Placement Papers - Ibm Assembler Interview Questions and Answers - Jul 28, 2022

fluid

Ibm Assembler Placement Papers - Ibm Assembler Interview Questions and Answers

Q1. What Is Need Of Start zero? In Steed Of

START is an assembler directive which has an optionally available operand, (zero for your example). This operand acts because the beginning address of this system e.G. PROGNAME START X'3E0' tells the linkage editor that this software is to be loaded into primary storage at address '3E0' in hex. 

Q2. Why Can Only 256 Bytes Be Moved From One Address To Another In A Mvc?

Lenght feild is eight bits so the information is stored in binary layout so if we have all eight bits set to at least one then the duration will be 128+sixty four+32+sixteen+8+four+2+1 = 255.Or 2^7+ 2^6+2^five...2^zero = 255.

So the lenght is 256 .

Q3. What Is The Difference In Data Type "x" And "p"?

In MVS assembler information type X denotes hexadecimal information kind  which unsigned p.C.. Suppose you outline VAR1 as "VAR1 DC X'01'".

It will occupy 1 byte inside the memory and saved as: 

zero inside the zoned nibble and 1 inside the numeric nibble.

P denotes the packed records kind, just like COMP-three in COBOL. 

In case you declare any variable with this facts type then it  must have a sign byte at final nibble. 

See following example:

VAR2 DC P'1'

it will occupy one byte in the memory and stored as '1C'.

Q4. How To Access Vsam File?

VSAM file may be accessed thru an Assembler application program by way of the usage of assembler macros RPL, ACB

Q5. 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?

Registers are a part of the CPU good judgment and have to not be stressed with reminiscence real or virtual. The query is about as sensical as asking wherein the uterus resides in a person. Also, popular motive registers 0--sixteen are an entirely unique breed that the floating point registers. As for the numbering, a decision made by using the manufacturer's layout human beings.

Q6. Why Do We Use "drop"? What Does "using" Do?

Neither DROP nor USING have an effect on the check in contents. Once a check in has been loaded with the cope with of a piece of garage, the using announcement can be used to 'map' that garage against a hard and fast of labels defining the format of that storage e.G. A DSECT. Then on every occasion one of those labels is referenced within the code, in moves and so forth, the assembler resolves the relative cope with as a particular displacement from absolutely the cope with in the sign in. The DROP training eliminates the relationship between the labels and the sign in and renders next references to those labels as unresolvable, giving upward thrust to mistakes at meeting (collect)time. 

Typically the DROP coaching may be used to allow use of the check in for every other reason, e.G. Address a distinct little bit of storage thru a using staement on 2d DSECT without the chance of corrupting that facts via movements referencing the original DSECT.

Q7. How Are Data Passed From Jcl Parm To Assembler Program. And How Is Data Passed From A Calling Program To An Assembler Called Program?

By conference, standard purpose sign in 1 could have the address of the parameter list. The list may be a list of suggestions (addresses) to person parameters. The CALL macro does this, but you can bypass the CALL macro and be creative on how you set up the parameter list. Don't forget the parameter need to be on a fullword boundary.

Q8. What Will Happen If We Drop The Base Register In The Pgm Which Contains Only One Base Reg?

It will give an errors on the time of assembly, if there are some labels defined inside the program(provided they're being referenced on your program). This is because the assembler resolves the displacement of that variable from the location in which your base check in is pointing to.

Q9. Can We Use An Equated Value As Operand For An Mvc Instruction? Reason For The Same?

If you write an MVC assertion with an equated fee as the sending operand, then the assembler will try to solve that operand price as a base and displacement, it's going to not always throw an errors at assembly, but the consequences at execution may be unpredictable and may nicely give upward push to a safety exception. 

The factor of the MVI statement is that the single byte sending operand value is assembled as a part of the education itself and does now not must be 'fetched' at execution time, consequently in case you are simplest shifting a single byte of fixed value, then an MVI might be marginally extra efficient than an MVC

Q10. How To Produce Soc7 Abend?

S0C7 takes place when the facts exception happens.They are many ways to provide S0C7

Move non numeric records to a numeric feild 

Compare junk records with a numeric feild

Use a non numeric records in COMPUTE announcement

Refer to the occurence in a desk beyond the happens time with SSRANGE now not checked in complier alternatives

Q11. Change Process Tool(code Changes From Dev To Prd) The Changes Made To Your Code Should Be Effected In Live. How The Process Takes Place. That Is How Can You Move The Code Changes From Development To P

If there is any updates inside the Macros concerning the shape trade or addition/elimination of byte, then you want to Promote the macro to Live first.

Reassemble your codes against the Live Macros.

Raise ELAS for the Codes to visit production.

Promote the codes to production.

Q12. How To Retrieve The Instream Data In Sysin?

Use Accept in manner division.

Example : 

WORKING-STORAGE SECTION. 

01 empno. Pic x(05).

01 empname percent x(15).

01 empsal % 9(10).

PROCEDURE DIVISION.

................

PERFORM ACCEPT-PARA.

.............. 

ACCEPT-PARA.

ACCEPT EMPNO.

ACCEPT EMPNAME.

ACCEPT EMPSAL.

In JCL :

...........

............

//sysin dd *

001

aaaa

330000

/*

Q13. What Is Base Register?

A base sign in is any trendy purpose register selected through programmer. It is assigned at the start of this system as part of house responsibilities with the USING assembler key-word, and it is cause is to keep addressibility within a web page (4k) of code or facts.

Q14. What Is The Difference Between Various Read And Find Statement,and Which One Should Be Used When For Better Adabas Performance?

There are  possible situations: 

This is a classroom quesiton wherein you're predicted to  perform a little research in your own, and no longer ask someone in the  cloud for the exact wer.

The query is simply too vague, and might require a full  essay to wer. Please be greater specific.

Q15. How To Initialize A Register To 0000?

XR Rx,Rx:

This is the satisfactory manner and most efficient way of initializing

the sign up values or Label values to '0'.

Its due to the fact the time required to execute a Logical

Instruction is constantly less than the Arithmetic Instructions.

E.G SR Rx,Rx consumes extra execution time than XR Rx,Rx.

So XR Rx,Rx is a higher way to do attain our goal.

Q16. What Is House Keeping In Assembler? And Explain The Following Code <br>hellotso Start zero <br>* Print Nogen <br>begin Save (14,12) <br>lr 12,15 <br>using Type,12

House maintaining is used to store the contents of the bottom sign up from one sign up to another for using that sign in. These are house keeping instructions where contents of the registers are stored

content of the register 15 is stored in the check in 12 

deal with in reg 12 is mapped to the module kind

keep location is stored inside the sign up 13

Q17. 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?

There are sixteen registers, and ALL may be used as a base EXCEPT for sign up 0, so the wer is AT LEAST @AT LEAST is distinctive here because in any segment of code, you can "re-use" a previous base sign up after you are no longer in the original deal with variety ("scope") of that particular base sign up. By re-the use of the registers, you could have base registers so that it will cowl ALL of the memory in the device - however now not all at once - you need to "bite off" 15 base reg-at-a-time chunks of memory (all addressable reminiscence does no longer must be contiguous - it may be scattered around memory in 4K pieces).

Q18. Can We Use Mvc Instruction To Move Pack Field To Pack Field. Which Instruction You Will Use And Why?

We can without a doubt use the MVC guidance to transport the p.C. Records to any other percent subject.

Q19. Why Do We Have Multiple Base Registers In Certain Programs?

All of it depends upon the period of your program , if it's miles more than 4095 then we need 2 register else handiest you will do needful. Basically we will even use savearea register as a base check in, to be able to accomodate the length of the program

Q20. How To Pass The Parameters From Jcl To Assembler Pgm?

R1 carries a fullword that consists of a address pointing to the parm data. In pgm earlier than accessing the parm statistics use L  Rn,0(,R1) in which n=3,..11 , Rn incorporates the deal with that points to parm facts. Create DSECT that includes a halfword and the period of the statistics.

Q21. What Is The Use Of Trt Instruction And How It Is Working?

For example we want to check if given variable is numeric we will do it by means of following code.

We can outline a desk with all FF execpt from 0 to 9 00

Table1 DC 256c'ff'

org table1

dc 10c'00'

Now we will deliver TRT var1,table1 

BZ numeric

Q22. Write The Fetch Cycle And Execute Cycle For Following Instructions:jmpnz (jump To The Given Address If The Accumulator Not Equal To Zero) Ret(go back From A Subroutine) Adb (upload The Contents Of Registe

As that is mainframe assembler phase, that is a trick question - there is no JMPNZ opcode for mainframe (lately delivered JNZ with relative addressing inside the z/800 and later,but no JMPNZ) and the mainframe has no RET preparation (there is a PR to return from a pass address space or PC "call" assertion) and the mainframe has no accumulator, ADB opcode, or B register.

Q23. How Do You Round The Addition Or Subtraction Of Two Numbers In Assembler?What Does The Following Code Do? Ap Wkur,=p5 Where Wkur Is A Label?

This is a indistinct two-element query.

You can spherical by adding .Five

Adds 5 to WKUR, however it had better be a valid packed area, and now not just a label.

Q24. Explain Icm Instruction?

ICM me INsert character under mask. Its a movement of man or woman under mask bits.

Eg 

ICM R8,B'0110',SRC

Before execution: 

R8 ==> 12 34 56 78

SRC ==> AB CD EF 10

After Excecution:

R8 ==> 12 CD EF 78

Q25. Explain About Maximum Displacement And How To Cross This Limit?

Assuming displacement is relating to x(d,b) addressing and now not something like displacement from the begin of a CSECT.

Q26. How To Pass Instream Data In Sysin With Assembler?

You will want to open de record SYSIN thru a DCB and examine the statistics via GET commands. The data inside the PARM field is exceeded through sign up @Any dataset you need to use in Assembler you'll want to open. There aren't any automated allocation.

Q27. How To Initialize 20,000 Bytes In The Assembler?

For the reason that gadget-code for MVC moves as much as 256 bytes, you'll need to do a series of MVCs to initialize 20000 bytes. This calls for which you keep a register or  to hold song of ways some distance you've improved via initialization. 

Possibly, you may get MVCL to do it; i've never tried...

MVCL uses 2 units of even-atypical pairs of registers to do the circulate.

You specify supply cope with, destination cope with, period of source, duration of vacation spot, and fill individual in the registers. The fill-individual goes into the excessive order byte of (I THINK...) the destination duration sign in (in this case r4)

l r4,=f'20000'

l r6,=f'20000'

la r7,source_field

los angeles r5,dest_field

mvcl r4,r6




CFG