Get the latest tech news

Easy 6502


by Nick Morgan, licensed under CC BY 4.0 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 2600, Commodore 64, Apple II, and the Nintendo Entertainment System.

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. Reassemble the code and look at the hexdump again - the argument to BNE should now be 03, because the instruction the processor is skipping past is now three bytes long. For example, if$00 and$01 contained the values$01 and$02, they would be referring to the second pixel of the display ($0201- remember, the least significant byte comes first in indirect addressing).

Get the Android app

Or read this on Hacker News