Last change
on this file since 147 was 117, checked in by krille_n_@…, 13 years ago |
Changes to the XTIDE Universal BIOS:
- Bugfix: The stack swapping in BootVars_SwitchBackToPostStack wasn't really an atomic operation anymore (on 186 and 286 CPUs) so I reverted the change I did in the previous revision.
- A very small size optimization in AH15h_HSize.asm
|
File size:
1.0 KB
|
Line | |
---|
1 | ; Project name : XTIDE Universal BIOS
|
---|
2 | ; Description : Int 13h function AH=15h, Read Disk Drive Size.
|
---|
3 |
|
---|
4 | ; Section containing code
|
---|
5 | SECTION .text
|
---|
6 |
|
---|
7 | ;--------------------------------------------------------------------
|
---|
8 | ; Int 13h function AH=15h, Read Disk Drive Size.
|
---|
9 | ;
|
---|
10 | ; AH15h_HandlerForReadDiskDriveSize
|
---|
11 | ; Parameters:
|
---|
12 | ; AH: Bios function 15h
|
---|
13 | ; DL: Drive number
|
---|
14 | ; Parameters loaded by Int13h_Jump:
|
---|
15 | ; DS: RAMVARS segment
|
---|
16 | ; Returns:
|
---|
17 | ; If succesfull:
|
---|
18 | ; AH: 3 (Hard disk accessible)
|
---|
19 | ; CX:DX: Total number of sectors
|
---|
20 | ; CF: 0
|
---|
21 | ; If failed:
|
---|
22 | ; AH: 0 (Drive not present)
|
---|
23 | ; CX:DX: 0
|
---|
24 | ; CF: 1
|
---|
25 | ; IF: 1
|
---|
26 | ; Corrupts registers:
|
---|
27 | ; Flags
|
---|
28 | ;--------------------------------------------------------------------
|
---|
29 | ALIGN JUMP_ALIGN
|
---|
30 | AH15h_HandlerForReadDiskDriveSize:
|
---|
31 | push bx
|
---|
32 | push ax
|
---|
33 |
|
---|
34 | call HCapacity_GetSectorCountFromOurAH08h; Sector count to DX:AX (clears CF)
|
---|
35 | mov cx, dx ; HIWORD to CX
|
---|
36 | xchg dx, ax ; LOWORD to DX
|
---|
37 |
|
---|
38 | pop ax
|
---|
39 | pop bx
|
---|
40 | mov ah, 3 ; Type code = Hard disk
|
---|
41 | jmp Int13h_ReturnWithValueInDL
|
---|
Note:
See
TracBrowser
for help on using the repository browser.