Mail Archives: djgpp/2000/08/28/14:30:30.1
In article <39AA6C2C DOT CF273476 AT siemens DOT at>,
Martin Alt <martin DOT alt AT siemens DOT at> 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
- Raw text -