by BillW » Thu Nov 24, 2011 7:26 pm
Strictly speaking, when your program is entered, the register contents are stored in the callers save area pointed to by r13. You then chain your save area up (your save area may be static or dynamic), but the point here is that you do not save the contents of the callers registers in your save area. When you make a call to another routine, that routine stores the contents of the registers into your save area, then chains up his save area. To prove this to yourself, think about the conditions at entry. The first thing ones does is to stm r14,r12,12(r13) to save the callers register values into his area (granted, the initial caller smartly got this for you to isolate himself from any nefarious manipulation of the reg contents, so instead what happens when you call someone and that program calls someone further. You save your callers reg contents.