Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI404.ASC

 
Output of file : TI404.ASC contained in archive : BCPPTECH.ZIP







PRODUCT : TURBO C NUMBER : 404
VERSION : 1.0/1.5
OS : MS-DOS
DATE : January 12, 1988 PAGE : 1/2

TITLE : BIOSCOM EXAMPLE




The following program demonstrates the use of the Turbo C run
time library function bioscom:


/* BIOSCOM.C */

#include
#include

#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");
















PRODUCT : TURBO C NUMBER : 404
VERSION : 1.0/1.5
OS : MS-DOS
DATE : January 12, 1988 PAGE : 2/2

TITLE : BIOSCOM EXAMPLE




while (1)
{
if (kbhit())
{
if ((in = getch())== ESC) exit(0);
bioscom(SEND, in, COM1);
}
if ( (out = bioscom(RECEIVE, 0, COM1) & 0x7F) != 0)
putch(out);
}
}








































  3 Responses to “Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI404.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/