oberman%erd131.DECnet@LLL-ICDC.ARPA ("ERD131::OBERMAN") (11/12/86)
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? Thanks in advance, R. Kevin Oberman LLNL arpa: oberman@lll-icdc.arpa ------
GKN@SDSC-SDS.ARPA (Gerard K. Newman) (11/18/86)
From: "ERD131::OBERMAN" <oberman%erd131.decnet@lll-icdc.arpa> 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 <UV2,nn$>,- ;uVAX-II <UV1,nn$>> ;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 -------