Skip to content

ErrorMode should be cleared after re-incrementing InDOS, not before #251

Description

@ecm-pushbx

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompatibilityissue may effect compatibility

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions