Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!shelby!agate!ucbvax!VTVM1.CC.VT.EDU!VALDIS From: VALDIS@VTVM1.CC.VT.EDU (Valdis Kletnieks) Newsgroups: comp.lang.asm370 Subject: Re: help for new assembly'er Message-ID: <9102271741.AA03538@ucbvax.Berkeley.EDU> Date: 27 Feb 91 17:32:59 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 22 On Wed, 27 Feb 91 04:32:34 GMT Laird J. Heal said: >Since registers zero, one and two can be modified by everything from >SVCs to TRTs, use them for scratch areas. R15 is your entry address >but you should save it off - R12 is typically used for this and thus >as the code base register. R14 is the return address but can be used >within your code as can R15, as the OS never really relies on them. >R13, on the other hand, should always point to your Register Save >Area, unless you are working with DOS/VSE/POWER, in which case I >commend your soul to the appropriate power. Please note that at least in OS/MVT and VS/1 and (presumably) the various MVS variants, and the OS Simulation routines under VM/CMS, that the various QSAM I/O macros (such as GET and PUT), involve a BALR 14,15 - so these registers should *not* be used except as scratch unless you *know* that any system macros you use don't modify these registers. Incidentally, macros like this are the *REASON* you usually use R12 as the base rather than R15.... Valdis Kletnieks Computer Systems Engineer Virginia Polytechnic Institute