Changeset 443 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm


Ignore:
Timestamp:
Aug 25, 2012, 2:48:40 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Offset to ATA-ID buffer will no longer get corrupted when trying to enable 8-bit mode for XT-CF.
  • Optimized A0<->A3 swapping a bit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r414 r443  
    163163    ; Exchange address lines A0 and A3 from DL
    164164    add     dx, [cs:bx]                         ; DX now has port address
    165     mov     bl, dl
    166     mov     bh, MASK_A3_AND_A0_ADDRESS_LINES
    167     and     bh, bl                              ; BH = 0, 1, 8 or 9, we can ignore 0 and 9
    168     jz      SHORT .ReturnTranslatedPortInDX     ; Jump out since DH is 0
    169     xor     bh, MASK_A3_AND_A0_ADDRESS_LINES
    170     jz      SHORT .ReturnTranslatedPortInDX     ; Jump out since DH was 9
    171     and     dl, ~MASK_A3_AND_A0_ADDRESS_LINES
    172     or      dl, bh                              ; Address lines now reversed
     165    mov     bl, dl                              ; Port low byte to BL
     166    and     bl, MASK_A3_AND_A0_ADDRESS_LINES    ; Clear all bits except A0 and A3
     167    jz      SHORT .ReturnTranslatedPortInDX     ; A0 and A3 both zeroes, no change needed
     168    cmp     bl, MASK_A3_AND_A0_ADDRESS_LINES
     169    je      SHORT .ReturnTranslatedPortInDX     ; A0 and A3 both ones, no change needed
     170    xor     dl, MASK_A3_AND_A0_ADDRESS_LINES    ; Invert A0 and A3
    173171.ReturnTranslatedPortInDX:
    174172    ret
Note: See TracChangeset for help on using the changeset viewer.