![]() ![]() Move the byte in Y into a memory location Move the byte in X into a memory location Move the byte in A into a memory location To move data to/from a register, we can use various move-instructions: Instruction Each of them can hold one byte (0-255 in decimal, 00-FF in hex and 00000000-11111111 in binary). ![]() We got the A register (accumulator), and the X and Y registers. In table 1, we can see the different registers. We got three registers in the 6502 that can be used to move data. You can move data into registers, and from registers to memory locations. You can move data between registers (a register is basically a container(variable) where you can store data), and execute commands. The 6502 microprocessor language consists of many different instructions and commands, that all work together to give functionality and graphics to your own programs. In this tutorial, we are going more deep into the general 6502 microprocessor language. ![]() In the previous article about C-64 we created a simple program that changed the background of the border and the main screen to a lot of different random colors. These instructions are given to the processor by writing the 6502 machine language. You control the brain by giving it instructions. It’s function is to control the C-64, so you can think of it as the C-64s brain. This article is all about writing code for the heart of the Commodore 64, the 6502 microprocessor. If you want more, please comment so I know if this is an interesting topic. Now that I started writing about C-64 programming, I decided to write one more article about it. Update: All needed files for this tutorial can be found in the GitHub repo linked in the bottom of this page. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |