I'd like to call assembly (specifically MIPS) code from my C program and call the C back from the assembly.
I've decided on the GNU GCC as my compiler, (I am also guessing I need an emulator?)
I'm on a x86 Win 7 machine.
There are some things that are very unclear to me how this can/should work out.
- If MIPS will be using a load-store archi with 32 regs and the C will continue to use a register memory archi because I'm on x86?
- Now that I want to call mips assembly instead of x86 assembly, can/do I still use asm() ?
- If MIPS uses more registers than C, will I be able to access those registers from my C code?
Can anyone help me out with this, perhaps by pointing out where I could learn this bit of sorcery?
Thanks
Disclaimer: I am working on a verification of self modifying code project for credit in school, and this code is going to be used as an example, but I am not getting any credit for this code.