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 given file descriptor number refers to a valid open file
|
|
|
|
! descriptor.
|
|
|
|
|
|
|
|
.define __sys_isopen
|
|
|
|
__sys_isopen:
|
2022-08-24 15:17:04 +00:00
|
|
|
mov ebx, 4(esp)
|
2022-08-18 22:08:57 +00:00
|
|
|
mov eax, 0x4400
|
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
|