Search code examples
assemblymipscpuinstructionsmars-simulator

How to count the total number of instructions executed in an assembly program


What is the fastest way to calculate the total number of instructions executed by the CPU when executing a program written in assembly ? For small programs can do this manually , but for larger programs ? I write in assembly using Mars4.


Solution

  • Click Tools -> Instruction Counter -> Connect to MIPS. Then run your program.