◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────C/C++ Language───────────────────────────────────────────────────────── Keyword: __interrupt Syntax: __interrupt <declarator> Summary: Specifies that a function is an interrupt handler. The compiler generates entry and exit sequences for the interrupt handler, including saving and restoring all registers and executing an IRET instruction to return. See also: _chain_intr, _dos_getvect, _dos_keep, _dos_setvect The __interrupt keyword is used in C to label a function as an interrupt handler. It can also be applied to static member functions in C++. An interrupt handler cannot be declared inline. An interrupt handler must be a far function. If you are compiling with the small (default) or compact memory model, you must declare your interrupt handler with the __far attribute. An interrupt handler must use the C calling convention. If you use the /Gc or /Gr compiler options, you must declare your interrupt handler with the __cdecl attribute. You cannot declare an interrupt handler with either the __saveregs attribute or the _fastcall calling convention. If the /Zc compiler switch is used, both interrupt and _interrupt are synonyms for __interrupt. If /Za is used, only __interrupt is accepted. See: ◄Interrupt Handler Parameters► ◄Transferring Interrupt Control► ◄Special Considerations► -♦-