]> git.sur5r.net Git - cc65/blobdiff - libsrc/gamate/crt0.s
more cleanup
[cc65] / libsrc / gamate / crt0.s
index 5df5ad38cd6df7c6ad0ade8694d6d93bc3a35509..ead45b7ea1b90bff858e8384fe87db6978e4867d 100644 (file)
@@ -17,8 +17,12 @@ Start:
         sei
         cld
 
+        ldx     #0
+        stx     ZP_IRQ_CTRL     ; disable calling cartridge IRQ/NMI handler
+
         ; Setup stack and memory mapping
-        ldx     #$FF            ; Stack top ($01FF)
+        ;ldx     #$FF            ; Stack top ($01FF)
+        dex
         txs
 
         ; Clear the BSS data
@@ -36,6 +40,8 @@ Start:
         ; Call module constructors
         jsr     initlib
 
+        lda     #1
+        sta     ZP_IRQ_CTRL     ; enable calling cartridge IRQ/NMI handler
         cli     ; allow IRQ only after constructors have run
 
         ; Pass an empty command line