Closed nippur72 closed 5 years ago
I've struggled with merging this one, because this routine doesn't have to be optimized IMO and I found the former code better readable...but screw it...I appreciate the contribution, so I merged it anyway...:-)
BTW: Why can't you build it yourself? An Eclipse install with Maven support should be enough to build it.
In the INITNARRAY subroutine, decrementing
TMP2_ZP
by one can be done more efficiently withDEC
instead ofSBC #1
(recipe taken from here -- section "Incrementing & Decrementing").This in turn shortens also the "is-zero" check after
NLOOPNOV2
(noLDA
beforeBNE
).I also used the
X
register within the loop in order to avoid settingA
to 0 at each iteration.I haven't tested it (can't build)