Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user mjj ! (Registered 2018-02-17) You are not logged in 
CSDb User Forums


Forums > C64 Coding > TIL: The instruction after SEI can be executed before a pending IRQ is handled
2017-11-07 16:56
Krill

Registered: Apr 2002
Posts: 930
TIL: The instruction after SEI can be executed before a pending IRQ is handled

As described here: http://visual6502.org/wiki/index.php?title=6502_Timing_of_Inter..

I never knew this, after all those years, and thought i'd share this as a heads-up.

Thanks to bubis for pointing it out to me!
 
... 89 posts hidden. Click here to view all posts....
 
2017-11-11 11:45
Krill

Registered: Apr 2002
Posts: 930
Quoting Oswald
this is a religious argument
This may be an academic discussion (unless you need the size, 4K and all), but it's certainly nothing to do with religion. Well, unless you are a cargo cultist. :)
2017-11-11 11:56
Oswald

Registered: Apr 2002
Posts: 4173
"Either way all you are doing is adding extra bytes to your init code with zero improvements to reliability."

An IRQ may destroy A while you try to lda #$7f sta $dc0d. another irq from the other CIA may re-enable $dc0d. You may have interrupt sources from VICII too, fucking you up in all sorts of ways. (rewriting fffe/f after you've set them up for example).

"if there's a source you don't know about to disable, you're going to have bugs regardless of whether you SEI/CLI or not, as it's going to hit while your code isn't expecting it."

you may just forget about your super size effective irq setup and it will backfire when you least expect it.
2017-11-11 12:34
Krill

Registered: Apr 2002
Posts: 930
Now you're grasping at straws.
2017-11-11 13:06
Oswald

Registered: Apr 2002
Posts: 4173
Quote: Now you're grasping at straws.

Now you're trolling.
2017-11-11 13:26
Oswald

Registered: Apr 2002
Posts: 4173
anyhow I have real machine experience when I've been setting up raster irq without acking timer interrupt for ages, and then at a case it refused working, and I wondered how could I forget to set it up correctly. Since then I religiously ack it.
2017-11-11 14:23
Groepaz

Registered: Dec 2001
Posts: 8405
Quote:
An IRQ may destroy A while you try to lda #$7f sta $dc0d

in that case you have much bigger problems than anything discussed here
2017-11-11 17:23
Krill

Registered: Apr 2002
Posts: 930
And we are discussing interrupt setup when run from a plain BASIC environment. So disabling CIA1 interrupts is enough, no SEI/CLI required. Period. :)
2017-11-11 17:29
Groepaz

Registered: Dec 2001
Posts: 8405
even in most other scenarios... eg in a trackmo you pretty much want to always do it at a very defined point to avoid glitches - and then you exactly know what happens anyway, and dont need sei/cli at all. you DO need them only when you do brute force AEG style linking =)
2017-11-11 22:05
Frantic

Registered: Mar 2003
Posts: 1329
Okay. I'll always try to make sure to remember to use SEI/CLI then.
2017-11-11 22:06
Frantic

Registered: Mar 2003
Posts: 1329
Ha ha
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 - Next
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
Knight Rider/Excess
Frantic/Hack'n'Trade
Curlin
Heavy Stylus/RGCD
F7sus4/Samar
HughJass
Røly/MYD^STHD^TSA
Conjuror/Offence
Mihai
InuYaksa/Hokuto Force
Sentinel/Excess
Brataccas/HF
Sith
cadaver/covertbitops
Carrion/SHAPE
algorithm
Guests online: 64
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Comaland 100%  (9.6)
6 Lunatico  (9.6)
7 Incoherent Nightmare  (9.5)
8 Wonderland XII  (9.5)
9 Comaland  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.5)
2 Daah, Those Acid Pil..  (9.5)
3 Dawnfall V1.1  (9.5)
4 Synthesis  (9.5)
5 Treu Love [reu]  (9.5)
6 Merry Xmas 2017  (9.5)
7 FMX Music Demo  (9.4)
8 Dawnfall  (9.4)
9 Tribute to Bob Wakelin  (9.3)
10 Hardware Accelerated..  (9.3)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.4)
5 CreaMD  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.77 sec.