Improve Lab 2
In this post, I will enhance the Lab 2 . The previous work can be found here . This post will cover two main parts: 1. Improving the calculation performance. 2. Sharing experiences and reflections Improving the calculation performance Detailed information about the calculation performance can be found in this post . Following the professor 's feedback, it was identified that the previous fast version had a issue that it destroys all memory. Consequently, I have updated the code. To reduce the execution time, the iterated part(loop) should be used as minimum as possible. Each sta ($40), y command that utilizes indirect indexed addressing is repeated a total of six times. Instead of using indirect indexed addressing, replacing it with absolute addressing might significantly reduce the execution time. The following is the code with the applied changes. lda #$07 ldy #$00 loop: sta $0200,y iny sta $0300,y iny