Category : Recently Uploaded Files
Archive   : JMD311YF.ZIP
Filename : SHOW.C

 
Output of file : SHOW.C contained in archive : JMD311YF.ZIP
/****************************************************************************/
/* */
/* This program shows that JMODEM will execute without crashing the */
/* system from a DOS Shell executed from any properly written BBS */
/* system or BBS window. This program allocates memory just like BBS */
/* systems do, it writes to the memory, then spawns JMODEM as a sub- */
/* process from a DOS Shell ( Microsoft C _system(); ). Then it returns */
/* and the parent process again writes to memory. The program then exits */
/* to DOS. There will ne NO errors and NO crashes. */
/****************************************************************************/

#include /* for _puts() */
#include /* for _system() */
#ifdef __TURBOC__ /* 3.11y(c) */
#include
#else
#include /* for _malloc() */
#endif

void main(void);

#ifdef __TURBOC__
#define BYTES 62000U /* 3.11y(c) was 61000 ok tc 2.01 */
#else
#define BYTES 60500U /* 3.11y(c) MSC 7 does NOT allow 61000! */
#endif


void main (void) /* 3.11y(c) */
{
unsigned short i;
unsigned char *memory;

/* Get some memory (a lot) */
memory = (unsigned char *) malloc((unsigned short)BYTES);
if (!memory)
{
puts ("Memory allocation failed!");
return;
}

system ("CLS");
puts ("I am writing to memory I own ...");

for (i = 0; i< BYTES; i++)
*memory++ = (unsigned char) i; /* Write to the memory */

puts ("Now I'll execute JMODEM ...");
puts ("Type CTRL-BRK to exit from JMODEM (it will take 5 seconds)....");
for (i=0; i<18; i++)
puts("JMODEM JMODEM JMODEM JMODEM JMODEM JMODEM JMODEM JMODEM");

system("JMODEM S1 NUL");

for (i = 0; i< BYTES; i++)
*(--memory) = (unsigned char) i; /* Write to the memory again */

puts ("\nAs you can see, the system did not crash ....");
free (memory);
}


  3 Responses to “Category : Recently Uploaded Files
Archive   : JMD311YF.ZIP
Filename : SHOW.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/