Note sure.

I would have

IFOmodemask = 0x7f,
IFOflagmask = 0xFF80
IFFflush = 0x80

and have that or'd with the open mode when the file was opened:

(IFOmode)(IFOcreate|IFFflush)