diff --git a/plat/msdos386/libsys/build.lua b/plat/msdos386/libsys/build.lua index c2ae13f52..2725c0f70 100644 --- a/plat/msdos386/libsys/build.lua +++ b/plat/msdos386/libsys/build.lua @@ -1,6 +1,7 @@ acklibrary { name = "lib", srcs = { + "./rename.s", -- "./brk.c", -- "./close.s", -- "./creat.c", diff --git a/plat/msdos86/libsys/build.lua b/plat/msdos86/libsys/build.lua index e7d9b8fc7..58bf3e6e5 100644 --- a/plat/msdos86/libsys/build.lua +++ b/plat/msdos86/libsys/build.lua @@ -6,6 +6,7 @@ acklibrary { "./getpid.s", "./_hol0.s", "./isatty.s", + "./rename.s", "./sys_exists.s", "./sys_getdate.s", "./sys_gettime.s", diff --git a/plat/msdos86/libsys/rename.s b/plat/msdos86/libsys/rename.s new file mode 100644 index 000000000..edb14266b --- /dev/null +++ b/plat/msdos86/libsys/rename.s @@ -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