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
Answer Posted / 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 |
Post New Answer View All Answers
how to retrieve the instream data in sysin?
Why do we use "drop"?
Explain how to produce soc7 abend?
What is need of start 0? In steed of can we use anyother numerics? If we use what will happen?
What is icm instruction?
how to initialize a register to 0000?
How do you round the addition or subtraction of two numbers in assembler?
Explain how to pass instream data in sysin with assembler?
What is maximum displacement and how to cross this limit?
What does "using" do?
Explain how to initialize a register to 0000?
what is need of start 0? In steed of
explain icm instruction?
What is need of start 0?
Explain about house keeping in assembler?