Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!ames!ucbcad!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP (Don Kneller%Langridge) Newsgroups: comp.sys.ibm.pc Subject: Re: MS Windows and Physical memory? Message-ID: <9965@cgl.ucsf.edu.ucsfcgl.UUCP> Date: Thu, 11-Dec-86 16:35:21 EST Article-I.D.: cgl.9965 Posted: Thu Dec 11 16:35:21 1986 Date-Received: Sat, 13-Dec-86 22:23:20 EST References: <105500001@datacube> Reply-To: kneller@cgl.ucsf.edu.UUCP (Don Kneller) Organization: Computer Graphics Laboratory, UCSF Lines: 24 In article <105500001@datacube> berger@datacube.UUCP writes: > >Has anyone had experience using Microsoft Windows where they need >to talk to hardware using pointers? Does Windows allow explicet >pointers to physical memory? > >For example > >char *p; > > p = 0xa0000; /* Set p to point to some hardware location */ > > *p = 0xff; /* Set the register to some value */ I don't know about Windows, but this may not work because pointers may not be stored in the same format as longs. For Microsoft C, the above *won't* work. I assume your trying to reference segment A000, offset 0. In MSC you would say FP_SEG(p) = 0xA000; FP_OFF(p) = 0x0; This is definitely not the same as p = 0xA0000. -- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller ARPA: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET