Changes

Jump to: navigation, search

6502 Assembly Language Lab (Old Version)

499 bytes added, 02:19, 16 September 2021
no edit summary
4. Test the code by pressing the Assemble button, then the Run button. If the there are any errors assembling (compiling) the code, they will appear in the message area at the bottom of the page. Make sure the code is running correctly and that everyone in your group understands how it works. Try some experiments: use different colours, or draw only every second dot.
=== Writing Code, Part 1 ===
5. Write code to draw a green line across the top of the bitmap screen and a blue line across the bottom.
=== Writing Code, Part 2 ===
6. Extend the previous code to draw a yellow line down the left side of the screen and a purple line down the right side.
 
=== Performance ===
 
7. In the [[#Resources|Resources]] section, the opcode/instruction references will tell you the number of machine cycles that each instruction will take. If your system is running at 1 MHz (a typical speed for a 6502 processor), each machine cycle will take 1 microsecond (uS). What is the total time that your code (from step 6) will take to execute?
=== Optional (Recommended): Experiments ===
 Go back to the bitmap code above, and try these experiments:# 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>lsa</code>
Post an entry on your blog describing your experiments in this lab. Include:
# An introduction, so that someone who happens across your blog will understand the context of what you're writing about.
# The results from the ''Bitmap Writing Code'' portion portions of the lab, describing what happened in each case including the code, a description of how the code works, and the reasons for itresults produced.# The results from Your answers to the two ''Writing CodePerformance'' portions of the labquestion, including the code, a description of how you reached your answer.# Optional (Recommended): the code worksresults of the Experiments section (above), and the results producedyour explaination for each observed result.# Your experiences with this lab -- your impressions of the Assembly Language, what you learned, and your reflections of on the process.
Remember to follow the [[Blog Guidelines]] as you write.

Navigation menu