Last change
on this file since 148 was
148,
checked in by aitotat, 13 years ago
|
Changes to XTIDE Universal BIOS:
- INT 13h optimizations to save almost 100 bytes.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[117] | 1 | ; Project name : XTIDE Universal BIOS |
---|
[3] | 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: |
---|
[148] | 12 | ; DL: Translated Drive number |
---|
| 13 | ; DS:DI: Ptr to DPT (in RAMVARS segment) |
---|
| 14 | ; SS:BP: Ptr to INTPACK |
---|
| 15 | ; Returns with INTPACK in SS:BP: |
---|
[3] | 16 | ; If succesfull: |
---|
| 17 | ; AH: 3 (Hard disk accessible) |
---|
| 18 | ; CX:DX: Total number of sectors |
---|
| 19 | ; CF: 0 |
---|
| 20 | ; If failed: |
---|
| 21 | ; AH: 0 (Drive not present) |
---|
| 22 | ; CX:DX: 0 |
---|
| 23 | ; CF: 1 |
---|
| 24 | ;-------------------------------------------------------------------- |
---|
| 25 | ALIGN JUMP_ALIGN |
---|
| 26 | AH15h_HandlerForReadDiskDriveSize: |
---|
[148] | 27 | call HCapacity_GetSectorCountFromOurAH08h ; Sector count to DX:AX |
---|
| 28 | mov [bp+INTPACK.cx], dx ; HIWORD to CX |
---|
| 29 | mov [bp+INTPACK.dx], ax ; LOWORD to DX |
---|
[3] | 30 | |
---|
[148] | 31 | xor ah, ah |
---|
| 32 | call HError_SetErrorCodeToIntpackInSSBPfromAH ; Store success to BDA and CF |
---|
| 33 | mov BYTE [bp+INTPACK.ah], 3 ; Type code = Hard disk |
---|
| 34 | jmp Int13h_ReturnFromHandlerWithoutStoringErrorCode |
---|
Note: See
TracBrowser
for help on using the repository browser.