C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
__interrupt
 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
                                    -♦-