InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Explain About Maximum Displacement And How To Cross This Limit? |
|
Answer» ASSUMING displacement is referring to X(d,b) addressing and not SOMETHING LIKE displacement from the start of a CSECT. Assuming displacement is referring to x(d,b) addressing and not something like displacement from the start of a CSECT. |
|
| 2. |
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 Production? |
| Answer» | |
| 3. |
How To Access Vsam File? |
|
Answer» VSAM file can be accessed through an ASSEMBLER APPLICATION PROGRAM by using assembler MACROS RPL, ACB VSAM file can be accessed through an Assembler application program by using assembler macros RPL, ACB |
|
| 4. |
How To Produce Soc7 Abend? |
|
Answer» S0C7 occurs when the data exception occurs.They are many ways to produce S0C7
S0C7 occurs when the data exception occurs.They are many ways to produce S0C7 |
|
| 5. |
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? |
|
Answer» Registers are PART of the CPU logic and should not be confused with MEMORY real or virtual. The question is about as sensical as asking where the UTERUS resides in a man. Also, general purpose registers 0--16 are an entirely different breed that the floating point registers. As for the numbering, a decision MADE by the manufacturer's design people. Registers are part of the CPU logic and should not be confused with memory real or virtual. The question is about as sensical as asking where the uterus resides in a man. Also, general purpose registers 0--16 are an entirely different breed that the floating point registers. As for the numbering, a decision made by the manufacturer's design people. |
|
| 6. |
What Is The Difference Between Various Read And Find Statement,and Which One Should Be Used When For Better Adabas Performance? |
|
Answer» There are two possible scenarios:
There are two possible scenarios: |
|
| 7. |
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)? |
|
Answer» As this is mainframe assembler section, this is a trick QUESTION - there is no JMPNZ opcode for mainframe (recently added JNZ with relative addressing in the z/800 and later,but no JMPNZ) and the mainframe has no RET instruction (there is a PR to RETURN from a CROSS address SPACE or PC "call" STATEMENT) and the mainframe has no accumulator, ADB opcode, or B register. As this is mainframe assembler section, this is a trick question - there is no JMPNZ opcode for mainframe (recently added JNZ with relative addressing in the z/800 and later,but no JMPNZ) and the mainframe has no RET instruction (there is a PR to return from a cross address space or PC "call" statement) and the mainframe has no accumulator, ADB opcode, or B register. |
|
| 8. |
How To Initialize 20,000 Bytes In The Assembler? |
|
Answer» 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. 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' 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. 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' |
|
| 9. |
Can We Use Mvc Instruction To Move Pack Field To Pack Field. Which Instruction You Will Use And Why? |
|
Answer» We can certainly use the MVC INSTRUCTION to move the PACK DATA to ANOTHER pack field. We can certainly use the MVC instruction to move the pack data to another pack field. |
|
| 10. |
How To Pass Instream Data In Sysin With Assembler? |
|
Answer» You will need to open de file SYSIN via a DCB and read the data via GET commands. The data in the PARM field is passed via register 1. Any dataset you want to use in ASSEMBLER you will need to open. There are no AUTOMATIC allocation. You will need to open de file SYSIN via a DCB and read the data via GET commands. The data in the PARM field is passed via register 1. Any dataset you want to use in Assembler you will need to open. There are no automatic allocation. |
|
| 11. |
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? |
|
Answer» There are 16 registers, and ALL can be USED as a base EXCEPT for register 0, so the answer is AT LEAST 15. AT LEAST is SPECIFIED here because in any section of code, you can "re-use" a previous base register once you are no longer within the original address range ("scope") of that PARTICULAR base register. By re-using the registers, you can have base registers that will cover ALL of the memory in the machine - but not all at once - you have to "bite off" 15 base reg-at-a-time chunks of memory (all addressable memory does not have to be contiguous - it can be scattered around memory in 4K pieces). There are 16 registers, and ALL can be used as a base EXCEPT for register 0, so the answer is AT LEAST 15. AT LEAST is specified here because in any section of code, you can "re-use" a previous base register once you are no longer within the original address range ("scope") of that particular base register. By re-using the registers, you can have base registers that will cover ALL of the memory in the machine - but not all at once - you have to "bite off" 15 base reg-at-a-time chunks of memory (all addressable memory does not have to be contiguous - it can be scattered around memory in 4K pieces). |
|
| 12. |
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? |
|
Answer» This is a VAGUE two-part QUESTION.
This is a vague two-part question. |
|
| 13. |
What Is Need Of Start 0? In Steed Of |
|
Answer» START is an assembler DIRECTIVE which has an optional operand, (0 in your example). This operand ACTS as the starting address of the program e.g. PROGNAME START X'3E0' TELLS the LINKAGE editor that this program is to be loaded into main storage at address '3E0' in hex. START is an assembler directive which has an optional operand, (0 in your example). This operand acts as the starting address of the program e.g. PROGNAME START X'3E0' tells the linkage editor that this program is to be loaded into main storage at address '3E0' in hex. |
|
| 14. |
What Is The Use Of Trt Instruction And How It Is Working? |
|
Answer» For example we want to TEST if given VARIABLE is numeric we can do it by FOLLOWING code. We can define a table with all FF execpt from 0 to 9 00 TABLE1 DC 256c'ff' For example we want to test if given variable is numeric we can do it by following code. We can define a table with all FF execpt from 0 to 9 00 Table1 DC 256c'ff' |
|
| 15. |
How Are Data Passed From Jcl Parm To Assembler Program. And How Is Data Passed From A Calling Program To An Assembler Called Program? |
|
Answer» By convention, general PURPOSE register 1 will have the address of the PARAMETER list. The list will be a list of pointers (ADDRESSES) to individual 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 must be on a fullword boundary. By convention, general purpose register 1 will have the address of the parameter list. The list will be a list of pointers (addresses) to individual 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 must be on a fullword boundary. |
|
| 16. |
Why Can Only 256 Bytes Be Moved From One Address To Another In A Mvc? |
|
Answer» LENGHT feild is 8 BITS so the DATA is stored in BINARY format so if we have all 8 bits set to 1 then the length will be 128+64+32+16+8+4+2+1 = 255.or 2^7+ 2^6+2^5...2^0 = 255. so the lenght is 256 . Lenght feild is 8 bits so the data is stored in binary format so if we have all 8 bits set to 1 then the length will be 128+64+32+16+8+4+2+1 = 255.or 2^7+ 2^6+2^5...2^0 = 255. so the lenght is 256 . |
|
| 17. |
What Is Base Register? |
|
Answer» A base register is any general purpose register chosen by PROGRAMMER. It is ASSIGNED at the beginning of the program as PART of housekeeping with the USING assembler keyword, and it's purpose is to MAINTAIN addressibility within a page (4k) of code or DATA. A base register is any general purpose register chosen by programmer. It is assigned at the beginning of the program as part of housekeeping with the USING assembler keyword, and it's purpose is to maintain addressibility within a page (4k) of code or data. |
|
| 18. |
What Is House Keeping In Assembler? And Explain The Following Code <br>hellotso Start 0 <br>* Print Nogen <br>begin Save (14,12) <br>lr 12,15 <br>using Type,12 <br>st 13,save+4 <br>la 11,save <br>st 11,8(13) <br>lr 13,11 |
|
Answer» House keeping is USED to store the contents of the base register from one register to another for USING that register. These are house keeping instructions where contents of the registers are STORED
House keeping is used to store the contents of the base register from one register to another for using that register. These are house keeping instructions where contents of the registers are stored |
|
| 19. |
How To Initialize A Register To 0000? |
|
Answer» XR Rx,Rx:
XR Rx,Rx: |
|
| 20. |
Why Do We Use "drop"? What Does "using" Do? |
|
Answer» Neither DROP nor USING affect the register contents. Once a register has been loaded with the address of a piece of storage, the using statement can be used to 'map' that storage against a set of labels defining the layout of that storage e.g. a DSECT. Then whenever ONE of those labels is referenced in the code, in moves etc, the ASSEMBLER resolves the relative address as a particular displacement from the absolute address in the register. The DROP instruction removes the relationship between the labels and the register and renders SUBSEQUENT references to those labels as unresolvable, giving rise to errors at assembly (compile)time. Typically the DROP instruction will be used to allow use of the register for another PURPOSE, e.g. address a different bit of storage via a using staement on second DSECT without the risk of corrupting that data via moves referencing the original DSECT. Neither DROP nor USING affect the register contents. Once a register has been loaded with the address of a piece of storage, the using statement can be used to 'map' that storage against a set of labels defining the layout of that storage e.g. a DSECT. Then whenever one of those labels is referenced in the code, in moves etc, the assembler resolves the relative address as a particular displacement from the absolute address in the register. The DROP instruction removes the relationship between the labels and the register and renders subsequent references to those labels as unresolvable, giving rise to errors at assembly (compile)time. Typically the DROP instruction will be used to allow use of the register for another purpose, e.g. address a different bit of storage via a using staement on second DSECT without the risk of corrupting that data via moves referencing the original DSECT. |
|
| 21. |
What Is The Difference In Data Type "x" And "p"? |
|
Answer» In MVS assembler data type X denotes hexadecimal data type which unsigned pack. SUPPOSE you define VAR1 as "VAR1 DC X'01'". It will occupy 1 byte in the memory and stored as:
See following example: VAR2 DC P'1' it will occupy one byte in the memory and stored as '1C'. In MVS assembler data type X denotes hexadecimal data type which unsigned pack. suppose you define VAR1 as "VAR1 DC X'01'". It will occupy 1 byte in the memory and stored as: See following example: VAR2 DC P'1' it will occupy one byte in the memory and stored as '1C'. |
|
| 22. |
Why Do We Have Multiple Base Registers In Certain Programs? |
|
Answer» it all DEPENDS upon the length of your PROGRAM , if it is more than 4095 then we need 2 REGISTER else only one can do needful. basically we can even use savearea register as a base register, so as to ACCOMODATE the length of the program it all depends upon the length of your program , if it is more than 4095 then we need 2 register else only one can do needful. basically we can even use savearea register as a base register, so as to accomodate the length of the program |
|
| 23. |
What Will Happen If We Drop The Base Register In The Pgm Which Contains Only One Base Reg? |
|
Answer» It will give an ERROR at the time of assembly, if there are some labels defined in the PROGRAM(provided they are being referenced in your program). This is because the assembler resolves the displacement of that variable from the location where your BASE register is POINTING to. It will give an error at the time of assembly, if there are some labels defined in the program(provided they are being referenced in your program). This is because the assembler resolves the displacement of that variable from the location where your base register is pointing to. |
|
| 24. |
How To Pass The Parameters From Jcl To Assembler Pgm? |
|
Answer» R1 contains a fullword that contains a ADDRESS POINTING to the parm data. In pgm before ACCESSING the parm data use L Rn,0(,R1) where n=3,..11 , Rn contains the address that points to parm data. Create DSECT that contains a halfword and the length of the data. R1 contains a fullword that contains a address pointing to the parm data. In pgm before accessing the parm data use L Rn,0(,R1) where n=3,..11 , Rn contains the address that points to parm data. Create DSECT that contains a halfword and the length of the data. |
|
| 25. |
How To Retrieve The Instream Data In Sysin? |
|
Answer» USE ACCEPT in procedure DIVISION. Example : ACCEPT-PARA. In JCL : //SYSIN dd * Use Accept in procedure division. Example : ACCEPT-PARA. In JCL : //sysin dd * |
|
| 26. |
Can We Use An Equated Value As Operand For An Mvc Instruction? Reason For The Same? |
|
Answer» If you write an MVC statement with an equated value as the sending OPERAND, then the assembler will try to RESOLVE that operand value as a base and displacement, it will not necessarily throw an error at assembly, but the results at execution will be unpredictable and may well give rise to a protection exception. The point of the MVI statement is that the SINGLE byte sending operand value is assembled as part of the instruction itself and does not have to be 'fetched' at execution time, therefore if you are only MOVING a single byte of fixed value, then an MVI will be marginally more efficient than an MVC If you write an MVC statement with an equated value as the sending operand, then the assembler will try to resolve that operand value as a base and displacement, it will not necessarily throw an error at assembly, but the results at execution will be unpredictable and may well give rise to a protection exception. The point of the MVI statement is that the single byte sending operand value is assembled as part of the instruction itself and does not have to be 'fetched' at execution time, therefore if you are only moving a single byte of fixed value, then an MVI will be marginally more efficient than an MVC |
|
| 27. |
Explain Icm Instruction? |
|
Answer» ICM MEANS INsert character under mask. its a movement of character under mask bits. eg ICM R8,B'0110',SRC Before execution: R8 ==> 12 34 56 78 After Excecution: R8 ==> 12 CD EF 78 ICM means INsert character under mask. its a movement of character under mask bits. eg ICM R8,B'0110',SRC Before execution: R8 ==> 12 34 56 78 After Excecution: R8 ==> 12 CD EF 78 |
|