Two resources for learning 6502 assembly language #VintageComputing #AppleII #Commodore #Atari2600 #NES #BBCMicro @skilldrick

6502

While Intel, IBM, and Microsoft made the x86 processors widespread, the early computer scene was dominated by the MOS 6502 microprocessor.

Early Commodores and Apples all used the 6502 along with the Atari 2600, the BBC Micro and the Nintendo Entertainment System and why not, it was inexpensive and had features beyond Intel’s chips.

Here are some resources for learning to code in 6502 assembly:

  1. The book 6502 Assembly Language Programming by Lance A. Leventhal is on the Internet archive. I like this book series and had the 68000 version. Projects using the 6502 help you program in real world scenarios.
  2. Easy 6502 by Nick Morgan is a website that provides interactive on-screen programming in 6502 assembly:

In this tiny ebook I’m going to show you how to get started writing 6502 assembly language. The 6502 processor was massive in the seventies and eighties, powering famous computers like the BBC Micro,Atari 2600Commodore 64Apple II, and the Nintendo Entertainment System. Bender in Futurama has a 6502 processor for a brainEven the Terminator was programmed in 6502.

So, why would you want to learn 6502? It’s a dead language isn’t it? Well, so’s Latin. And they still teach that. Q.E.D.

(Actually, I’ve been reliably informed that 6502 processors are still being produced by Western Design Center and sold to hobbyists, so clearly 6502 isn’t a dead language! Who knew?)

Seriously though, I think it’s valuable to have an understanding of assembly language. Assembly language is the lowest level of abstraction in computers – the point at which the code is still readable. Assembly language translates directly to the bytes that are executed by your computer’s processor. If you understand how it works, you’ve basically become a computer magician.

Then why 6502? Why not a useful assembly language, like x86 (PC/mac)? Well, I don’t think learning x86 is useful. I don’t think you’ll ever have to write assembly language in your day job – this is purely an academic exercise, something to expand your mind and your thinking. 6502 was originally written in a different age, a time when the majority of developers were writing assembly directly, rather than in these new-fangled high-level programming languages. So, it was designed to be written by humans. More modern assembly languages are meant to written by compilers, so let’s leave it to them. Plus, 6502 is fun. Nobody ever called x86 fun.

Hopefully you’ll look to grab one of the classic computers (on the cheap) and look to talk to it in its native language. If you mess up, who cares, reset it and try again. More and more people are writing new programs and games for classic machines. Get started today.

Are you a 6502 enthusiast? Let us know in the comments below.


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


4 Comments

  1. Oh wow. I used to do 6502 assemler on an Apple clone. I wonder if I remember any of it. Might need to look up some resources and play around. Does anyone make an Apple ][ on a chip? Or maybe an emulator for the Raspberry Pi?

  2. The Apple ][ had its "monitor", the text interface where bytes could be manipulated in RAM, and its mini-assembler, which translated 6502 mnemonics into machine code one line at a time. I’d code graphic and sound subroutines to speed up my BASIC games. (But my best hack ever was on a PC clone in C and x86 assembly, and I _did_ call it fun.)

  3. LinApple is a Apple ][ emulator for Linux that can be configured to run on a Raspberry Pi. AppleWin is a very good emulator for Windows.

  4. Ah the things you could with pokesvand peeks and some asm vode… 🙂

Sorry, the comment form is closed at this time.