Merge pull request #268 from tkchia/tkchia/self-host
plat/msdos86: add rename( )
This commit is contained in:
		
						commit
						a47bb5493d
					
				
					 2 changed files with 27 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -13,6 +13,7 @@ acklibrary {
 | 
			
		|||
		"./lseek.c",
 | 
			
		||||
		"./open.c",
 | 
			
		||||
		"./read.c",
 | 
			
		||||
		"./rename.s",
 | 
			
		||||
		"./setmode.c",
 | 
			
		||||
		"./signal.c",
 | 
			
		||||
		"./sys_exists.s",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										26
									
								
								plat/msdos86/libsys/rename.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								plat/msdos86/libsys/rename.s
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
#
 | 
			
		||||
! $Source$
 | 
			
		||||
! $State$
 | 
			
		||||
! $Revision$
 | 
			
		||||
 | 
			
		||||
! Declare segments (the order is important).
 | 
			
		||||
 | 
			
		||||
.sect .text
 | 
			
		||||
.sect .rom
 | 
			
		||||
.sect .data
 | 
			
		||||
.sect .bss
 | 
			
		||||
 | 
			
		||||
.sect .text
 | 
			
		||||
 | 
			
		||||
! Rename a file.
 | 
			
		||||
 | 
			
		||||
.define _rename
 | 
			
		||||
_rename:
 | 
			
		||||
	mov bx, sp
 | 
			
		||||
	push di
 | 
			
		||||
	mov dx, 2(bx)
 | 
			
		||||
	mov di, 4(bx)
 | 
			
		||||
	movb ah, 0x56
 | 
			
		||||
	int 0x21
 | 
			
		||||
	pop di
 | 
			
		||||
	jmp .sys_zret
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue