ack/plat/msdos386/libsys/sys_exists.s
tkchia cba54b205b plat/msdos386: refactor, firm up, and optimize
- refactor code for transfer buffer reads/writes, real mode
   int 0x21 calls, and assembler segment declarations
 - define transfer buffer size in one place
 - beef up error checking for transfer buffer operations
   (prevent buffer overflows)
 - also optimize such operations to transfer dword by dword
   where feasible
2022-08-26 17:31:28 +00:00

22 lines
271 B
ArmAsm

#
! $Source$
! $State$
! $Revision$
#include "libsysasm.h"
! Say whether a file exists with the given name.
.define __sys_exists
__sys_exists:
mov eax, 4(esp)
call .sys_scpyout
jc 9f
xchg edx, eax
mov eax, 0x4300
call .sys_dpmidos
9:
sbb eax, eax
inc eax
ret