qa.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.
Int 23H
   Summary  Notes  Example  Back
──────────────────────────────────────────────────────────────────────────────
 
▀ The initialization code for an application can use Int 21H Function 25H
  to reset the Interrupt 23H vector to point to its own routine for CTRL+C
  handling.  In this way, the program can avoid being terminated unexpectedly
  as the result of the user's entry of a CTRL+C or CTRL+Break.
 
▀ When a CTRL+C is detected and the program's Int 23H handler receives con-
  trol, all registers are set to their values at the point of the original
  function call. The handler can then do any of the following:
  - Set a local flag for later inspection by the application, or take any
    other appropriate action, and perform an IRET. All registers must be
    preserved. The MS-DOS function in progress will be restarted from
    scratch and will proceed to completion, control finally returning to
    the application in the normal manner.
  - Take appropriate action and then perform a RET FAR to give control
    back to MS-DOS. The state of the carry flag is used by MS-DOS to deter-
    mine what action to take. If the carry flag is set, the application
    will be terminated; if the carry flag is clear, the application will
    continue in the normal manner.
  - Retain control by transferring to an error-handling routine within the
    application and then resume execution or take other appropriate ac-
    tion, never performing a RET FAR or an IRET to end the
    interrupt-handling sequence. This option will cause no harm to the
    system.
 
▀ Any MS-DOS function call may be used within the body of an Int 23H
  handler.
                                    -♦-