Tutorials' Revision History

  1. 'Interrupts and Handlers' Revision History (Part 1 and Part 2)

    VERSION 1.20 (05/12/2000)
    (thanks go to Eli Zaretskii for taking the time to examine my document and for identifying most of the problems)
    Part 1 :
    * Corrected a typo : SIGSEV instead of SIGSEGV.
    * Another typo : 'There are a few other things[..]' instead of 'There a few other things[..]'
    * Explained that signal returns SIG_ERR when the SIG is outside legal limits.
    * Removed the `A handler must reenable interrupts as soon as it gets control...' advice in the Handlers and MS_DOS area. As Eli Zaretskii explained to me, "there's nothing wrong with keeping interrupts disabled during the whole time the handler code runs, provided that this time is not too long".
    * Replaced the word 'pointer' by 'number' when dealing with the 8-bit info that the 8259A puts in the data bus during the interrupt acknowledge sequence.
    * Now explains that the IR lines can be masked.
    * Now talks about interrupt priorities, including a table with the various priorities...
    * The table of IRQs is now sorted by priority.
    * I now discuss the two types of EOI.

    Part 2 :
    * I explain in greater detail what happens when an hardware interrupt comes in, and I corrected the error that said that the dpmi host disabled the IVT. In fact, the IVT is not even consulted when in protected-mode...
    * Now covers the three special software interrupts that get reflected to protected-mode.
    * In the second example of installing a hardware interrupt handler I forgot to lock the stack's pointer. Fixed.
    * I now stress out the fact that after a mode switch all segment registers are undefined, except the cs register which is ALWAYS loaded with the code segment.
    * I now explain that the handler or wrapper needs to acknowledge the interrupt by sending an EOI.
    * I forgot to add the stack size to the allocated stack variable. If left that way, the user handler would quickly provoke a stack overflow...
    * Eliminated the unnecessary ret statement at the end of the _wrapper_NASM_end label.
    * I now warn about the need for semaphores when hooking both PM and RM handlers.
    * Explained that the reason it is not safe to use paging during the execution of an interrupt handler is because DOS is a non-reentrant OS.
    * In the locking section, I was trying to strlen() a not yet allocated buffer. This would crash. Fixed.
    * The End_of_function is no longer static as this gave rise to errors...
    * I now explain the advantages that the use of the _CRT0_FLAG_LOCK_MEMORY might bring.
    * I explicitly state that interrupt handlers are entered with interrupts disabled.

    VERSION 1.00 (01/12/2000)
    * Initial public release.