What is house keeping in assembler? And explain the
following code

HELLOTSO 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

Answers were Sorted based on User's Feedback



What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / john

To elaborate a little the reason for all this
"housekeeping": The "save areas" as they are called that are
created by the SAVE macro contain the contents of the
registers when the routine is called. Save areas are
backward and forward linked (by the 4 instructions after the
USING) so that if the program fails you can find them in a
dump. The ending part of the program is missing as well,
but it returns the registers to their previous state before
returning to the calling program. It might look something like:

DROP 12
ALLDONE L 13,SAVE+4
RETURN (14,12),RC=0

Is This Answer Correct ?    8 Yes 3 No

What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / mike m

Housekeeping is the work done at the start of an ALC
program that saves the contents of regs
14,15,0,1,2,3,4,5,6,7,8,9,10,11,12 into an addr off R13.
After that and in this example, R15(which contains prog.
entry point) is loaded into R12. The USING completes the
work to make R12 the BASE reg. Within this code @ label =
SAVE is a 72 byte work area. The first STORE(ST) saves the
contents of R13 -> 4 bytes into the address that SAVE is
located at. LA(Load Address) loads the address of the area
@ label = SAVE into REG 11. The second STORE(ST) then
stores the contents of Reg 11 -> 8 bytes beyond the addr.
in Reg 13. The LOAD REGISTER(LR) then loads the contents of
Reg 11 into Reg 13. REG 13 now has the addr of the area @
label = SAVE that may be used if this code calls another
routine.

Is This Answer Correct ?    6 Yes 2 No

What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / asm noob

To add to John's answer( #2), (the end of this program is
missing), this program will not assemble as R15 and R12
contains the address of the start of this program( LABEL
HELLOTSO). The USING Directive is mapping the label TYPE,
which is not defined in the above piece of code, so the base
address of this program is not established yet and the
variable SAVE is being referred.

Is This Answer Correct ?    3 Yes 0 No

What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / pazhanivel seethapathy`

House Keeping is the process done at the start of Assembler
not only to save the register contents in the save but also
to intialize counters if there is any used.

Is This Answer Correct ?    2 Yes 0 No

What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / guest

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

Is This Answer Correct ?    2 Yes 3 No

What is house keeping in assembler? And explain the following code HELLOTSO START 0 ..

Answer / the teacher

All of you helpful people just did the guest's homework for
him. I hope you're happy. :)

Help the students by giving them direction, and not by
doing their homework for them!
Thank you.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Assembler Interview Questions

Ap wkur,=p5 where wkur is a label?

0 Answers   IBM,


Why can only 256 bytes be moved from one address to another in a MVC?

6 Answers   CSC, HCL, IBM,


Can we use an equated value as operand for an MVC instruction? Reason for the same

8 Answers   IBM,


In the house keeping section of an MVS assembly language program, like the one below STM R14,R12,12(R13) BASR R12,R0 USING *,R12,R11 LA R11,2048 LA R11,2048(R11,R12) .... .... 1. What if BASR R12,R0 IS NOT PRECEDE USING *,R12,R11? 2. USING (base address), REGISTER does USING directive says assembler to treat particular Register as a base register with the mentioned base address..in the above case * i.e current location counter..well if that is the case why we need BASR R12,R0 ? 3. What if I write like STM R14,R12,12(R13) BASR R12,R0 LA R11,2048 LA R11,2048(R11,R12) USING *,R12,R11 there is no address resolution being calculated in both LA statements so is it a right way to set Base register?..will there be any issues with Domain regarding R11 and R12?

0 Answers  


explain about maximum displacement and how to cross this limit?

0 Answers   IBM,






what is need of START 0?. In steed of '0' can we use any other numerics?. if we use what will happen?.

4 Answers   CSC, TCS,


How many maximum base registers we can have in a single program?

0 Answers  


cobol and assembler access

2 Answers   EDS,


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 Answers  


how to produce SOC7 abend

1 Answers   EDS, IBM,


What is need of start 0?

0 Answers  


How many maximum base registers we can have in a program?

0 Answers  


Categories