Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!ut-sally!ut-ngp!shell!graffiti!peter From: peter@graffiti.UUCP (Peter da Silva) Newsgroups: net.micro.pc Subject: Re: Sidekick vs. Microsoft C Message-ID: <298@graffiti.UUCP> Date: Sun, 13-Oct-85 10:54:32 EDT Article-I.D.: graffiti.298 Posted: Sun Oct 13 10:54:32 1985 Date-Received: Tue, 15-Oct-85 06:31:27 EDT References: <962@vax2.fluke.UUCP> Distribution: net Organization: The Power Elite, Houston, TX Lines: 26 > Does anyone know why memory resident programs such as Sidekick won't come up > when the following program, compiled with Microsoft C (3.0), is being run? > > ... > > Sidekick is loaded, the above program is executed, and then Ctrl-ALT is pressed > to invoke Sidekick. The computer emits 5 slow beeps, and then continues. A > similar version of the program, (using fgets(string,80,stdin)), compiled with > C86 did the same thing. Sidekick won't run when MS-DOS is currently executing, to avoid re-entrancy problems. The BIOS is re-entrant, but MS-DOS isn't. gets and fgets both must use MS-DOS call #whatever-it-is to read a line of text, instead of doing it character-at-a-time in the BIOS as other programs do. You can get the same result by invoking Sidekick at certain times in COMMAND.COM. Workaround #1: After hitting CTRL-ALT, hit return. This will kick the program out of MS-DOS and let Sidekick get in. This will, of course, send a blank line to the program so I hope it can deal with that. Workaround #2: Write your own gets() function, using getch(), and do all the erase and kill processing yourself Workaround #3: Get CED.COM, which among other things replaces this particular MS-DOS call with its own version. It seems to be sufficiently re-entrant to avoid worrying SideKick (or maybe SK just doesn't recognise it as part of DOS).