Ignore:
Timestamp:
Aug 21, 2011, 3:42:15 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Old Int 13h transfer functions work again.
  • Fixes to eINT13h (EBIOS) support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm

    r165 r167  
    77;--------------------------------------------------------------------
    88; CommandLookup_GetEbiosIndexToBX
    9 ; CommandLookup_OrOldInt13hIndexToBL
    109;   Parameters:
    1110;       DS:DI:  Ptr to DPT
     
    1413;       BX:     Index to command lookup table
    1514;   Corrupts registers:
    16 ;       AX
     15;       AX, DX
    1716;--------------------------------------------------------------------
    1817ALIGN JUMP_ALIGN
    1918CommandLookup_GetEbiosIndexToBX:
    2019    ; LBA28 or LBA48 command
    21     xor     bx, bx
    22     mov     ax, [es:si+DAP.qwLBA+3] ; Load LBA48 bytes 3 and 4
    23     and     al, ~0Fh                ; Clear LBA28 bits 24...27
    24     or      al, [es:si+DAP.qwLBA+5]
    25     cmp     bx, ax                  ; Set CF if any of bits 28...47 set
    26     rcl     bx, 1                   ; BX = 0 for LBA28, BX = 1 for LBA48
     20    xor     dx, dx
     21    mov     al, [es:si+DAP.qwLBA+3] ; Load LBA48 byte 3 (bits 24...31)
     22    and     ax, 00F0h               ; Clear LBA28 bits 24...27
     23    or      ax, [es:si+DAP.qwLBA+4] ; Set bits from LBA bytes 4 and 5
     24    cmp     dx, ax                  ; Set CF if any of bits 28...47 set
     25    rcl     dx, 1                   ; DX = 0 for LBA28, DX = 1 for LBA48
     26    call    CommandLookup_GetOldInt13hIndexToBX
     27    or      bx, dx                  ; Set block mode / single sector bit
     28    ret
    2729
     30;--------------------------------------------------------------------
     31; CommandLookup_GetOldInt13hIndexToBX
     32;   Parameters:
     33;       DS:DI:  Ptr to DPT
     34;   Returns:
     35;       BX:     Index to command lookup table
     36;   Corrupts registers:
     37;       Nothing
     38;--------------------------------------------------------------------
     39ALIGN JUMP_ALIGN
     40CommandLookup_GetOldInt13hIndexToBX:
    2841    ; Block mode or single sector
    29 ALIGN JUMP_ALIGN
    30 CommandLookup_OrOldInt13hIndexToBL:
    31     mov     al, FLGH_DPT_BLOCK_MODE_SUPPORTED   ; Bit 1
    32     and     al, [di+DPT.bFlagsHigh]
    33     or      bl, al                  ; BX = index to lookup table
     42    mov     bl, [di+DPT.bFlagsHigh]
     43    and     bx, BYTE FLGH_DPT_BLOCK_MODE_SUPPORTED  ; Bit 1
    3444    ret
    3545
     
    5262    db      COMMAND_VERIFY_SECTORS
    5363    db      COMMAND_VERIFY_SECTORS_EXT     
    54 
Note: See TracChangeset for help on using the changeset viewer.