下面一段程序:
#include <stdio.h>
#include <dos.h>
void main(void)
{
unsigned int *ptraddr; /* Pointer to location of Port Addresses */
unsigned int address; /* Address of Port */
int a;
ptraddr=(unsigned int *)0x00000400;
for (a = 0; a < 4; a++)
{
address = *ptraddr;
if (address == 0)
printf("No port found for COM%d n",a+1);
else
printf("Address assigned to COM%d is %Xhn",a+1,address);
*ptraddr++;
}
}
原文说明:read these locations to obtain the addresses of your communications ports
我想知道得出来的结果会是什么样子的,是不是就是串口的标准地址?3F8,2F8,3E8,2E8?
谢谢!
没有一个能回答出来的