Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.lang.c Subject: Re: PC DOS "Bad command or file name" interrupt wanted Message-ID: <232e6542@ralf> Date: 14 Sep 88 13:25:38 GMT Sender: netnews@pt.cs.cmu.edu Lines: 18 In-Reply-To: <1359@ucsfcca.ucsf.edu> In article <1359@ucsfcca.ucsf.edu>, simrin@mis.ucsf.edu (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. Except that COMMAND.COM issues the message after it searches the PATH, not after the EXEC fails. If the file is not found, EXEC is never called. -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school) ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/31 Disclaimer? I |Ducharm's Axiom: If you view your problem closely enough claimed something?| you will recognize yourself as part of the problem.