Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!mit-eddie!uw-beaver!Teknowledge.COM!unix!hplabs!hp-ses!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.sys.hp Subject: Re: HP PA assembly language question Message-ID: <1340107@hpclscu.HP.COM> Date: 6 Mar 90 20:37:47 GMT References: <564@opus.NMSU.EDU> Organization: Hewlett-Packard Calif. Language Lab Lines: 35 > BL target,rp LDIL L%target,rp > BLE R%target(GRr,rp) > OR GR31,0,rp This seems to be a typo in the book. The April '89 copy has the following: call: BL target,rp or LDIL l%target,rp BLE r%target(sr4,rp) OR r31,r0,rp return: BV r0(rp) or BE 0(sr0,rp) This should be a little more clear. In each case, the first alternative is pretty obvious. In the call case, the second case is a little more complicated. The BLE instruction has a hardwired link register (r31). Since the HP calling convention uses r2 as the return register ("rp" is an alias for "r2"), there is an instruction in the shadow of the BLE to copy r31 into rp before entering the called function. P.S. The OR r1,r0,rp convention to copy a register into another one is reflected by the assembler pseudo-op COPY: COPY r1,r2 == OR r1,r0,r2 ----- Shankar Unni E-Mail: Hewlett-Packard California Language Lab. Internet: shankar@hpda.hp.com Phone : (408) 447-5797 UUCP: ...!hplabs!hpda!shankar DISCLAIMER: This response does not represent the official position of, or statement by, the Hewlett-Packard Company. The above data is provided for informational purposes only. It is supplied without warranty of any kind.