Mail Archives: djgpp/1994/07/13/08:18:07
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 -