Sets the number of times MS-DOS retries a disk operation after a failure caused by a file-sharing violation before it returns an error to the requesting process. This subfunction is not available unless the file-sharing module (SHARE.EXE) is loaded.
Call with:
AH = 44H
AL = 0BH
CX = delays per retry (default = 1)
DX = number of retries (default = 3)
Returns:
If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The length of a delay is a machine-dependent value determined by the CPU type and clock speed. Each delay consists of the following instruction sequence:
xor cx,cx loop $
which executes 65,536 times before falling out of the loop.
The sharing retry count affects the behavior of the system as a whole and is not a local parameter for the process. If a program changes the sharing retry count, it should restore the default values before terminating.
Example:
Change the number of automatic retries for a file-sharing violation to five.
.
.
.
mov ax,440bh ; function & subfunction
mov cx,1 ; delays per retry
mov dx,5 ; number of retries
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
.
.
.