Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

HalInstallInterruptHandler

NullException edited this page Aug 5, 2020 · 1 revision

HalInstallInterruptHandler function

Description

This function generates and installs an IDT descriptor

Syntax

status HalInstallInterruptHandler(dword interruptNumber, 
                                  idtflags idtFlags, 
                                  word selector, 
                                  interrupt_handler_function handler
);

Parameters

interruptNumber

The number of the interrupt handled (eg. if this is set to 10, the handler to "int 10" would be installed)


idtFlags

The descriptor's flags (see HalGenerateIDTDesc)


selector

Selector to use when processing the interrupt. Must be a code selector


handler

The base address of the function called to handle the interrupt. The function must have a void return types, no parameters and must end with "iret" instead of "ret"

Return Value

This function returns a SOARE Status code. A zero return value means the function was successful while a nonzero return value indicates the function failed

Notes

You can only install 1 handler for each interrupt, meaning that if you try to install a handler to an interrupt that is already handled, the old handler will be replaced with the new one

Clone this wiki locally