Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!elroy!cit-vax!oberon!stromboli.usc.edu!english From: english@stromboli.usc.edu (Joe English) Newsgroups: comp.sys.ibm.pc Subject: Re: PC DOS "Bad command or file name" interrupt wanted Message-ID: <12176@oberon.USC.EDU> Date: 15 Sep 88 04:18:02 GMT References: <1988Sep12.202413.23423@gpu.utcs.toronto.edu> <1359@ucsfcca.ucsf.edu> Sender: news@oberon.USC.EDU Reply-To: english@stromboli.usc.edu (Joe English) Distribution: na Organization: University of Southern California, Los Angeles, CA Lines: 27 Summary: In article <1359@ucsfcca.ucsf.edu> simrin@mis.ucsf.edu.UUCP (Steve Simrin) writes: >In article <1988Sep12.202413.23423@gpu.utcs.toronto.edu> sarathy@gpu.utcs.UUCP (Rajiv Sarathy) writes: >> >>I want DOS to jump to my memory-resident-program instead of printing >>"Bad command or file name" whenever appropriate. >> > >DOS uses the EXEC function (Int 21h function 4Bh) to load programs and >external commands. You might try trapping calls to this function and >checking for the error. If the error is there send control to your >handler, then to the standard handler. If there is no error, just chain >to the normal handler. This won't work either. The DOS "Bad Command or Filename" message comes from COMMAND.COM; you can get it from trying to execute a command which doesn't exist, or by typing '*!&?((^', in which case COMMAND won't even *call* EXEC. The only way to avoid this message is to use a menu-driven system; there are several quite good ones around that are either cheap (< $40) or shareware. BTW I found this in comp.lang.c, and am redirecting it to this group because later posters requested it. /|/| "Show me a black as bright as it is hard..." -----< | | j.e. O \|\| ARPA: english%lipari@oberon.usc.edu