Interrupt handling function cannot assume anything about the direction flag (DF in EFLAGS register), and it must clear it using "cld" instruction in these cases:
- The interrupt handling function uses any of the "rep" instructions.
- Interrupt handling function calls another function.
However, to simplify the implementation we just create "cld" instruction in each prologue of interrupt handler function.