Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Why does this crash?
2005-08-31 15:28
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
2005-08-31 15:49
pernod
Account closed

Registered: Nov 2004
Posts: 25
sta $0314
sty $0315

should be

sta $fffe
sty $ffff

2005-08-31 15:54
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.
2005-08-31 17:46
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
E$G/HF ⭐ 7
tlr
Epyx/TSA
Guests online: 124
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.035 sec.