[165] | 1 | ; Project name : XTIDE Universal BIOS |
---|
| 2 | ; Description : Int 13h function AH=47h, Extended Seek. |
---|
| 3 | |
---|
| 4 | ; Section containing code |
---|
| 5 | SECTION .text |
---|
| 6 | |
---|
| 7 | ;-------------------------------------------------------------------- |
---|
| 8 | ; Int 13h function AH=47h, Extended Seek. |
---|
| 9 | ; |
---|
| 10 | ; AH47h_HandlerForExtendedSeek |
---|
| 11 | ; Parameters: |
---|
| 12 | ; SI: Same as in INTPACK |
---|
| 13 | ; DL: Translated Drive number |
---|
| 14 | ; DS:DI: Ptr to DPT (in RAMVARS segment) |
---|
| 15 | ; SS:BP: Ptr to IDEPACK |
---|
| 16 | ; Parameters on INTPACK: |
---|
| 17 | ; DS:SI: Ptr to Disk Address Packet |
---|
| 18 | ; Returns with INTPACK: |
---|
| 19 | ; AH: Int 13h return status |
---|
| 20 | ; CF: 0 if succesfull, 1 if error |
---|
| 21 | ;-------------------------------------------------------------------- |
---|
| 22 | ALIGN JUMP_ALIGN |
---|
| 23 | AH47h_HandlerForExtendedSeek: |
---|
| 24 | ; Note that there is no Seek command for LBA48 addressing! |
---|
| 25 | mov es, [bp+IDEPACK.intpack+INTPACK.ds] ; ES:SI to point Disk Address Packet |
---|
| 26 | cmp BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE |
---|
[221] | 27 | jb SHORT Prepare_ReturnFromInt13hWithInvalidFunctionError |
---|
[165] | 28 | |
---|
| 29 | mov ah, COMMAND_SEEK |
---|
| 30 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY) |
---|
| 31 | %ifdef USE_186 |
---|
| 32 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH |
---|
| 33 | jmp Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
| 34 | %else |
---|
| 35 | call Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
| 36 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH |
---|
| 37 | %endif |
---|
[221] | 38 | |
---|
| 39 | .WriteWithVerifyNotSupported: |
---|
| 40 | jmp Prepare_ReturnFromInt13hWithInvalidFunctionError |
---|