Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!purdue!gatech!cwjcc!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.sys.ibm.pc Subject: Re: switchar in DOS 3.2 Message-ID: <12849@ncoast.UUCP> Date: 22 Oct 88 18:29:29 GMT References: <4483@polya.Stanford.EDU> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.sys.ibm.pc Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 40 As quoted from <4483@polya.Stanford.EDU> by lma@polya.Stanford.EDU (Larry M. Augustin): +--------------- | I was recently forced to upgrade from PC DOS 2.1 to 3.2. One of my | favorite config.sys commands, switchar=-, doesn't seem to work in 3.2. | Did Microsoft fix this feature? Is there a way I can change \ to / | without buying a UNIX shell? +--------------- It was removed from CONFIG.SYS, but the (undocumented?) system call still exists. DOS interrupt 21H, function 37H. This simple assembler program, suitable for typing into DEBUG's A command, will change the switchar to '-': (All numbers are in hex) MOV DL,2D MOV AX,3701 INT 21 MOV AX,4C00 INT 21 Note the last two hex digits of the "next address" printed by the A command, issue an RCX command and set CX to the value of those last two digits, then issue the commands: NSWITCHAR.COM and W. Voila! You can run SWITCHAR from AUTOEXEC.BAT to set the switch character. (Hold on while I test this on my trusty Toshiba, just to make sure... yup. Should be 000C bytes.) Note that this will work on *any* version of DOS from 2.0 on, not just for 3.2. ++Brandon (P.S. I also tested the program; it works, doesn't crash, changes switchar.) (P.P.S. Note that this program is only one-way: you cannot change the switchar *back* with it. Change the "2D" to "2F" in the instructions above to get a program that changes the switchar back to "/". Or look for one of the many PD programs (heck, I wrote one myself once) that takes an argument to decide which switchar to use.) -- Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu allbery@skybridge.sdi.cwru.edu allbery@uunet.uu.net comp.sources.misc is moving off ncoast -- please do NOT send submissions direct (But the aliases are NOT on UUNET yet, use the aliases at backbone sites!)