I am asking a very stupid question. I am getting confused with remembering interrupt enable bits , flags setting and clearing. Is there any simple kind or common kind of architecture where I can easily remember this setting and clearing. I have written drivers several times, but if someone asks or if I have to write again it will look like new again. Please help.