Fix div by zero, add NEW, device reset, trap flag