Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ucsd!nosc!cod!murphys From: murphys@cod.NOSC.MIL (Steven P. Murphy) Newsgroups: comp.sys.ibm.pc Subject: Re: How to change DOS "\" to "/" Keywords: DOS path separator Message-ID: <1383@cod.NOSC.MIL> Date: 31 Jan 89 21:07:50 GMT References: <5927@phoenix.Princeton.EDU> <286@bridge2.3Com.Com> Organization: Naval Ocean Systems Center, San Diego Lines: 147 I saw a binary of switch.com posted so here is a source for those interested. name SWITCH title switch char exchange program page 80,132 ;****************************************************************************** ; ; title: switch.asm ; ; abstract: this program is to change MSDOS's switch char to something ; besides / (usually -) ; ; ; ; author: Steven Murphy [murphys@nosc.cod.mil] ; Naval Ocean Systems Center ; Code 911 ; San Diego, CA 92152-5000 ; (619) 533-2216 ; ;.............................................................................. ; ; l o c a l c o n s t a n t s ; ;****************************************************************************** ; ms-dos interrupts msdos equ 21h ; msdos ; ms-dos functions prtstr equ 09h ; dos print string function ($ - treminated) exitfun equ 4ch ; dos terminate program function ; miscellaneous cr equ 0dh ; ascii carriage return lf equ 0ah ; ascii linefeed bell equ 07h ; ascii bell ;****************************************************************************** ; ; c o d e s e g m e n t d e f i n i t i o n ; ;****************************************************************************** prgname segment public 'code' assume cs:prgname, ds:prgname, es:prgname, ss:prgname org 100h ;****************************************************************************** ; ; m o d u l e e n t r y p o i n t ; ; the following msdos '.com' entry conditions apply: ; cs = ds = es = ss = loaded location ; ;****************************************************************************** main proc near jmp start ; jump around data area ;****************************************************************************** ; ; m o d u l e d a t a a r e a ; ;****************************************************************************** ; console messages signon db cr,lf db ' Switch char',cr,lf db cr,lf,'$' msg1 db 'is ','$' ;****************************************************************************** ; ; s t a r t o f p r o g r a m ; ;****************************************************************************** start: ; send signon message to console mov dx,offset signon mov ah,prtstr ; select the print string function int msdos ; do it xor cx,cx ; zero cx mov si,0080h ; point to command tail mov cl,[si] ; check for space before new switch char and cl,cl ; set the flags for jz jz loop2 ; no space mov si,0081h ; there was a space so get char loop1: mov dl,[si] ; get the new switch char cmp dl,3fh ; is it a '?' jz loop2 ; yes, display the current char cmp dl,20h ; is it above the control chars jg loop3 ; if yes make it the new char inc si ; if no look again loop loop1 loop2: mov dx,offset msg1 ; print msg1 mov ah,prtstr ; int msdos mov ah,37h ; switch char function ; (al = 0 read, al = 1 write) xor dl,dl ; clear dl xor al,al ; clear al int msdos mov ah,02h ; display dl int msdos mov dl,cr ; print carrage return line feed int msdos ; mov dl,lf ; int msdos ; jmp short exit loop3: mov ah,37h ; write the switch char mov al,01h ; int msdos jmp short loop2 ; display the switch char exit: mov ah,exitfun ; 4ch recomended mov al,00h ; error code (0 - normal end) int msdos ; exit to ms-dos main endp prgname ends end main