From: morphine AT server DOT cs DOT jhu DOT edu (Michael Phelps) Sender: morphine AT server DOT cs DOT jhu DOT edu Date: Wed, 26 Apr 1995 09:59:23 -0400 To: eliz AT is DOT elta DOT co DOT il, morphine AT server DOT cs DOT jhu DOT edu Subject: Re: EMM386 Exception Cc: djgpp AT sun DOT soe DOT clarkson DOT edu >> I'm getting the message "EMM386 Exception #12: Press ENTER to reboot" >> when I system() to a program of mine which uses very little memory. The system >> has 4MB RAM, and doesn't have this problem when run from DOS. Any suggestions? > > >Does this happen no matter what program you try to run with system()? What >happens if you boot your machine without EMM386? > >Can you post the code of the function which calls system()? It only fails with this particular program, and I have no idea why. I found that when I incorporated that program into the one that system()'ed it (ie, merged the two programs) it works fine. But that's not exactly the fix I was looking for. void dispatch(int selection) { char command_line[100]; switch(selection) { .... case 2: /* calculate entropy of data series */ clrscr(); sprintf(command_line, "entropy %s %d", FILE_PATH, resolution); /* resolution is a global int, FILE_PATH is a defined string */ system(command_line); /* execute program */ break; ... } } I have many other case's which perform similar functions with other (similar) programs, and yet this is the only one that causes the EMM386 error. I haven't had access to the target machine for a couple days, but I'll play around with the EMM386 settings, though. I'm stumpted on this one. ---Michael Phelps, MD