Mail Archives: djgpp/2002/08/23/17:12:45
From: | "H.Shiozaki" <hshiozaki AT nifty DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | IO_Port Access in DJGPP + Windows 2000
|
Date: | Sat, 24 Aug 2002 03:49:41 +0900
|
Organization: | @nifty netnews service
|
Lines: | 49
|
Message-ID: | <ak6079$gjb$2@news521.nifty.com>
|
NNTP-Posting-Host: | ntttkyo08101.ppp.infoweb.ne.jp
|
Mime-Version: | 1.0
|
X-Trace: | news521.nifty.com 1030128681 17003 202.233.225.101 (23 Aug 2002 18:51:21 GMT)
|
X-Complaints-To: | -
|
NNTP-Posting-Date: | Fri, 23 Aug 2002 18:51:21 +0000 (UTC)
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.00.2919.5600
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2919.5600
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
First of all, sorry my bad English, and I am a newbie.
---
I worry about: generally speaking as,
In Windows NT,2000,
To access IO_Port from a normal win32 program,
there need IO_access_DLL or IO_Driver.
---
In Linux, a program can direct access IO_Port with
using ioperm() function.
---
I made a program included IO_Port_Access, by DJGPP_V204.
A program can run in Win_98_DOS-BOX and Win_98_command_prompt_only.
I re-compiled that program in DJGPP_V204 + Win2K,
But, new program can not do nothing to the IO_PORT in Win2K_DOS-BOX.
---
Win2k have 2 type command_line,
one is CMD.exe and another is Command.com in system32.
===
Q1.
Is there any means to IO_Port access in DJGPP + Windows 2000 environment ?
or how to access IO_port in Win2k_command_line?
Q2.
If IO_Port_acces can do, I want HOWTO information or sample program.
Q3. Which to be use in Win2K, CMD.exe and Command.com?
(What are difference between CMD.EXE and Command.com?
or are there information about it ?)
===
A sample program below can run in Win98(DOS-BOX)
But can not run in W2K(DOS-BOX)
Please change this program to run under Win2K.
---
#include <stdio.h>
#include <pc.h>
void main(void);
void main(void)
{
int i;
unsigned char c=0;
while(1){
if(kbhit()) break;
for(i=0; i<500; i++) inportb(0x378); /*delay*/
outportb(0x378, c++);
}
}
---
Regard
H.Shiozaki
- Raw text -