Posts

Showing posts from October, 2024

SPO600 LAB 1

Image
6502 Assembly Language Lab Hello! My name is Harleen Singh, and this post is about my experiments with 6502 assembly language as part of the SPO600 course.  Bitmap Code The first task was to run the following code to fill the display with yellow using the 6502 processor: Here is the code which was given to us in Lab 1 instructions. lda #$00 ; set a pointer in memory location $40 to point to $0200 sta $40 ; ... low byte ($00) goes in address $40 lda #$02 sta $41 ; ... high byte ($02) goes into address $41 lda #$07 ; colour number ldy #$00 ; set index to 0 loop: sta ($40),y ; set pixel colour at the address (pointer)+Y iny ; increment index bne loop ; continue until done the page (256 pixels) inc $41 ; increment the page ldx $41 ; get the current page number cpx #$06 ; compare with 6 bne loop ; continue until done all pages Calculating Performance To calculate the execution time for my code running on a 1 MHz clock, I broke it down into two parts: the inn...