The title says it all but I just want to make sure. I'll apologise in advance.
The vector table and routine are in uncontended memory, but if the stack is in contended memory, is there a risk of ULA snow?
The routine would be something like this:
PUSH ....
CALL routine
POP
EI
RET
Daft question about interrupts...
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Daft question about interrupts...
No. As long as the I register is outside the $40–$7f range, you’re good.
Also, the kosher way to return from an ISR is RETI, not RET.
Also, the kosher way to return from an ISR is RETI, not RET.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Daft question about interrupts...
Cheers. I usually keep the stack at the top so have never considered this before. I may be using paging this time so stack is at the bottom. And I'm rusty as hell.
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Daft question about interrupts...
Different strokes . . .
I, too, usually relocate the stack toward the top of RAM to avoid contention. Keep in mind that contention patterns on the 128K/+2 are different from those on the +2A/+3.
I, too, usually relocate the stack toward the top of RAM to avoid contention. Keep in mind that contention patterns on the 128K/+2 are different from those on the +2A/+3.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Daft question about interrupts...
Not strictly true. If you set the I register to a value between $C0 and $FF and have contended memory paged in at $C000 you will crash an old school 128K (but not a +2A/+3 where the HAL bug was fixed). This happens even if you aren't using IM2 or if interrupts are disabled. For maximum compatibility you should keep I between $80 and $BF.Ast A. Moore wrote: ↑Wed Dec 06, 2017 12:49 pm No. As long as the I register is outside the $40–$7f range, you’re good.
Also, the kosher way to return from an ISR is RETI, not RET.
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Daft question about interrupts...
Thanks, I was only vaguely aware of that!
But, as far as the 48K machine is concerned, I’m correct. The +2A/+3 doesn’t exhibit the snow effect (probably, for the very reason you described). Sadly, there are a couple of games out there that used it as an embellishment.
But, as far as the 48K machine is concerned, I’m correct. The +2A/+3 doesn’t exhibit the snow effect (probably, for the very reason you described). Sadly, there are a couple of games out there that used it as an embellishment.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.