
If CF is set, then an error occurred and the AH register contains the error code. If the interrupt returns with the carry flag ( CF) clear, then no error occurred and the AH register will contain 0. sector number: CL (not used for format!).Here's a list of the required parameters for floppy-disk services: The parameters for service 05h are basically the same as those for every other disk read/write service, except that you don't need to specify a sector number (normally passed in CL), since you cannot format individual sectors. The nice thing about this is that it allows you to specify different characteristics for each track-and even each sector on a track (some old-school copy-protection schemes used this by creating tracks with oddball formatting). You have to call this service multiple times to format an entire disk. (The service number goes in the AH register when you invoke the interrupt.) Note that this service formats a single track, not the entire disk at once. Specifically, int 13h, service 05h formats a disk track. An application program generally leaves such low-level manipulation of the FAT to the operating system, using only the OS-provided services to do high-level read/write operations.

I don't think DOS provides any service to format a disk. Int 13h is the appropriate way to do it, but rather than calling a DOS service, you're actually using it to call a ROM BIOS service.
