SPO600 Lab1 (Pt.5) - Challenges Question 2 Modified solution and reflection
Challenge 2 - Write a program which draws lines around the edge of the display with 6502 processor instruction: A red line across the top A green line across the bottom A blue line across the right side. A purple line across the left side. Modified solution The previous solution was using indirect addressing/ pointer and nested loop. However, since the screen has only 4 pages, it could be more readable and efficient by just using direct addressing and a single loop for the line across the left side/ right side. Here is the revised solution. ; add a purple line accrose left side ldy #$00 ; set index to 0 leftloop: lda #$04 ;purple sta $0200,y sta $0300,y sta $0400,y sta $0500,y tya clc adc #$20 tay bne leftloop ;add a blue line accrose right ...