0

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.


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

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

CircuitPython 2019!

Have an amazing project to share? The Electronics Show and Tell with Google Hangouts On-Air is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

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

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Over 30 years of hardware development – An interview with Parallax, Inc.

Wearables — Sight line savvy

Electronics — You’ve got the power! (right?)

Biohacking — Moment : The Oura Ring Meditation Feature

Python for Microcontrollers — Step into the light with Python! #Python #Adafruit #CircuitPython #PythonHardware @circuitpython @micropython @ThePSF @Adafruit

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.