home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / hp / 9552 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  1.3 KB

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