Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!syntron!orcisi!michael From: michael@orcisi.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: MS Windows and Physical memory? Message-ID: <897@orcisi.UUCP> Date: Sun, 15-Feb-87 17:48:38 EST Article-I.D.: orcisi.897 Posted: Sun Feb 15 17:48:38 1987 Date-Received: Sun, 15-Feb-87 22:35:17 EST References: <105500001@datacube> <9965@cgl.ucsf.edu.ucsfcgl.UUCP> <232@netxcom.UUCP> Organization: Optical Recording Corporation, Toronto, Ontario Lines: 22 > >>Has anyone had experience using Microsoft Windows where they need > >>to talk to hardware using pointers? Does Windows allow explicet > >>pointers to physical memory? > > Well, I *have* done just this in Microsoft C. The thing to remember is > that "0xA0000" is a 20 bit value, so you must either: > > 1) Use the Large model, or > > 2) Declare a Far pointer, and enable 'NEAR' and 'FAR' during compile, ie: > > static char far *p = 0xa0000; > > (or, in deference to Don's suggestion) > > static char far *p = FP_SEG(0xa000) + FP_OFF(0x0); In general, this can be used to talk to hardware but won't work for data that is not FIXED or locked. In practice, you have to arbitrate task access to the hardware device when more than one copy of the application is running under Windows.