Changeset 475 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE


Ignore:
Timestamp:
Oct 12, 2012, 8:21:26 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Fixed a bug that might have set CF flag when returning from memory mapped transfers.
File:
1 edited

Legend:

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

    r474 r475  
    100100;               1 if any error
    101101;   Corrupts registers:
    102 ;       AL, BX, DX, SI, ES
     102;       AL, BX, DX, SI
    103103;--------------------------------------------------------------------
    104104ReadFromSectorAccessWindow:
     
    107107    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    108108
    109     mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
     109    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears CH
    110110    cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
    111111    jbe     SHORT .ReadLastBlockFromDrive
     
    138138
    139139    ; All sectors successfully transferred
    140     add     cx, [bp+PIOVARS.bSectorsDone]       ; Never sets CF
     140    add     cl, [bp+MEMPIOVARS.bSectorsDone]    ; Never sets CF
    141141    ret
    142142
     
    145145    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
    146146%ifdef USE_386
    147     movzx   cx, [bp+MEMPIOVARS.bSectorsDone]
     147    movzx   cx, BYTE [bp+MEMPIOVARS.bSectorsDone]
    148148%else
    149     mov     ch, 0
     149    mov     ch, 0                               ; Preserve CF
    150150    mov     cl, [bp+MEMPIOVARS.bSectorsDone]
    151151%endif
     
    220220    xor     cl, cl
    221221ALIGN JUMP_ALIGN
    222 .WriteBlock:
     222.WriteNextSector:
    223223    mov     ch, SECTOR_ACCESS_WINDOW_SIZE >> 9
    224224    rep movsw
    225225    mov     di, bx  ; Reset for next sector
    226226    dec     dx
    227     jnz     SHORT .WriteBlock
     227    jnz     SHORT .WriteNextSector
    228228    ret
    229229
     
    232232; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    233233;   Parameters:
    234 ;       CX      Number of sectors in block
     234;       CX      Number of sectors in full block or sectors in last partial block
    235235;       ES:DI:  Normalized ptr to buffer to receive data (destination)
    236236;       DS:SI:  Ptr to Sector Access Window (source)
     
    247247    xor     cl, cl
    248248ALIGN JUMP_ALIGN
    249 .ReadBlock:
     249.ReadNextSector:
    250250    mov     ch, SECTOR_ACCESS_WINDOW_SIZE >> 9
    251251    rep movsw
    252252    mov     si, bx  ; Reset for next sector
    253253    dec     dx
    254     jnz     SHORT .ReadBlock
     254    jnz     SHORT .ReadNextSector
    255255    ret
    256256
Note: See TracChangeset for help on using the changeset viewer.