"Jerome H. Fine" <jhfinedp3k at compsys.to> skrev:
When I run under Ersatz-11, John Wilson allows
INSTALL EMEM.DLL
(this was under V3.1 of E11 and hopefully soon with EMEM32.DLL
under V5.1 of E11) to access many MegaBytes of PC memory via an
IOPAGE register.
For example:
BaseReg = 177100
BaseRe2 = BaseReg+2
BaseRe4 = BaseReg+4
BaseRe6 = BaseReg+6
Mov @#BaseReg,R0 ;Get the current value from PC memory
Mov R0,@#BaseReg ;Put the current value into PC memory
BaseRe4 / BaseRe6 are used as a 32 bit address into the PC memory allocated
during the INSTALL process.
Under RT-11, direct access to the IOPAGE (address above 160000) is
allowed even using VBGEXE by a reference to PREVIOUS DATA
space. I have written FORTRAN IV/77 interface subroutines to allow
a user to easily access that memory rather than use VIRTUAL arrays
which are much slower and have much less capacity.
I doubt that RSX-11 or RSTS/E allow a user access to the IOPAGE
even via PREVIOUS DATA space. Can anyone confirm this assumption?
Is there any fast method (only a few extra instructions) that would allow
a user to reference a specific IOPAGE register from a user program? Are
VIRTUAL arrays allowed in FORTRAN under RSX-11? If so, how
is access to the MMU registers controlled and allowed?
Johnny has helped with such RSX-11 questions in the past and the answers
were appreciated very much!
You assume correctly, in that normal, unprivileged programs cannot normally
access the I/O page on a mapped RSX system.
There are some different answers to how to do this in RSX. I'll try to keep it
short.
First of all, we have unmapped and mapped RSX systems. Unmapped systems don't
use the MMU, so obviously you can access the I/O page on those systems.
When we get to mapped systems, it gets trickier.
First of all, privileged programs normally do have access to the I/O page. It's
mapped in at APR 7 in D-space, unless you explicitly don't want it (that's
something you specify when you do the task build (linking in RT-11)).
Second, RSX manages memory in the form of partitions. Programs can map in memory
regions which are located in partitions, as long as they have the right access
privileges (they are protected by a normal protection mask, just as files). The
system manager can create a special partition, which maps onto the I/O page, and
then user programs can map in that region anywhere in their programs, and thus
have access to the I/O page that way, if they want to.
Virtual arrays in FORTRAN is mapped to a file unless I remember wrong, which
means they don't have anything to do with the MMU.
However, in RSX you can manipulate and remap your address space from a program
if you want to. There are services in RSX to do that in a controlled way. You
attach to a memory region, and then you map whatever part of that region to
whatever part of your virtual address space you want to.
But as I said before, in order to get access to the I/O page in this case, the
system manager must have created a region which is located in the I/O page, and
which users are allowed access to.
With all this said and done, the "normal" way in RSX is to have a privileged
program. After all, fooling around in the I/O page is likely something that
"normal" programs shouldn't do, and for which privileges are a sensible way
of
distinguishing if a program may.
I can't really say for sure about RSTS/E, but I think it's atleast somewhat
similar to RSX.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol