Last change
on this file since 81 was 35, checked in by Tomi Tilli, 14 years ago |
Cleaned recent changes a bit to save few bytes.
|
File size:
1.1 KB
|
Line | |
---|
1 | ; File name : AH15h_HSize.asm
|
---|
2 | ; Project name : IDE BIOS
|
---|
3 | ; Created date : 28.9.2007
|
---|
4 | ; Last update : 24.8.2010
|
---|
5 | ; Author : Tomi Tilli
|
---|
6 | ; Description : Int 13h function AH=15h, Read Disk Drive Size.
|
---|
7 |
|
---|
8 | ; Section containing code
|
---|
9 | SECTION .text
|
---|
10 |
|
---|
11 | ;--------------------------------------------------------------------
|
---|
12 | ; Int 13h function AH=15h, Read Disk Drive Size.
|
---|
13 | ;
|
---|
14 | ; AH15h_HandlerForReadDiskDriveSize
|
---|
15 | ; Parameters:
|
---|
16 | ; AH: Bios function 15h
|
---|
17 | ; DL: Drive number
|
---|
18 | ; Parameters loaded by Int13h_Jump:
|
---|
19 | ; DS: RAMVARS segment
|
---|
20 | ; Returns:
|
---|
21 | ; If succesfull:
|
---|
22 | ; AH: 3 (Hard disk accessible)
|
---|
23 | ; CX:DX: Total number of sectors
|
---|
24 | ; CF: 0
|
---|
25 | ; If failed:
|
---|
26 | ; AH: 0 (Drive not present)
|
---|
27 | ; CX:DX: 0
|
---|
28 | ; CF: 1
|
---|
29 | ; IF: 1
|
---|
30 | ; Corrupts registers:
|
---|
31 | ; Flags
|
---|
32 | ;--------------------------------------------------------------------
|
---|
33 | ALIGN JUMP_ALIGN
|
---|
34 | AH15h_HandlerForReadDiskDriveSize:
|
---|
35 | push bx
|
---|
36 | push ax
|
---|
37 |
|
---|
38 | call HCapacity_GetSectorCountFromOurAH08h; Sector count to DX:AX
|
---|
39 | mov cx, dx ; HIWORD to CX
|
---|
40 | xchg dx, ax ; LOWORD to DX
|
---|
41 |
|
---|
42 | pop ax
|
---|
43 | pop bx
|
---|
44 | mov ah, 3 ; Type code = Hard disk
|
---|
45 | clc
|
---|
46 | jmp Int13h_ReturnWithValueInDL
|
---|
Note:
See
TracBrowser
for help on using the repository browser.