Changeset 617 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm


Ignore:
Timestamp:
Aug 10, 2021, 7:27:30 AM (11 months 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/Device/Device.asm

    r613 r617  
    164164
    165165;--------------------------------------------------------------------
     166; Device_ReadLBAlowRegisterToAL
     167; Returns LBA low register / Sector number register contents.
     168; Note that this returns valid value only after transfer command (read/write/verify)
     169; has stopped to an error. Do not call this otherwise.
     170;   Parameters:
     171;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     172;   Returns:
     173;       AL:     Byte read from the device register
     174;   Corrupts registers:
     175;       BX, DX
     176;--------------------------------------------------------------------
     177;%ifdef MODULE_SERIAL   ; IDE + Serial
     178;ALIGN JUMP_ALIGN
     179;Device_ReadLBAlowRegisterToAL:
     180;   test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
     181;%ifdef USE_386
     182;   jz      IdeCommand_ReadLBAlowRegisterToAL
     183;   jmp     SerialCommand_ReadLBAlowRegisterToAL
     184;%else
     185;   jnz     SHORT .ReadFromSerialPort
     186;   jmp     IdeCommand_ReadLBAlowRegisterToAL
     187
     188;ALIGN JUMP_ALIGN
     189;.ReadFromSerialPort:
     190;   jmp     SerialCommand_ReadLBAlowRegisterToAL
     191;%endif
     192
     193;%else                  ; IDE only
     194    Device_ReadLBAlowRegisterToAL       EQU     IdeCommand_ReadLBAlowRegisterToAL
     195;%endif
     196; TODO: For now we simply assume serial device do not produce verify errors
     197
     198
     199;--------------------------------------------------------------------
    166200; Device_SelectDrive
    167201;   Parameters:
Note: See TracChangeset for help on using the changeset viewer.