Category : Assembly Language Source Code
Archive   : CBREAK.ZIP
Filename : TRYBREAK.C

 
Output of file : TRYBREAK.C contained in archive : CBREAK.ZIP
/*
* Demonstration Control_Break interrupt handler
* for Lattice C by: Ray Duncan, May 1985 ( DDJ #107 Septemebr 1985 )
*/

#include "stdio.h"

main(argc,argv)
int argc;
char argv[];
{
int hit = 0;
int c = 0;
static int flag = 0;

cls();
puts ("TRYBREAK Written by: Ray Duncan, May 1985 \n");
puts (" DDJ # 107 September 1985 \n");
puts (" \n");
puts (" Transcribed by: Lee J. Sarama, August 1985 \n");
puts (" \n");

capture (&flag);

puts ("TRYBREAK has CAPTURED interrupt vectors \n");

while ( (c&127) != 'Q')
{
hit = kbhit();

if (flag != 0)
{
puts ("Control-Break has been detected. \n");
flag = 0;
}

if (hit != 0)
{
c = getch();
putch (c);
}
}

release ();

puts (" \n");
puts ("TRYBREAK has RELEASED interrupt vectors \n");

}


  3 Responses to “Category : Assembly Language Source Code
Archive   : CBREAK.ZIP
Filename : TRYBREAK.C

  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/