call function "bioscom ", why does it not work ?
why can I not see the result ? No matter I press any key , the screen can not show the key
, while ESC still works well ( It can exit the programm ).
__________________________________________________________________
#define COM1 0
#define COM2 1
#define SET 0
#define SEND 1
#define RECEIVE 2
#define STATUS 3
#define ESC '\x1B'
#define BAUD_300 0x40
#define BAUD_1200 0x80
#define PARITY_NONE 0x00
#define PARITY_ODD 0x08
#define PARITY_EVEN 0x18
#define BITS_7 0x02
#define BITS_8 0x03
#define STOP_1 0x00
#define STOP_2 0X04
main()
{
int register out, in;
bioscom(SET, BAUD_1200 | BITS_7 | STOP_1 | PARITY_NONE,
COM1);
cprintf("... BIOSCOM [ESC] to exit ...\n");
while (1)
{
if (kbhit())
{
if ((in = getch())== ESC) exit(0);
bioscom(SEND, in, COM1);
}
if ( (out = bioscom(RECEIVE, 0, COM1) & 0x7F) != 0)
putch(out);
}
}
______________________________________________________________________