Hello,
For the test purpose, I want to insert some machine code in my source code? Is it possible?
Thanks, Simon
This should work:
void RunThisWeirdOpCodeJustForCuriosity(void) { __asm { DB XX ; replace XX, YY with some opcode - e.g. undefined :-) for your MCU DB YY } }
Useful to test the trap while attempting to execute an illegal instruction, e.g.
P.S. Keep 2 instructions there to make code aligned at even addresses of your target - C16x needs it.
Regards, Nikolay.
why do you want to test it?
Hello Nikolay,
Thanks! I want these code to test the illegal instruction trap, it works!!