admin管理员组

文章数量:1516870

c语言调用bios下的串口,CFREE4中没有BIOS.H,无法开串口,该怎么做??

#include

#include

#include

#define COM1       0

#define DATA_READY 0×100

#define TRUE       1

#define FALSE      0

#define SETTINGS ( 0×80 | 0×02 | 0×00 | 0×00)

int main(void)

{

int in, out, status, DONE = FALSE;

bioscom(0, SETTINGS, COM1);

cprintf(“… BIOSCOM [ESC] to exit …”);

while (!DONE)

{

status = bioscom(3, 0, COM1);

if (status & DATA_READY)

if ((out = bioscom(2, 0, COM1) & 0x7F) != 0)

putch(out);

if (kbhit())

{

if ((in = getch()) == ‘’)

DONE = TRUE;

bioscom(1, in, COM1);

}

}

return 0;

}

tc可以通过,可CFREE不行.有朋友知道该怎么做吗??

本文标签: c语言调用bios下的串口CFREE4中没有BIOSH无法开串口该怎么做