💾 Archived View for abildgaard.com › the6502.gmi captured on 2023-03-20 at 17:39:29. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
__ _ __ __ __ ____ _/ /_ (_) /___/ /___ _____ _____ __________/ /___ / __ `/ __ \/ / / __ / __ `/ __ `/ __ `/ ___/ __ / __ \ / /_/ / /_/ / / / /_/ / /_/ / /_/ / /_/ / / / /_/ / /_/ / \__,_/_.___/_/_/\__,_/\__, /\__,_/\__,_/_/ \__,_/\____/ /____/ Est. 17th of april 2021
The 6502, the CPU of my childhood. I've spent countless of hours playing games as Getaway to Apspha, Giana Sisters, Spy Hunter, Match Point, Int.Karate etc, on the Commodore 64.
Its long overdue that i cooked up some homebrew for this platform, because.. im curious, and i want to learn ..and .. well just because.
My first step will be to look under the hood of this tech wonder, and get familiar with the 6502 CPU and, assume the best way to begin is to start programming this device in assember. Assembler has never been my "weapon of choice" when i comes to programming. I have used assembler for creating small software patches, and did a x86 compiler that could do simple arithmetic.
Ultimately I wish to create a programming langauge specifically for the Commodore 64, CPU,SID and VIC-II graphics handling. I will be using the ANTLR4 parser generator, and (prolly) java as the compiler implementation language.
ACME assembler
All available in the arch package repository.
A - accumulator (8bit) X - index register (8bit) Y - index register (8bit) P - status register (8bit) PC - program counter (16bit PCH | PCL) S - stack pointer (9bit)
Handles addition, substraction, shifts, compares.
LDA #$16; loads the decimal value of 31 into the accumulator
as oppsosed to
LDA $16; loads the value on position 31 in ram(ZeroPage) into accumulator.
_________________ |7|6|5|4|3|2|1|0| |N|V|1|B|D|I|Z|C| ----------------