Changeset 165 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- Aug 20, 2011, 6:37:44 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
r158 r165 19 19 mov bp, sp 20 20 jmp ax 21 22 23 ;-------------------------------------------------------------------- 24 ; Idepack_ConvertDapToIdepackAndIssueCommandFromAH 25 ; Parameters: 26 ; AH: IDE command to issue 27 ; BH: Timeout ticks 28 ; BL: IDE Status Register flag to wait after command 29 ; DS:DI: Ptr to DPT (in RAMVARS segment) 30 ; ES:SI: Ptr to DAP (EBIOS Disk Address Packet) 31 ; SS:BP: Ptr to IDEPACK 32 ; Returns: 33 ; AH: INT 13h Error Code 34 ; CF: Cleared if success, Set if error 35 ; Corrupts registers: 36 ; AL, BX, CX, DX, SI, ES 37 ;-------------------------------------------------------------------- 38 ALIGN JUMP_ALIGN 39 Idepack_ConvertDapToIdepackAndIssueCommandFromAH: 40 mov [bp+IDEPACK.bCommand], ah 41 mov ax, [es:si+DAP.wSectorCount] 42 mov [bp+IDEPACK.bSectorCount], al 43 mov [bp+IDEPACK.bSectorCountHighExt], ah ; Always zero 44 45 mov al, [es:si+DAP.qwLBA] ; LBA byte 0 46 mov [bp+IDEPACK.bLbaLow], al 47 mov ax, [es:si+DAP.qwLBA+1] ; LBA bytes 1 and 2 48 mov [bp+IDEPACK.wLbaMiddleAndHigh], ax 49 mov ah, [es:si+DAP.qwLBA+3] ; LBA byte 3, LBA28 bits 24...27 50 mov [bp+IDEPACK.bLbaLowExt], ah 51 mov cx, [es:si+DAP.qwLBA+4] ; LBA bytes 4 and 5 52 mov [bp+IDEPACK.wLbaMiddleAndHighExt], cx 53 54 and ah, 0Fh ; Limit bits for LBA28 55 call AccessDPT_GetDriveSelectByteToAL 56 or al, ah 57 mov [bp+IDEPACK.bDrvAndHead], al 58 les si, [es:si+DAP.dwMemoryAddress] 59 jmp SHORT GetDeviceControlByteToIdepackAndStartTransfer 21 60 22 61 … … 56 95 pop bx 57 96 97 GetDeviceControlByteToIdepackAndStartTransfer: 58 98 call AccessDPT_GetDeviceControlByteToAL 59 99 mov [bp+IDEPACK.bDeviceControl], al 60 jmp Device_OutputCommandWithParameters 100 jmp Device_OutputCommandWithParameters 61 101 62 102
Note:
See TracChangeset
for help on using the changeset viewer.