www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/13/08:18:07

Date: Wed, 13 Jul 94 07:40:23 EDT
From: hvb AT netrix DOT com
To: Andreas Pfau <pfau AT ind DOT e-technik DOT uni-stuttgart DOT de>
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
==============================================================



       

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019