Fix compiler warning about reserved word 'interrupt'
Store previous interrupt state in flags