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-17 20:34:06 +00:00
|
|
|
int 3
|
2022-08-07 20:10:08 +00:00
|
|
|
mov bx, sp
|
|
|
|
mov dx, 2(bx)
|
|
|
|
mov ax, 0x4300
|
|
|
|
int 0x21
|
|
|
|
sbb ax, ax
|
|
|
|
inc ax
|
|
|
|
ret
|