Changes

Jump to: navigation, search

6502 Assembly Language Lab

8 bytes removed, 02:38, 11 September 2023
Calculating Performance
=== Calculating Performance ===
4. Calculate how long it takes for the code to execute, assuming a 1 MHz clock speed (Watch [https://web.microsoftstream.com/video/ed7aedf1-fe6f-4b72-bbf1-c9b4e6e80af9 this video] if you would like a refresher for instructions on how to do this). Also calculate the total memory usage for the program code plus any pointers or variables.
5. Consider ways to decrease the time taken to fill the screen with a solid colour. Calculate the execution time of the fastest version of this program that you can create. Challenge: the fastest version of this program is more than twice as fast as the original version shown above!
# Add this instruction after the <code>loop:</code> label and before the <code>sta ($40),y</code> instruction: <code>tya</code>
# What visual effect does this cause, and how many colours are on the screen? Why?
# Add this instruction after the <code>tya</code>: <code>lsalsr</code>
# What visual effect does this cause, and how many colours are on the screen? Why?
# Repeat the above tests with two, three, four, and five <code>lsr</code> instructions in a row. Describe and explain the effect in each case.

Navigation menu