Chapter
1
I
System
Calls
SeqWrite
Sequential Write
Function Call
15H
Writes
a
record sequentially. The record pointed
to
by the cur-
rent block (offset OCH) and the current record (offset 20H) fields
of
the
FCB
is written from the Disk Transfer Address. The cur-
rent block and current record fields are then incremented.
The record size is set to the value at offset OEH in the
FCB.
If
the record size is less than a sector, the data at the Disk Trans-
fer Address is written
to
a buffer. The buffer
is
written to disk
when it contains a full sector
of
data, when the file is closed, or
when Function Call ODH (Reset Disk) is issued.
Entry Conditions:
AH
=
15H
DS:DX
=
pointer to
the
opened
FCB
of
the
file
to write
Exit Conditions:
If AL
=
00H, the write was completed successfully.
If AL
=
01H, the disk was full; the write was canceled.
If AL
=
02H, there was not enough room in the disk transfer
Macro
Definition:
segment
to
write
1
record; the write was canceled.
write-5eq macro fcb
mow
dx,offsetfcb
mow
ah,lSH
int
21
H
endm
60