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
|
|
|
|
|
|
|
|
! Remove a file.
|
|
|
|
|
|
|
|
.define _unlink
|
|
|
|
_unlink:
|
2022-08-18 22:08:57 +00:00
|
|
|
! Copy filename to transfer buffer.
|
|
|
|
|
|
|
|
mov ebx, esp
|
|
|
|
push esi
|
|
|
|
push edi
|
|
|
|
|
|
|
|
mov esi, 4(ebx)
|
|
|
|
movzx edi, (transfer_buffer_ptr)
|
|
|
|
mov es, (pmode_ds)
|
|
|
|
cld
|
|
|
|
1:
|
|
|
|
lodsb
|
|
|
|
stosb
|
|
|
|
testb al, al
|
|
|
|
jnz 1b
|
|
|
|
|
|
|
|
! Make the DOS call.
|
|
|
|
|
|
|
|
movzx edi, (transfer_buffer_ptr)
|
2022-08-07 20:10:08 +00:00
|
|
|
movb ah, 0x41
|
2022-08-18 22:08:57 +00:00
|
|
|
or ebx, 0x210000
|
|
|
|
callf (interrupt_ptr)
|
|
|
|
|
|
|
|
pop edi
|
|
|
|
pop esi
|
2022-08-07 20:10:08 +00:00
|
|
|
jmp .sys_zret
|