Category : C Source Code
Archive   : CSWITCH.ZIP
Filename : MTTEST.C
Output of file : MTTEST.C contained in archive : CSWITCH.ZIP
** This is a demonstration program for CSWITCH multitasking library.
** Copyright 1990 by Herb Rose
*/
#include "stdio.h"
#include "tcb.h"
extern int swap_count;
char msgbuf[1024];
main()
{
int k,j;
int t[16];
for(k=0; k<10; k++) t[k]=0;
k=0;
puts("Multitasking test.\nPress any key to end.");
start_mt();
j=loadprg("test1.exe",3);
j=loadprg("test2.exe",3);
for(;;)
{
if(kbhit()) break;
if(testmsg(1)>0)
{
recvmsg(1,msgbuf,1000);
j=msgbuf[4] & 0xf;
t[j]++;
printf("%d:%s t1=%d t2=%d swaps=%d\n",
++k,msgbuf,t[1],t[2],swap_count);
}
}
end_mt();
getch();
}
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/