Fix bad sp and writing to zp0
This commit is contained in:
@@ -64,7 +64,7 @@ loop:
|
||||
lda IRQ_DAT_ADDR
|
||||
sta tmp1
|
||||
pla
|
||||
and $07 ; A is now 0-7
|
||||
and #$07 ; A is now 0-7
|
||||
tax
|
||||
inx ; X is now 1-8
|
||||
lda #$01
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
.import _init_interrupt_controller
|
||||
.import _init_rtc
|
||||
|
||||
.zeropage
|
||||
|
||||
finish: .res 1
|
||||
|
||||
.code
|
||||
|
||||
_nmi_int:
|
||||
@@ -16,13 +20,18 @@ _init:
|
||||
ldx #$ff
|
||||
txs
|
||||
|
||||
LDA #<(__STACKSTART__ + __STACKSIZE__)
|
||||
STA sp
|
||||
LDA #>(__STACKSTART__ + __STACKSIZE__)
|
||||
STA sp+1
|
||||
|
||||
jsr _init_interrupt_controller
|
||||
jsr _init_rtc
|
||||
|
||||
; enable interrupt 0
|
||||
lda #$00
|
||||
jsr pusha
|
||||
lda #$1
|
||||
lda #$0
|
||||
jsr _enable_irq
|
||||
|
||||
@end: bra @end
|
||||
Reference in New Issue
Block a user