You don't even need to use assembly for this, the wait for interrupt typically involves side effects.