Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!rex!uflorida!gatech!ncsuvx!news From: kdarling@hobbes.ncsu.edu (Kevin Darling) Newsgroups: comp.os.os9 Subject: Re: linking to absolute addresses Message-ID: <1991Jan28.022859.24393@ncsuvx.ncsu.edu> Date: 28 Jan 91 02:28:59 GMT References: <1991Jan24.162635.1742@yogi.fhhosp.ab.ca> Sender: news@ncsuvx.ncsu.edu (USENET News System) Organization: NCSU Computing Center Lines: 29 edstrom@elmer.hsc.ucalgary.ca (John Edstrom) writes: > Is there anyway to link a module to an absolute address? > The reason I ask is that the device I am writing a driver for > (Data Translation's 1492 AD/DA & etc board) has 1/2 Meg of dual > ported memory on board. Idealy the user program would be able > to read/write from the DT1492 memory while the device is acquiring > data. My problem is accessing the memory from a program without > going to system mode. Well, you could hardcode the memory address in your program . Or you could add a getstat call to your driver, which simply returns the base address of the memory... this at least would remove address-dependence in your applications. (or ahhh... is the ram protected by the machine, and only directly accessible in system state?) > An alternative would be to jump into system mode, copying the data I > wanted into a user-space buffer, returning to user mode and continuing > with the data manipulations. Although my real-time application will > probably not suffer from this it seems like a barbaric thing to do. Slower, but not barbaric at all. A getstat that copied the data to the requesting user would also let the driver handle incrementing its own pointer through the data. Customize to your needs: perhaps one getstt to return all data, another to return current info right THEN, another to return next in queue with a timestamp, and so on. That gives you device independence also. kevin PS: did you ever find your bus error?