Table of Contents
Note: This IBM PC BIOS API call is for DOS/Win16 personality only. Use Family API for portability.
Note: osFree Macro Library provides macros for most of functions
Int 13H, AH=04H
Version
IBM 5150 and higher
Brief
Verify sector
Family API
none
Input
- AH = 04h
- AL = number of sectors to verify (must be nonzero)
- CH = low eight bits of cylinder number
- CL = sector number 1-63 (bits 0-5) high two bits of cylinder (bits 6-7, hard disk only)
- DH = head number
- DL = drive number (bit 7 set for hard disk)
- ES:BX → data buffer (PC,XT,AT with BIOS prior to 1985/11/15)
Return
- CF set on error
- CF clear if successful
- AH = status (see status)
- AL = number of sectors verified
Macro
INCLUDE BIOS.INC @DskVerify 0, 0, 0, 1, 1, offset buf
Notes
- errors on a floppy may be due to the motor failing to spin up quickly enough (timeout error 80h); the write should be retried at least three times, resetting the disk with AH=00h between attempts
- on floppys, the operation should also be retried on media change (06h) detection.
- this function does not compare the disk with memory, it merely checks whether the sector's stored CRC matches the data's actual CRC
- the IBM AT BIOS and many other BIOSes use only the low four bits of DH (head number) since the WD-1003 controller which is the standard AT controller (and the controller that IDE emulates) only supports 16 heads
- AWARD AT BIOS and AMI 386sx BIOS have been extended to handle more than 1024 cylinders by placing bits 10 and 11 of the cylinder number into bits 6 and 7 of DH
- some Epson ROM BIOSes sometimes have problems properly handling this function. The workaround is to reset the disk (INT 13/AH=00h) before the call.
Note
Text based on Ralf Brown Interrupt List Release 61
IBM PC BIOS API | |
---|---|
Video I/O | INT 10H: 00H, 01H, 02H, 03H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0CH, 0DH, 0EH, 0FH |
Hardware info | INT 11H, INT 12H |
Serial I/O | INT 14H: 00H, 01H, 02H, 03H |
Tape I/O | INT 15H: 00H, 01H, 02H, 03H |
Keyboard I/O | INT 16H: 00H, 01H, 02H |
Printer I/O | INT 17H: 00H, 01H, 02H |
Disk I/O | INT 13H: 00H, 01H, 02H, 03H, 04H, 05H |
Date and Time | INT 1AH: 00H, 01H |
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |