DEV Community

Joyce Wei
Joyce Wei

Posted on

SPO600 - 6502 Assembly Language Bitmap

During the introduction to 6502 assembly language lecture, we have first introduced with the X and Y registers and accumulator. Also, we have take a look into how to move around the bitmap and change the colour of the pixel .

In the following code, I have try to load 3 different colours into the accumulator and registers then draw 9 pixels into the bitmap as an excise on how to move the pixels around.

Result
result

Source Code

LDA #01
LDX #07
LDY #03

STA $0200
STX $020f
STY $021f

STA $0400
STX $040f
STY $041f

STA $05e0
STX $05f0
STY $05ff
Enter fullscreen mode Exit fullscreen mode

Opcode
LDA: LoaD Accumulator
LDX: LoaD X register
LDY: LoaD Y register

STA: STore Accumulator
STX: STore X register
STY: STore Y register

Top comments (0)