Search code examples
ccpu-registersinstructions

fetch and decode instruction located at X address with c


I want to fetch and decode a instruction at address X. After that I want to increment the address by 4 and then execute the decoded instruction. The registers are 32 bit big endian. I am not asking for a solution, more a pointer or tips on how to do this in C, or if any of you know some good guides to follow.


Solution

  • You probably want assembly for this, not C. You could link assembly code into a C program, but you shouldn't write that in C.