阅读:1087回复:2
请教大家一个串口的问题
下面一段程序:
#include <stdio.h> #include <dos.h> void main(void) { unsigned int far *ptraddr; /* Pointer to location of Port Addresses */ unsigned int address; /* Address of Port */ int a; ptraddr=(unsigned int far *)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 %Xh\n",a+1,address); *ptraddr++; } } 原文说明:read these locations to obtain the addresses of your communications ports 我想知道得出来的结果会是什么样子的,是不是就是串口的标准地址?3F8,2F8,3E8,2E8? 谢谢! |
|
沙发#
发布于:2004-02-25 15:45
在CSDN上不是有答案了吗??
|
|
板凳#
发布于:2004-02-27 08:51
请大侠指条明路,在MSDN里面怎么找?
|
|