Category : C Source Code
Archive   : TBUG.ZIP
Filename : DEMO.C
TURBO C DEBUG DEMO PROGRAM
by: Gary L. Mellor 1987
*/
#include
/* THESE ARE THE GLOBAL VARIABLES
FOR THE DEMO PROGRAM
*/
int gint;
int *gptr;
char gchar;
float gfloat;
char gtemp[80];
/*
MAIN DEMO
*/
int main()
{
int i;
puts("THIS IS THE TBUG DEMO PROGRAM\n");
puts("When you are at the debug prompt 'TBUG?' type 'HELP'");
puts("to get a listing of the tbug commands\n");
puts("Feel free to use the 'BREAK' command to set a");
puts("breakpoint at a line number and to execute");
puts("the main program, and try the other commands\n");
puts("HAVE FUN!!!\n");
debug_init("DEMO");
printf("\n PLEASE ENTER A VALUE FOR global1 ");
gets(gtemp);
gptr = &gint;
gint = atoi(gtemp);
gchar = gtemp[1];
gfloat = strlen(gtemp) + 1;
gint++;
gfloat = gfloat / 3;
for (i = 0; i < 3; i++)
sub1(gint++);
puts("MAIN RETURNING");
return(0);
}
int sub1(x)
int x;
{
printf("SUB1 PARAMETER = %d\n",x);
return(x);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/