From 63f646de78f0f4dd01230489c9f517d7db0a8d14 Mon Sep 17 00:00:00 2001 From: tkchia Date: Sun, 7 Aug 2022 16:38:31 +0000 Subject: [PATCH] plat/msdos86: add rename( ) --- plat/msdos86/libsys/build.lua | 1 + plat/msdos86/libsys/rename.s | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 plat/msdos86/libsys/rename.s diff --git a/plat/msdos86/libsys/build.lua b/plat/msdos86/libsys/build.lua index eddbbf262..e39d90837 100644 --- a/plat/msdos86/libsys/build.lua +++ b/plat/msdos86/libsys/build.lua @@ -13,6 +13,7 @@ acklibrary { "./lseek.c", "./open.c", "./read.c", + "./rename.s", "./setmode.c", "./signal.c", "./sys_exists.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