The int 24h caller upon return from int 24h resets error mode before incrementing InDOS:
|
mov byte [_ErrorMode],0 |
|
inc byte [_InDOS] |
This leaves a window in which both error mode and InDOS are zero, and the interrupt flag is set (IRQs enabled), yet there is still DOS call state for the retry, ignore, or fail choices that shouldn't be corrupted.
In MS-DOS v4.01, the order of the corresponding instructions is the reverse, increment InDOS then clear error mode: https://hg.pushbx.org/ecm/msdos4/file/51ad27d225a8/src/DOS/CTRLC.ASM#l539
The int 24h caller upon return from int 24h resets error mode before incrementing InDOS:
kernel/kernel/entry.asm
Lines 697 to 698 in 33f17b0
This leaves a window in which both error mode and InDOS are zero, and the interrupt flag is set (IRQs enabled), yet there is still DOS call state for the retry, ignore, or fail choices that shouldn't be corrupted.
In MS-DOS v4.01, the order of the corresponding instructions is the reverse, increment InDOS then clear error mode: https://hg.pushbx.org/ecm/msdos4/file/51ad27d225a8/src/DOS/CTRLC.ASM#l539