small startup/interrupt cleanup

This commit is contained in:
FeralChild64 committed 2019-09-24 17:59:46 +02:00
1 parent 55e2512fe2
commit 6949bd3f48
7 files changed
+8 -10

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
hw_entry_nmi:
sei // don't allow IRQ to interfere, see https://www.c64-wiki.com/wiki/Interrupt
#if CONFIG_CPU_MOS_6502 && CONFIG_BCD_SAFE_INTERRUPTS
cld // clear decimal flag to allow using it without disabling interrupts
#endif
// Call interrupt routine (only if initialised)
pha
lda NMINV
ora NMINV+1
beq !+
pla
jmp (NMINV)
!:
// Vector not initialized - call default interrupt routine
pla
jmp default_nmi_handler