Posts

Showing posts from January, 2025

LAB 2

Image
Introduction: In this lab, I will work with 6502 assembly language to perform how graphics are displayed and manipulated on a bitmapped screen. We provided a program that included a subroutine, which takes a rectangular image and places it at specified X and Y coordinates on the screen. The code calculates the correct screen memory address for the image using the position and dimensions provided, then copies the image data row by row to the screen memory. I began by testing this program by assembling and running it, ensuring it functioned correctly while observing how the DRAW subroutine works. After that I modified it to create a "bouncing graphic" animation. I started by setting an initial position for the graphic and defined increments for X and Y movement. The program then updated the graphic's position by adding these increments to its X and Y coordinates. When the graphic reached the screen's edges, the code reversed the direction by flipping the movement increm...

LAB 1

Image
Introduction & Set up In this lab we will be using a 6502 emulator , we will delve into the fundamentals of its assembly language. This includes topics such as bitmap coding, code modification, execution time and cycle calculations, addressing modes, and instruction sets. Bitmap Code The following code fills the emulator's bitmapped display with the colour yellow:    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         ; continu...