save registers before entering interrupt handlers
add overflow protection