Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What is icm instruction?

0 Answers  


What is the use of TRT instruction and how it is working?

7 Answers   HCL, IBM, Wipro,


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

4 Answers  


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 do you round the addition or subtraction of two numbers in assembler?

0 Answers  


What does LA R3,R3 ?

1 Answers   Amdocs,


What does "using" do?

0 Answers  


explain about maximum displacement and how to cross this limit?

0 Answers   IBM,


What is base register?

23 Answers   IBM, Infosys,


about ICM instruction.

4 Answers   EDS,


What will happen if we drop the base register in the program which contains only one basereg?

0 Answers  


How do you initialize a register to 0000?

10 Answers   HCL,


Categories