update interrupt logic and trap/halt support
Merging