Changeset 165 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm


Ignore:
Timestamp:
Aug 20, 2011, 6:37:44 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Hopefully this commit is successful. Sorry for the mess.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm

    r158 r165  
    1919    mov     bp, sp
    2020    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;--------------------------------------------------------------------
     38ALIGN JUMP_ALIGN
     39Idepack_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
    2160
    2261
     
    5695    pop     bx
    5796
     97GetDeviceControlByteToIdepackAndStartTransfer:
    5898    call    AccessDPT_GetDeviceControlByteToAL
    5999    mov     [bp+IDEPACK.bDeviceControl], al
    60     jmp     Device_OutputCommandWithParameters
     100    jmp     Device_OutputCommandWithParameters 
    61101
    62102
Note: See TracChangeset for help on using the changeset viewer.