ReC98/libs/BorlandC/unlink.asm

28 lines
348 B
NASM
Raw Normal View History

2014-09-07 17:01:21 +00:00
; int __cdecl unlink(const char *path)
_unlink proc
2014-09-07 17:01:21 +00:00
@@path = DPTR_ 2 + dPtrSize
push bp
mov bp, sp
push si
push di
pushDS_
mov ah, 41h
LDS_ dx, [bp+@@path]
int 21h
2014-09-07 17:01:21 +00:00
popDS_
jb short @@unlinkFailed
xor ax, ax
jmp short @@ret
@@unlinkFailed:
push ax
call __IOERROR
@@ret:
pop di
pop si
pop bp
ret
_unlink endp