Posts

Showing posts from January, 2025

(lab2)6502 Math Lab

Setup 1. Have the Driver open the  6502 Emulator  at  http://6502.cdot.systems  in another tab or window, keeping this lab open. Important: The emulator  does not  save your work automatically. Remember to periodically save it to a file (copy-and-paste the code or use the  Save  button to create local files). Recommendation: save your files to a directory, and use  git  to manage that directory. Initial Code 2. The following code moves a 5×5 graphic diagonally across the screen: ; ; draw-image-subroutine.6502 ; ; This is a routine that can place an arbitrary ; rectangular image on to the screen at given ; coordinates. ; ; Chris Tyler 2024-09-17 ; Licensed under GPLv2+ ; ; ; The subroutine is below starting at the ; label "DRAW:" ; ; Test code for our subroutine ; Moves an image diagonally across the screen ; Zero-page variables define XPOS $20 define YPOS $21 START: ; Set up the width and height elements of the data structure L...

(lab1)6502 Assembly Language Lab

Image
In this lab, you will learn some of the basics of  6502  assembly language, in preparation for learning more complex x86_64 and AArch64 assembly language. Resources 6502  Wiki Page 6502 Emulator Opcode/Instruction References On this Wiki 6502 Instructions 6502 Addressing Modes External 6502 instructions via the "Ultimate Commodore 64 Reference" site 6502 Opcodes with Register Definitions 6502 Opcodes with Detailed Operation Information Spreadsheet of bitmapped display memory locations Setup 1. Open the  6502 Emulator  at  http://6502.cdot.systems  in another tab or window, keeping this lab open. Important: The emulator  does not  save your work automatically. Remember to periodically save it to a file (copy-and-paste the code or use the  Save  button to create local files). Recommendation: save your files to a directory, and use  git  to manage that directory. Bitmap Code 2. The following code fills the emulator's bitmappe...