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-18 22:08:57 +00:00
|
|
|
mov ebx, esp
|
|
|
|
mov edx, 4(ebx)
|
|
|
|
mov eax, 0x4300
|
2022-08-07 20:10:08 +00:00
|
|
|
int 0x21
|
2022-08-18 22:08:57 +00:00
|
|
|
sbb eax, eax
|
|
|
|
inc eax
|
2022-08-07 20:10:08 +00:00
|
|
|
ret
|