Posts

Showing posts from January, 2025

LAB 03

Image
6502 Assembly Programming Lab: Creating a Simple Number Guessing Game Introduction In this lab, I had the opportunity to dive into 6502 assembly programming by creating a simple program that meets a set of criteria for outputting both on the character screen and the graphics screen, accepting user input, and utilizing arithmetic operations. The task was part of a larger effort to explore the 6502 microprocessor, with the goal of building the skills needed for more complex x86_64 and AArch64 assembly language programming. Requirements The lab had the following main requirements: The program must work in the 6502 Emulator. It must output to both the character (text) screen and the graphics (bitmapped) screen. It must accept user input from the keyboard. It must incorporate arithmetic/math instructions (e.g., adding, subtracting, bitwise operations, etc.). Plan I planned the following structure for the Number Guessing Game : Generate a random number : Use the 6502's random byte genera...

LAB 02

Image
Exploring Mob Programming with 6502 Assembly Language What is Mob Programming? Mob Programming is an advanced form of Pair Programming where the entire team works together on the same problem at the same time, sharing a single computer and screen. While one person acts as the "Driver" and types the code, the others, known as "Observers," provide suggestions, guidance, and feedback. The role of the Driver rotates regularly to ensure that everyone contributes to the solution and gains experience. How to Implement Mob Programming in 6502 Assembly Step 1: Team Roles and Setup The Driver : The Driver is the person who actively writes the code. They are responsible for typing out the instructions and maintaining the structure of the program. Observers : These are the team members who aren't typing but are actively involved in the process. They provide input, suggest improvements, discuss ideas, and review code as it’s written. Their primary job is to ensure the code i...

LAB 01

Image
  Exploring Assembly Language with the 6502 Emulator: Lab 1 In this lab, I explored programming on the 6502 Emulator, which simulates the 6502 microprocessor. My objective was to fill a bitmapped display with colors, analyze the program's performance, and implement creative patterns. This lab offered an opportunity to understand low-level Assembly Language programming and optimize performance. The primary objectives were to: Fill the display with colors. Optimize code for performance. Experiment with patterns and behaviors on the screen. Tasks and Observations==> Original Bitmap Code 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 ; color number (yellow) ldy #$00 ; set index to 0 loop: sta ($40),y ; set pixel color at the address (pointer)+Y iny ; increment index bne loop ; continue until done the page (256 pixels) inc $41 ; increment the page ldx $41 ...