Thanks to
@toms we can measure the exact duration of (almost) any routine!
Use cases:
- Check a code snippet takes exactly 64 NOPs, without having to count yourself (https://64nops.wordpress.com/2021/01/13/perfectly-accurate-z80-flags-and-cpc-timing/). Note: this involves some manipulation, so that's not yet as handy as with rasm. On the other hand, the manipulation itself can be written down in the source (e.g. in a conditional "IF profiling" section).
- Measure average/maximum time taken by a music player.
- Ensure a routine doesn't slow down over modifications, with automated tests.
This is distributed with orgams (http://orgams.wikidot.com/working), but doesn't require orgams.
- * prof.o: orgams version
- * prof.asm: ascii version