| |
Krill
Registered: Apr 2002 Posts: 2980 |
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.... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Now you're grasping at straws. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: Now you're grasping at straws.
Now you're trolling. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
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. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
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 |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
And we are discussing interrupt setup when run from a plain BASIC environment. So disabling CIA1 interrupts is enough, no SEI/CLI required. Period. :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
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 =) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Okay. I'll always try to make sure to remember to use SEI/CLI then. |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Ha ha |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
"and then you exactly know what happens anyway"
yeah, until you dont and start having bugs, which is always the case.
Suprised by Gunnar's hatred towards doing it the >right< way, having seen his overly pedantic sources. As a rule of thumb you dont want to rely on things being in a certain state when programming. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting Oswaldhatred towards doing it the >right< way, having seen his overly pedantic sources. "Hatred" is too strong a word in this context, and the flip side of pedantry is that unnecessary bytes also cause that certain itch. :)
And as for "right", again, either you come from BASIC, in which case there only is CIA1 interrupt to worry about, or you don't, in which case all bets are off and you're doing whatever specific stuff needs doing, with or without SEI/CLI. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 - Next |