Category : C Source Code
Archive   : BOOKCOMM.ZIP
Filename : DUH3.CPP

 
Output of file : DUH3.CPP contained in archive : BOOKCOMM.ZIP
/********************************************************************
* duh3.cpp - An extremely dumb terminal program (C++ Interrupt Version)
* Copyright (c) 1992 By Mark Goodwin
********************************************************************/
#include
#include
#include
#include
#include "sercpp.h"

#define PORT 2 /* serial port */
#define BAUDRATE 2400 /* baud rate */

SERIALPORT port(PORT, 1024);

void main(void)
{
int c;

printf("Duh No. 3 - An Extremely Dumb Terminal Program\n");
printf("Copyright (c) 1992 By Mark Goodwin\n\n");

/* open the serial port */
port.set_port(BAUDRATE);

/* main program loop */
while (TRUE) {
/* process keyboard presses */
if (kbhit()) {
c = getch();
switch (c) {
case 0: /* exit on Alt-X */
if (getch() == 45)
exit(0);
break;
default:
port.put(c); /* send to the serial port */
}
}
/* process remote characters */
if (port.in_ready()) {
c = port.get(); /* get the character */
putch(c); /* display it */
}
}
}


  3 Responses to “Category : C Source Code
Archive   : BOOKCOMM.ZIP
Filename : DUH3.CPP

  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/