2025-08-03
Preserve CF when chaining to the int 21h downlink:
For seekext, additionally:
Preserving CF for int 21h handlers is based on an answer on stackoverflow in which I modified an example to create an int 21h hook that can call its downlink (using pushed flags and a far call). The needed modifications:
lahf and setting up bp to access the iret frame.fl register, but another caller using pushf would pass along the live fl to its iret stack frame.