| |
ready.
Registered: Feb 2003 Posts: 441 |
reading flags
Hello,
I am packing some parts together to be loaded using DreamLoad and I want to dedicate n clock cylces per frame for loading. To do this, at a certain of the demo code point I start a signle shot CIA timer to generate a NMI after some delay (during which the loader loads). I jump to the loader code, which later on is interrupted by the previously set NMI. I change a bit the stack and stack pointer for jumping back and forth between demo and loader and it seems to work....
....but after some frames it crashes. I suspect that the problem is that when the code enters the loader the flags are changed and I should save not only A, X, Y, SP but flags also.
Is there a way to read/write the flags all in one, like TSX and TXS for the stack pointer? |
|
... 10 posts hidden. Click here to view all posts.... |
| |
WVL
Registered: Mar 2002 Posts: 903 |
Oswald : effect happens in the IRQ ofcourse :)
And you get the horizontal scrollbar because of my too-long sentence between code tags (which I can't edit anymore..).. |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
i do it as the rest of you guys, one main interrupt that drives the effect, the code executing outside the irq i normally do loading in, and if i need it i issue more irq's from the main irq and doing a cli to get higher priority then the normal loop.
sometimes you want loading to be of higher priority then effect updates so you just switch place between the two. |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
Panta, and how do you make sure that the loader returns from time to time before finishing a whole file? |
| |
ready.
Registered: Feb 2003 Posts: 441 |
Oswald, your last question was exactly my original problem. I hope my previous posts clearify this. |
Previous - 1 | 2 - Next |