IBM Assembler

  Home  Mainframes  IBM Assembler


“IBM Assembler frequently Asked Questions in various IBM Assembler job Interviews by interviewer. Get preparation of IBM Assembler job interview”



27 IBM Assembler Questions And Answers

23⟩ What is base register?

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.

 141 views

24⟩ What is house keeping in assembler? And explain the following codeHELLOTSO START 0 * PRINT NOGEN BEGIN SAVE (14,12) LR 12,15 USING TYPE,12 ST 13,SAVE+4 LA 11,SAVE ST 11,8(13) LR 13,11

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

1. content of the register 15 is stored in the register 12

2. address in reg 12 is mapped to the module type

3. save area is stored in the register 13

 231 views

25⟩ How to initialize a register to 0000?

XR Rx,Rx

This is the best way and most efficient way of initializing

the register values or Label values to '0'.

Its because the time required to execute a Logical

Instruction is always less than the Arithmetic Instructions.

e.g SR Rx,Rx consumes more execution time than XR Rx,Rx.

So XR Rx,Rx is a better way to do obtain our target.

 166 views

26⟩ What is the difference in data type "X" and "P"?

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:

0 in the zoned nibble and 1 in the numeric nibble.

P denotes the packed data type, similar to COMP-3 in COBOL.

if you declare any variable with this data type then it

must have a sign byte at last nibble. See following example:

VAR2 DC P'1'

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

 181 views

27⟩ Why do we use "drop"? What does "using" do?

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.

 189 views