These are a few minor optimizations that save a total of 70 bytes.
Comparisons to zero identified with grep -RP 'cm?p[yx]?\s+#\$?0?0\b' ./src
There were a few instances where the comparison was necessary as the zero flag would be unknown at the time of the comparison and were left alone. The remaining instances were either commented out altogether or altered to produce the same result with fewer bytes.
There were also a few instances of values being loaded into the accumulator that were already there, identified with grep -zoRP '(?mi)lda\s+(\w+)\s+cmp\s+\S+\s*$\s+b..\s+\S+\s*$\s+lda \1\s*$\s' src/
These are a few minor optimizations that save a total of 70 bytes.
Comparisons to zero identified with
grep -RP 'cm?p[yx]?\s+#\$?0?0\b' ./src
There were a few instances where the comparison was necessary as the zero flag would be unknown at the time of the comparison and were left alone. The remaining instances were either commented out altogether or altered to produce the same result with fewer bytes.
There were also a few instances of values being loaded into the accumulator that were already there, identified with
grep -zoRP '(?mi)lda\s+(\w+)\s+cmp\s+\S+\s*$\s+b..\s+\S+\s*$\s+lda \1\s*$\s' src/
Reference: http://forum.6502.org/viewtopic.php?f=12&t=4434#p50991 http://www.6502.org/tutorials/6502opcodes.html