2022-08-07 20:10:08 +00:00
|
|
|
#
|
|
|
|
! $Source$
|
|
|
|
! $State$
|
|
|
|
! $Revision$
|
|
|
|
|
2022-08-26 17:20:56 +00:00
|
|
|
#include "libsysasm.h"
|
2022-08-07 20:10:08 +00:00
|
|
|
|
|
|
|
! Rename a file.
|
|
|
|
|
|
|
|
.define _rename
|
|
|
|
_rename:
|
2022-08-18 22:08:57 +00:00
|
|
|
push edi
|
|
|
|
|
|
|
|
! Destination filename.
|
|
|
|
|
2022-08-26 17:20:56 +00:00
|
|
|
mov eax, 4+8(esp)
|
|
|
|
#define DEST_NAME_OFFSET (TRANSFER_BUFFER_SIZE / 2)
|
|
|
|
mov edx, DEST_NAME_OFFSET
|
|
|
|
mov ecx, edx
|
|
|
|
call .sys_sncpyout
|
|
|
|
jc 9f
|
|
|
|
xchg edi, eax
|
2022-08-18 22:08:57 +00:00
|
|
|
|
2022-08-26 17:20:56 +00:00
|
|
|
! Source filename.
|
|
|
|
|
|
|
|
mov eax, 4+4(esp)
|
|
|
|
xor edx, edx
|
|
|
|
call .sys_sncpyout
|
|
|
|
jc 9f
|
|
|
|
xchg edx, eax
|
|
|
|
|
2022-08-18 22:08:57 +00:00
|
|
|
! Make the DOS call.
|
|
|
|
|
2022-08-07 20:10:08 +00:00
|
|
|
movb ah, 0x56
|
2022-08-26 17:20:56 +00:00
|
|
|
call .sys_dpmidos
|
|
|
|
|
2022-08-18 22:08:57 +00:00
|
|
|
pop edi
|
2022-08-07 20:10:08 +00:00
|
|
|
jmp .sys_zret
|
2022-08-26 17:20:56 +00:00
|
|
|
|
|
|
|
9:
|
|
|
|
pop edi
|
|
|
|
jmp .sys_toolongret
|