add nmi isr and volatile for optimize