dhesi@bsu-cs.UUCP (Rahul Dhesi) (09/14/88)
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. Nitpicking: You can't make MS-DOS jump. Answer: The "Bad command..." error message comes from the MS-DOS command interpreter which lies in the file "command.com". I greatly doubt that you can make "command.com" transfer control to a memory-resident program when it sees an invalid command. Follow-ups to to comp.sys.ibm.pc, please. -- Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi
english@stromboli.usc.edu (Joe English) (09/15/88)
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