Changeset 618 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm


Ignore:
Timestamp:
Aug 31, 2021, 2:17:47 PM (3 years ago)
Author:
krille_n_
Message:

Changes:

  • Updated the BIOS makefile. Added the NO_ATAID_CORRECTION define back to the Tiny build as I've realized that the correction code should not be needed for builds without MODULE_EBIOS. Also added a new makefile target 'custom' to make it easier for people to make custom builds.
  • Fixed a bug where calling INT 13h/AH=15h for drives not handled by XUB (floppy drives for example) would return an error due to the fact that any non-zero return value in AH from the other BIOS would cause the CF to be set in Int13h_SetErrorCodeToIntpackInSSBPfromAH. The return path is now via Int13h_ReturnFromHandlerWithoutStoringErrorCode which means that no status/error code will be returned in the BDA but that should not be a problem as the other BIOS should do that anyway. This change also fixed another potential problem where return values in DL from the other BIOS were assumed to be drive numbers when MODULE_SERIAL_FLOPPY is included in the build.
  • Minor optimizations and fixes.
File:
1 edited

Legend:

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

    r596 r618  
    250250    pop     WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap]
    251251    cmp     dl, [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv]    ; DL is still drive number?
    252     je      SHORT Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
     252    je      SHORT Int13h_ReturnFromHandlerWithoutStoringErrorCode
    253253    mov     [bp+IDEPACK.intpack+INTPACK.dl], dl ; Something is returned in DL
    254254%endif
    255     jmp     SHORT Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
     255    jmp     SHORT Int13h_ReturnFromHandlerWithoutStoringErrorCode
     256    ; We cannot return via Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH!
     257    ; 1. If the other BIOS returns something in DL then that is assumed to be a drive number
     258    ;    (if MODULE_SERIAL_FLOPPY is included) even though it could be anything.
     259    ; 2. Any non-zero value in AH will cause the CF to be set on return from the handler.
     260    ;    This breaks INT 13h/AH=15h for drives handled by the other BIOS.
    256261
    257262
Note: See TracChangeset for help on using the changeset viewer.