#11841 - Tinyn - Tue Oct 21, 2003 7:27 am
So, I don't want to just do while(VCOUNT != 160), cause thats lame. But I can't seem to figure out how Im supposed to use the interrupt.
Do I...
And evrything important is done by the Interrupt Handler (or functions it calls)
Or...
The first puts junk in the InterruptHandler that feels wrong, but the second doesn't like its going to work that way, it won't return back to immediatly after the SWI function. I really don't see how this thing works.
PS: Why, why is my compiled C/C++ including a "b #07000160" in its ASM? 07000160 is a very very silly place to jump to...
Do I...
Code: |
int main(void){ // Stuff SWI_VBlankInterWait(); } InterruptHandler() { if(IF & VB_INTER) // Do real stuff } |
And evrything important is done by the Interrupt Handler (or functions it calls)
Or...
Code: |
void main(void) { // stuff while(1) { SWI_VBlankInterWait(); // Do real stuff } } void InterruptHandler() { // Do not much, cause just noticing that the interrupt happened and returning } |
The first puts junk in the InterruptHandler that feels wrong, but the second doesn't like its going to work that way, it won't return back to immediatly after the SWI function. I really don't see how this thing works.
PS: Why, why is my compiled C/C++ including a "b #07000160" in its ASM? 07000160 is a very very silly place to jump to...