Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:dos:api:int25 [2021/08/06 07:24] – created prokushev | en:docs:dos:api:int25 [2024/05/19 10:14] (current) – prokushev | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Brief ===== | ===== Brief ===== | ||
- | ABSOLUTE DISK READ (except partitions > 32M) | + | Absolute disk read |
===== Family API ===== | ===== Family API ===== | ||
Line 16: | Line 16: | ||
===== Input ===== | ===== Input ===== | ||
- | AL = drive number (00h = A:, 01h = B:, etc) | + | |
- | CX = number of sectors to read (not FFFFh) | + | |
- | DX = starting logical sector number (0000h - highest sector on drive) | + | |
- | DS:BX -> buffer for data | + | |
+ | * CX = FFFFh (DOS 3.31+) | ||
+ | * DS:BX -> disk read packet (see #02548) | ||
===== Return ===== | ===== Return ===== | ||
- | CF clear if successful | + | * CF clear if successful |
- | CF set on error | + | |
- | | + | |
- | | + | |
- | AX = 0207h if more than 64K sectors on drive -- use new-style call | + | |
- | may destroy all other registers except segment registers | + | |
===== Macro ===== | ===== Macro ===== | ||
- | |||
===== Notes ===== | ===== Notes ===== | ||
- | original flags are left on stack, and must be popped by caller | + | partition is potentially >32M (and requires this form of the call) if bit 1 of the device attribute word in the device driver is set |
- | this call bypasses the DOS filesystem | + | |
- | examination of CPWIN386.CPL indicates that if this call fails with | + | for FAT32 drives (which may be up to 2TB in size), use INT 21/ |
- | | + | |
- | | + | AX = 0207h if more than 64K sectors on drive or if FAT32 drive -- use CX=FFFFH or INT 21/ |
- | Novell DOS 7 decides whether the old-style or new-style (>32M) version | + | |
- | | + | may destroy all other registers except segment registers; Win9X always sets SI to 0000h due to an apparent coding bug |
- | | + | |
- | | + | original flags are left on stack, and must be popped by caller |
- | PC Tools MIRROR as shipped with MS-DOS 5.0+ checks several signatures | + | |
- | | + | this call bypasses the DOS filesystem |
- | | + | |
- | | + | examination of CPWIN386.CPL indicates that if this call fails with error 0408h on an old-style (<32M) call, one should retry the call with the high bit of the drive number in AL set |
- | | + | |
- | | + | Novell DOS 7 decides whether the old-style or new-style (>32M) version of INT 25 must be used solely on the basis of the partition' |
- | | + | |
- | | + | PC Tools MIRROR as shipped with MS-DOS 5.0+ checks several signatures at the beginning of INT 25h and INT 26h before it starts to patch these vectors. The signatures it looks for are 83h, F9h, FFh, 74h (CMP CX,-01; JZ ????) at offset +1 from the INT 25h/26h entry points and 2Eh, FFh, 2Eh (JMP DWORD PTR CS:[????]) at the location pointed to by the JZ ????. If it finds these signatures it will use the target address of the far jump for its sub-sequent checks, otherwise it will just take the previous interrupt entry points when scanning for FAh, 2Eh, 8Ch, 16h (CLI; MOV CS:????,SS) or FAh, 2Eh, 89h, 26h (CLI; MOV CS:????,SP) right at the beginning. Hence, it seems the first two checks are to trace through a specific INT 25h/26h filter. However, the purpose of the whole patch is unknown. |
- | | + | |
- | | + | A method to detect the actual assignments of logical drive numbers to physical BIOS drive units (for example to detect the boot drive), is to temporarily mount an INT 13h handler recording the used DL drive unit for any INT 13/AH=02h read operations and discarding any attempts to access actual floppy drives. |
- | | + | |
- | | + | Although all registers except segment registers may be destroyed some software depends on some of the registers being preserved. For example some Flash disk drivers requires that DX is not trashed. DR-DOS 7.03 takes care of this. |
- | A method to detect the actual assignments of logical drive numbers | + | |
- | to physical BIOS drive units (for example to detect the boot drive), | + | BUGS: DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an invalid drive number |
- | is to temporarily mount an INT 13h handler recording the used DL | + | |
- | drive unit for any INT 13/AH=02h read operations and discarding any | + | DR DOS 3.41 will return with a jump instead of RETF, leaving the wrong number of bytes on the stack; use the huge-partition version (INT 25/ |
- | attempts to access actual floppy drives. | + | |
- | all the appropriate DOS drives and watch the results recorded by | + | DR DOS 6.0 original issues 05/1991 & 08/1991 reported wrong error codes for "drive not ready" and "write protect" |
- | the INT 13h interceptor. | + | |
- | Although all registers except segment registers may be destroyed | + | |
- | some software depends on some of the registers being preserved. | + | |
- | For example some Flash disk drivers requires that DX is not trashed. | + | |
- | DR-DOS 7.03 takes care of this. | + | |
- | BUGS: DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an | + | |
- | | + | |
- | DR DOS 3.41 will return with a jump instead of RETF, leaving the | + | |
- | | + | |
- | | + | |
- | DR DOS 6.0 original issues 05/1991 & 08/1991 reported wrong error | + | |
- | | + | |
- | | + | |
- | | + | |
===== See Also ===== | ===== See Also ===== | ||
- | INT 13/ | + | **[[en: |
| | ||
===== Note ===== | ===== Note ===== |