#24107 - ProblemBaby - Wed Jul 28, 2004 2:08 am
Iam trying and trying to add some asm code into my
project and Ive two big problems.
1.
Ive added added some BIOS-calls the one ive tried works except for one!
VBlankIntrWait.
Code (yes it is a lot C but I dont think that is the problem):
Can someone see an error?
2.
Ive made thumb_func-functions they worked until a tried to do
one function that is anything special. But VBA tell me this:
Unsupported BIOS function 9f called from 02017490. A BIOS file is needed in order to get correct behaviour.
The interesting thing is if Ive a function like:
this one works.
but if I put one intruction more onto it i got the error.
even if I do this:
and this works if I take away the other function that is in the file
except the head and bx lr.
strange huh!!
project and Ive two big problems.
1.
Ive added added some BIOS-calls the one ive tried works except for one!
VBlankIntrWait.
Code (yes it is a lot C but I dont think that is the problem):
Code: |
void VBlankIntrWait(); void VBlankInt() { REG_IF |= 0x1; } void AgbMain() { IntrTable[0] = VBlankInt; REG_DISPSTAT = 0x8; REG_IE |= 0x1; REG_IME = 1; while (1) { // Do stuff VBlankIntrWait(); } } // then in a .S file .arm .align 4 .section .iwram .global VBlankIntrWait VBlankIntrWait: SWI 0x050000 BX lr |
Can someone see an error?
2.
Ive made thumb_func-functions they worked until a tried to do
one function that is anything special. But VBA tell me this:
Unsupported BIOS function 9f called from 02017490. A BIOS file is needed in order to get correct behaviour.
The interesting thing is if Ive a function like:
Code: |
.thumb_func .global func: func bx lr |
this one works.
but if I put one intruction more onto it i got the error.
even if I do this:
Code: |
.thumb_func .global func: func bx lr bx lr |
and this works if I take away the other function that is in the file
except the head and bx lr.
strange huh!!