You're confusing emask and eflags in your code. The eflags have nothing to do with enable flags. It's emask that you need.