Lab 02: 6502 Assembly Language Lab
 Paste this code into the emulator:   lda #$00 ; set a pointer at $40 to point to $0200  sta $40  lda #$02  sta $41   lda #$07 ; colour   ldy #$00 ; set index to 0  loop: sta ($40),y ; set pixel   iny  ; increment index  bne loop ; continue until done the page   inc $41  ; increment the page  ldx $41  ; get the page  cpx #$06 ; compare with 6  bne loop ; continue until done all pages     Add this instruction after the  loop:  label and before the  sta ($40),y  instruction:   tya   What visual effect does this cause, and how many colours are on the screen? Why?   Answer:  The bitmap would display columns  of 16 colors repeating once.    The reason is because we use "lda #$07" to load accumulator "a" as our designated  color, when  we add "tya" at the start of our loop, we transfer "y" to "a". So as "y" increment, so does our color "a". And since the max number of "y" we have is 32, it would repeat the color ...