lda ExecReg
sta IndReg
-; Call module constructors, enable chained IRQs afterwards.
+; Activate chained interrupt handlers, then enable interrupts.
- jsr initlib
lda #.lobyte(__INTERRUPTOR_COUNT__*2)
sta irqcount
+ cli
-; Enable interrupts
+; Call module constructors.
- cli
+ jsr initlib
; Push arguments and call main()
; point for the break vector.
_exit: pha ; Save the return code on stack
+ jsr donelib ; Run module destructors
lda #$00
sta irqcount ; Disable custom irq handlers
- jsr donelib ; Run module destructors
; Address the system bank
.segment "PAGE2"
-; Call module constructors, enable chained IRQs afterwards.
+; Activate chained interrupt handlers, then enable interrupts.
-Init: jsr initlib
- lda #.lobyte(__INTERRUPTOR_COUNT__*2)
+Init: lda #.lobyte(__INTERRUPTOR_COUNT__*2)
sta irqcount
+ cli
-; Enable interrupts
+; Call module constructors.
- cli
+ jsr initlib
; Push arguments and call main()
; point for the break vector.
_exit: pha ; Save the return code
+ jsr donelib ; Run module destructors
lda #$00
sta irqcount ; Disable custom irq handlers
- jsr donelib ; Run module destructors
; Address the system bank