home *** CD-ROM | disk | FTP | other *** search
- From: dhandly@hpcuhe.cup.hp.com (Dennis Handly)
- Date: Sat, 22 Aug 1992 10:11:17 GMT
- Subject: Re: PA assmembly to get current PC-offset (CR18)
- Message-ID: <31480230@hpcuhe.cup.hp.com>
- Organization: Hewlett-Packard Cal Language Lab
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!hpscdc!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!hpcuhb!hpcuhe!dhandly
- Newsgroups: comp.sys.hp
- References: <2787@tivoli.UUCP>
- Lines: 22
-
- >/ stuart@TIVOLI.COM (Stuart Jarriel) / 10:19 am Aug 18, 1992 /
- >Of course MFCTL 18,28 wont do it since you must be at the
- >most privileged level to do a MFCTL for most control registers.
-
- You use a BL to get the old value of PC. In fact if you set up a
- routine you just return the value that is in R2.
-
- >PC-space is much easier (mfsp sr4,r20).
-
- No, it is much harder. SR4 doesn't have to tract PCspace. You have
- to already know that SR4 is the same, or that you can use LDSID on
- the PCoffset that you got from a BL. (This will select SR4 through
- SR7.)
-
- Or you know you were called with a BLE and that SR0 contains the
- space. (This selects any of the SR0 through SR7.)
-
- I suppose there is a way to get PCspace different than any of the
- SR registers. In fact this occurs on an intermodule call on MPE/iX.
- (Except SR4 is soon changed to match.)
-
- But in almost all cases you are correct.
-