REN


    DOSSEG
    .MODEL SMALL
    .STACK 200h
    .DATA


Oldname   db  "AUTOEXEC.BAK",0

Newname   db  "AUTOEXEC.TST",0

Message     db  "RENAMING!" 
           
                  
    .CODE
    
START:
;display message
    mov     ax,seg Message  
    mov     ds,ax                     
    mov     dx,offset Message  
    mov     ah,9        
    int     21h        
                       

;rename file

    mov	    ax,seg Oldname
    mov     ds,ax 	  	
    mov     ax,seg Newname	
    mov	    es,ax
    mov     dx,offset Oldname
    mov     di,offset Newname	 
    mov     ah,56h	
    int     21h

;return to dos
    mov     ax,4c00h    
    int     21h         

END START