Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!intelca!cem From: cem@intelca.UUCP (Chuck McManis) Newsgroups: net.unix,net.micro,net.micro.pc Subject: Re: Physical memory access under Xenix Message-ID: <25@intelca.UUCP> Date: Wed, 30-Apr-86 11:42:30 EDT Article-I.D.: intelca.25 Posted: Wed Apr 30 11:42:30 1986 Date-Received: Sat, 3-May-86 00:00:07 EDT References: <23@mit-prep.ARPA> Organization: Intel, Santa Clara, Ca. Lines: 42 Xref: watmath net.unix:7733 net.micro:14479 net.micro.pc:8014 > > I have been asked (nay, told) to write a device driver for > IBM Xenix version 1.x for a bitmapped graphics device of the > Tecmar Graphics Master genre. This requires that I be able > to rapidly access physical memory in the range A000:0000 to > A000:FFFF in my pc's memory. Unfortunately, the device > driver documentation does not describe how one goes about > this, and I have visions of tracing Xenix with a logic > analyzer to locate the Local Descriptor table so I can crock a > descriptor for my display buffer into it. Can anyone save me > from this evil fate by describing the obvious and elegant > method that IBM has provided for doing this, but accidentally > forgot to document? Thanx in advance! > > _MelloN_-- > Ted Lemon > Project GNU of the Free Software Foundation > Yup, there are two system calls dscralloc() which allocates a descriptor for you and mmudescr() which points it at a physical address. If you have far keywords enabled you can do something like char far * foo; unsigned select = dscralloc(); mmudescr(select,0xA0000,0xffff,0x92); foo = (far *)(select << 16); foo[offset] = data ; etc This will make foo essentially a 64K character array located absolutely at physical address 0xa0000. Note you will have to be in Kernel mode to do this stuff. And that the declaration for select should be global and not local as this code fragment may seem to imply. --Chuck -- - - - D I S C L A I M E R - - - {ihnp4,fortune}!dual\ All opinions expressed herein are my {qantel,idi}-> !intelca!cem own and not those of my employer, my {ucbvax,hao}!hplabs/ friends, or my avocado plant. :-}