From: pausch AT saafNOSPAM DOT se (Paul Schlyter) Newsgroups: comp.os.msdos.programmer,comp.os.msdos.djgpp Subject: Re: adress enabling (Win98) Date: 28 Aug 2000 19:23:05 +0200 Organization: Svensk Amat|rAstronomisk F|rening (SAAF) Lines: 47 Message-ID: <8oe75p$nhe$1@merope.saaf.se> References: <39AA2AD6 DOT A2FFD5B AT siemens DOT at> <39AA6C2C DOT CF273476 AT siemens DOT at> NNTP-Posting-Host: merope.saaf.se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <39AA6C2C DOT CF273476 AT siemens DOT at>, Martin Alt wrote: >> I don't understand what you mean. Are you using a DOS application to >> write to a specific address? It should work just fine in a plain DOS >> session as well as a Windows '9x session. Perhaps you could post the >> relevant portion of code, along with a better description of what you >> are doing and what the exact result is? > > I didn't want to boring with long code, but it looks like: > > ----------- > #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!?! That's most likely the case. In Protected Mode, applications don't have unrestricted access to port I/O. Which is as it should be, since there would easily be chaos if multiple applications did access the same hardware device simultaneously. So you'll have to learn how to write a VxD (Virtual Device Driver) under Win98. From within a VxD, you *will* have unrestricted access to the system. Which of course also means it's easy to crash the entire system from within a VxD. -- ---------------------------------------------------------------- Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF) Grev Turegatan 40, S-114 38 Stockholm, SWEDEN e-mail: pausch at saaf dot se or paul.schlyter at ausys dot se WWW: http://hotel04.ausys.se/pausch http://welcome.to/pausch