www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/28/12:28:17

Date: Mon, 28 Aug 2000 21:02:21 +0530
Message-Id: <200008281532.VAA01198@midpec.com>
From: Prashant TR <tr AT midpec DOT com>
To: martin DOT alt AT siemens DOT at
CC: djgpp AT delorie DOT com
In-reply-to: <39AA6C2C.CF273476@siemens.at> (message from Martin Alt on Mon,
28 Aug 2000 15:42:04 +0200)
Subject: Re: adress enabling (Win98)
References: <39AA2AD6 DOT A2FFD5B AT siemens DOT at> <enokqs8dk0jah52r8sc22ka2fu48lickep AT 4ax DOT com> <39AA6C2C DOT CF273476 AT siemens DOT at>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

| From: Martin Alt <martin DOT alt AT siemens DOT at>
| Date: Mon, 28 Aug 2000 15:42:04 +0200
| DJ-Gateway: from newsgroup comp.os.msdos.djgpp
| 
| -----------
| #define ISAADDR 0xd800
| 
| static unsigned portRead = ISAADDR,portWData  = ISAADDR + 1,portWCtr  = ISAADDR +
| 2,portOE = ISAADDR + 3;
| 
| void bos021_wr(unsigned short reg,unsigned short data)
| {
|   outpw(portWData,data);                                /* write data to Data latch
| */
|   outpw(portWCtr,(unsigned short)(0x01<<(reg-1)));      /* write reg to Controll
| latch */
|   outpw(portOE,(unsigned short)0x03);                   /* enable output */
| }
| ------------
| I didn't get an error, but there is also no outbut (chipselect,...).
| With MS-DOS it works well, so it has something to do that I am not allowed to write
| on this adress.
| I reserved to range in BIOS and/or Win98 but it seems that only a device driver has
| access!?!

You guessed it. This code won't work on Windows. So, it's not really a
problem. Usually, Windows will return some default value like 0 or
0xff when you try accessing one of these "forbidden" ports so that
program still works, but doesn't generate the right output. Btw, I
thought the default ISA read port was 0x20b.

-- 
Prashant TR <tr AT midpec DOT com>
Web: http://www.midpec.com/

- Raw text -


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