Chapter
1
I
System
Calls
Absolute
Disk
Read
Interrupt
25H
Transfers control
to
MS-DOS.
The number
of
sectors speci-
fied in CX is read from the disk
to
the Disk Transfer
Address.
This call destroys all registers except the segment regis-
ters. Be sure
to
save any registers your program uses be-
fore issuing the interrupt.
The system pushes the flags at the time
of
the call; they
are still on the stack upon return. This is necessary be-
cause data is passed back in the current flags. Be sure
to pop the stack upon return to prevent uncontrolled
growth.
Entry Conditions:
AL
=
drive number
(0
=
A,
1
=
B,
etc.)
DS:BX
=
Disk Transfer Address
CX
=
number of sectors to read
DX
=
beginning relative sector
Exit Conditions:
Carry set:
Carry
not set:
Error Returns:
Error codes are the same
as
for
Interrupt
24H.
Macro
Definition:
AL
=
error
code
Operation was successful.
abs-di5k-read macro
d~~k,buffer,num_sector~,f~rst_sector
mov
a1,disk
mov
bx,offset buffer
mov
cx,num_sector5
mov
dx,first_5ector
int
25H
endm
POPf
20