INT 15h Removable Media Eject Intercept

Entry:
    AH = 52h
    DL = Drive number
Exit:
    carry clear
        AH = 0
        Implies ejection may proceed
    carry set
        AH = error code, B1h or B3h
        Implies ejection must be rejected
 

This intercept is called in response to a software request (INT 13h, AH=46h, Eject drive) to eject a disk from a removable media drive. Typically a user will press an eject button or use a software command to request that a particular volume be ejected. The code that handles this request will issue this INT 15h function before actually honoring the request. By default the INT 15h handler returns with ejection accepted status. A disk cache program could hook this INT 15h call, and return acceptance or rejection based on the state of its buffers for this disk. It could also be used by operating system software as a media changed signal.