Ignore:
Timestamp:
Aug 10, 2021, 7:27:30 AM (3 years ago)
Author:
aitotat
Message:
  • Verify functions did not return correctly the number of succesfully verified sectors. That should be now fixed except for serial device. Serial device do not have error handling implemented yet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm

    r568 r617  
    4141AH44h_HandlerForExtendedVerifySectors:
    4242    call    Prepare_ByLoadingDapToESSIandVerifyingForTransfer
     43    push    WORD [es:si+DAP.wSectorCount]               ; Store for successfull number of sectors transferred
    4344    mov     ah, [cs:bx+g_rgbVerifyCommandLookup]
    4445    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
    4546    call    Idepack_ConvertDapToIdepackAndIssueCommandFromAH
     47
     48    ; Now we need number of succesfully verifed sectors to CX. Since we did not transfer anything,
     49    ; we did not have any sector counter like in read and write functions.
     50    ; In case of error, drive LBA registers are set to address where the error occurred. We must
     51    ; calculate number of succesfully transferred sectors from it.
     52    pop     cx
     53    jnc     SHORT .AllSectorsVerifiedSuccessfully
     54
     55; TODO: For now we assume serial device do not produce verify errors
     56    call    AH4h_CalculateNumberOfSuccessfullyVerifiedSectors
     57
     58ALIGN JUMP_ALIGN
     59.AllSectorsVerifiedSuccessfully:
    4660    jmp     SHORT AH42h_ReturnFromInt13hAfterStoringErrorCodeFromAHandTransferredSectorsFromCX
Note: See TracChangeset for help on using the changeset viewer.