2022-08-07 20:10:08 +00:00
|
|
|
#
|
|
|
|
! $Source$
|
|
|
|
! $State$
|
|
|
|
! $Revision$
|
|
|
|
|
|
|
|
! Declare segments (the order is important).
|
|
|
|
|
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
|
|
|
|
.sect .text
|
|
|
|
|
|
|
|
! Say whether a file exists with the given name.
|
|
|
|
|
|
|
|
.define __sys_exists
|
|
|
|
__sys_exists:
|
2022-08-24 15:17:04 +00:00
|
|
|
push esi
|
|
|
|
mov esi, 4+4(esp)
|
|
|
|
movzx edi, (transfer_buffer_ptr)
|
|
|
|
mov edx, edi
|
|
|
|
mov es, (pmode_ds)
|
|
|
|
cld
|
|
|
|
1:
|
|
|
|
lodsb
|
|
|
|
stosb
|
|
|
|
testb al, al
|
|
|
|
jnz 1b
|
2022-08-18 22:08:57 +00:00
|
|
|
mov eax, 0x4300
|
2022-08-24 15:17:04 +00:00
|
|
|
mov ebx, 0x210000
|
|
|
|
callf (interrupt_ptr)
|
|
|
|
push ss
|
|
|
|
pop es
|
2022-08-18 22:08:57 +00:00
|
|
|
sbb eax, eax
|
|
|
|
inc eax
|
2022-08-07 20:10:08 +00:00
|
|
|
ret
|