| |
Scout
Registered: Dec 2002 Posts: 1570 |
Why does this crash?
Hi
During a IRQ (and also outside the IRQ) i want to address the RAM under $A000 and $E000.
I have to set address $01 to #$35, right?
Why oh why does this piece of code crash?
*=$0810
sei
lda #$35
sta $01
lda #$01
sta $d01a
lda #$7f
sta $dc0d
lda #$1b
sta $d011
lda #$00
sta $d012
lda #<irq
ldy #>irq
sta $0314
sty $0315
cli
infloop jmp infloop
irq
inc $0400
asl $d019
pla
tay
pla
tax
pla
rti
As you can see, no Kernal or Basic ROM routines were used.
After removing the lines with lda #$35 and sta $01 the program runs fine.
So what can be the problem?
I'm a bit puzzled about this.
R.
---
-= Silicon Ltd. =-
http://forum.siliconlimited.com |
|
| |
pernod Account closed
Registered: Nov 2004 Posts: 25 |
sta $0314
sty $0315
should be
sta $fffe
sty $ffff
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
And, IRQ routine must also save the A,X,Y registers to stack by itself now that Kernal is off. |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Pernod + Cadaver, thank you very much!
That did the trick!
Woo & yay!
R.
(R. for Rusty ;)
---
-= Silicon Ltd. =-
http://forum.siliconlimited.com |