Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!SDSC-SDS.ARPA!GKN From: GKN@SDSC-SDS.ARPA (Gerard K. Newman) Newsgroups: mod.computers.vax Subject: Re: References to processor specific registers Message-ID: <8611182125.AA02154@ucbvax.Berkeley.EDU> Date: Mon, 17-Nov-86 19:42:05 EST Article-I.D.: ucbvax.8611182125.AA02154 Posted: Mon Nov 17 19:42:05 1986 Date-Received: Tue, 18-Nov-86 21:57:59 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: San Diego Supercomputer Center Lines: 50 Approved: info-vax@sri-kl.arpa From: "ERD131::OBERMAN" Date: 11 Nov 86 16:08:00 PST Subject: References to processor specific registers I am working on a VMS device driver that makes reference to the hardware Interval Counter Register. As this register is processor dependent it is defined as PRx$_ICR, where x is the processor type. (e.g. PR750$_ICR) I can pull out the definition appropriate to the processor I'm using (a 750), but this will make the driver non-transportable. I'm not fond of that. I know that VMS accesses these registers. So do some layered products. SPM and PCA come to mind. How can I write code (MACRO) to access these without being processor dependent? Kevin: The only way that comes to mind immediately is to use the CPUDISP macro. Here is an example: CPUDISP <<8NN,88$>,- ;8800 <790,86$>,- ;8600 <785,85$>,- ;11/785 <780,78$>,- ;11/780, 11/782 <8SS,82$>,- ;8200, 8300 <750,75$>,- ;11/750 <730,73$>,- ;11/730, 11/725 ,- ;uVAX-II > ;uVAX-I 88$: MFPR #PR8NN$_ICR,R0 ;8800 BRB ... 86$: MFPR #PR790$_ICR,R0 ;8600 BRB ... and so forth. Just out of curiosity, what are you using the ICR for? If you're using it to delay for a period of time you might consider using the TIMEDWAIT macro instead... gkn -------------------------------------- Arpa: GKN@SDSC-SDS.ARPA Bitnet: GKN@SDSC USPS: Gerard K. Newman San Diego Supercomputer Center P.O. Box 85608 San Diego, CA 92138 AT&T: 619.534.5076 -------