Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ecsvax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!ecsvax!bet From: bet@ecsvax.UUCP (Bennett E. Todd III) Newsgroups: net.micro.pc Subject: Re: Changing the MSDOS option character Message-ID: <488@ecsvax.UUCP> Date: Wed, 25-Sep-85 12:57:14 EDT Article-I.D.: ecsvax.488 Posted: Wed Sep 25 12:57:14 1985 Date-Received: Sat, 28-Sep-85 06:49:23 EDT References: <450@philabs.UUCP> <103700016@ima.UUCP> <1332@teddy.UUCP> <458@ttidcb.UUCP> Reply-To: bet@ecsvax.UUCP (Bennett E. Todd III) Distribution: net Organization: Duke University Computation Center Lines: 55 In article <458@ttidcb.UUCP> svirsky@ttidcb.UUCP (William Svirsky) writes: >How do you change the option character to '-'? If you can do this is it also >possible to change the '\\' directory separator to '/'? Thanks. It's easy to change the switch character ("switchar" in MS-DOS parlance) to anything you like; '-' is particularly handy, for conformance with UNIX. As long as the switchar isn't '/' DOS will take either '\' or '/' as the pathname separator. Here's a quick little program to display or set the switchar. It's written in DeSmet C using inline assembler for the DOS function call; it should be easy to use the assembler code with other compilers and the MS-DOS assembler. ---------- switchar.c -- tabs set every 4 columns --- /* * switchar [c] * With no arguments, displays the switch character * With an argument 'c', sets the switch character to 'c' */ main(argc, argv) int argc; char **argv; { if (argc == 1) printf("switchar=%c\n", getswitchar()); else setswitchar(argv[1][0]); } getswitchar() { #asm mov ax,3700h int 21h mov al,dl xor ah,ah # } setswitchar(c) char c; /* BP+4 */ { #asm mov ax,3701h mov dx,[bp+4] int 21h # } ------------- end of switchar.c ------------- -Bennett -- "Hypocrisy is the vaseline of social intercourse." (Who said that?) Bennett Todd -- Duke Computation Center, Durham, NC 27706-7756; (919) 684-3695 UUCP: ...{decvax,seismo,philabs,ihnp4,akgua}!mcnc!ecsvax!duccpc!bet