Jump to content
43oh

donbindner

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by donbindner

  1. By my count, there are two off-by-one errors in this code (well, technically one is off by two). Since the minimum number of cycles that can be delayed within this code is 20 cycles, the first cmp should be replaced with cmp #2, R15. And because the condition of the loop is checked at the end of the loop instead of at the beginning, the sub should be replaced with sub #1, R15. Delays possible based on the value of R15 (and counting the 5 cycles for the caller's call instruction) are then: 0 -> 12 cycles 1 -> 12 cycles 2 -> 20 cycles 3 -> 30 cycles ....
×
×
  • Create New...