source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH5h_HFormat.asm @ 35

Last change on this file since 35 was 3, checked in by aitotat, 14 years ago
File size: 1.3 KB
Line 
1; File name     :   AH5h_HFormat.asm
2; Project name  :   IDE BIOS
3; Created date  :   2.11.2007
4; Last update   :   12.4.2010
5; Author        :   Tomi Tilli
6; Description   :   Int 13h function AH=5h, Format Disk Track.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; Int 13h function AH=5h, Format Disk Track.
13;
14; AH5h_HandlerForFormatDiskTrack
15;   Parameters:
16;       AH:     Bios function 5h
17;       CH:     Cylinder number, bits 7...0
18;       CL:     Bits 7...6: Cylinder number bits 9 and 8
19;               Bits 5...0: Starting sector number (1...63)
20;       DH:     Starting head number (0...255)
21;       DL:     Drive number
22;       ES:BX:  Pointer to address table
23;   Parameters loaded by Int13h_Jump:
24;       DS:     RAMVARS segment
25;   Returns:
26;       AH:     Int 13h/40h floppy return status
27;       CF:     0 if successfull, 1 if error
28;       IF:     1
29;   Corrupts registers:
30;       Flags
31;--------------------------------------------------------------------
32ALIGN JUMP_ALIGN
33AH5h_HandlerForFormatDiskTrack:
34    push    dx
35    push    cx
36    push    bx
37    push    ax
38
39    ; Format command is vendor specific on IDE drives.
40    ; Let's do verify instead.
41    call    FindDPT_ForDriveNumber      ; DS:DI now points to DPT
42    mov     al, [di+DPT.bPSect]         ; Load Sectors per Track to AL
43    call    AH4h_VerifySectors
44    jmp     Int13h_PopXRegsAndReturn
Note: See TracBrowser for help on using the repository browser.