Date: Wed, 13 Jul 94 07:40:23 EDT From: hvb AT netrix DOT com To: Andreas Pfau Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: help References: <9407121319 DOT AA11634 AT sun DOT soe DOT clarkson DOT edu> Reply-To: hvb AT netrix DOT com Andreas Pfau writes: > Dear Mr.Delorie and any users of GNU C, > > herewith I kindly request a little help with a small problem > of mine. In a 'regular' DOS-C program I used the following routine > to send data to a 16-bit-data-register of a PC-add-on-board which was > developed for test purpose. > > unsigned short far *adr; > unsigned short val=0xffff; /* dummy value */ > adr=0xD0000000; /* simplified; > normally a MACRO MK_FP is used to set SEGMENT > and OFFSET address in the PC memory space */ > *adr=val; /* send 16 bit value val to register at 0xD0000 */ > Or you can use the code below: unsigned short far *adr; unsigned short val=0xffff; /* dummy value */ adr=0xe00d0000; /* simplified; normally a MACRO MK_FP is used to set SEGMENT and OFFSET address in the PC memory space */ *adr=val; /* send 16 bit value val to register at 0xD0000 */ Cheers, ============================================================== Hung Bui Internet: hvb AT netrix DOT com Netrix Corporation Phone: +1 703 793 1016 13595 Dulles Technology Drive Fax: +1 703 713 3805 Herndon Va 22071 ==============================================================