# Modern tools to learn old school MOS 6502 assembly language (2024-03-21)

**URL:** <https://pluralist.net/t/modern-tools-to-learn-old-school-mos-6502-assembly-language-2024-03-21/115>\
**Category:** Code Reading\
**Created:** [March 21, 2024, 4:00am UTC](https://pluralist.net/t/modern-tools-to-learn-old-school-mos-6502-assembly-language-2024-03-21/115 "2024-03-21T04:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![delyan](https://pluralist.net/user_avatar/pluralist.net/delyan/32/245_2.png) [@delyan](https://pluralist.net/u/delyan)\
**Post date:** [March 21, 2024, 4:00am UTC](https://pluralist.net/t/modern-tools-to-learn-old-school-mos-6502-assembly-language-2024-03-21/115/1 "2024-03-21T04:00:00Z")

</div>

We love [**EOR #$FF** : 6502 Ponderables and Befuddlements](https://www.amazon.com/dp/1312154004?ref_=cm_sw_r_mwn_dp_W2DTWPDP0M5E3VS1741Y&language=en_US) and highly recommend it.  
Here is how the book begins: “As I write, Apple is selling an M2 Ultra processor that has 134 billion transistors. In contrast, the humble 6502, released in 1975, has a mere 3,510. **To the programmer, the 6502 offers bottom-up simplicity, without limiting top-down expressivity.** And therein lies the appeal of 8-bit retro-computing: _the hardware, firmware, and software can be completely understood and reshaped by motivated hobbyists – a microcosm for creativity_.”

We love this passage - yes the simplicity of 6502 and expressivity is what has drawn us into the 8-bit retro-computing scene.

Most importantly - recommendations I found in the book and am currently enjoying:

# [Easy 6502](https://skilldrick.github.io/easy6502/)

by [Nick Morgan](https://twitter.com/skilldrick)  
with built-in exercises and examples such as:

```asm
LDA #$01
STA $0200
LDA #$05
STA $0201
LDA #$08
STA $0202

```

As it turns out (per [Nick Morgan](https://twitter.com/skilldrick)): “Bender in Futurama [has a 6502 processor for a brain](http://www.transbyte.org/SID/SID-files/Bender_6502.jpg). [Even the Terminator was programmed in 6502](http://www.pagetable.com/docs/terminator/00-37-23.jpg).”

 ![image](https://pluralist.net/uploads/default/original/1X/1275289c01ae12993ea535e4689f5f2284e8cb12.jpeg)

 ![image](https://pluralist.net/uploads/default/original/1X/7adc75a36e7fdc1630b0fac63d08b0444318d2bc.jpeg)

* * *

# [dasm 8-bit macro assembler](https://dasm-assembler.github.io)

 ![image](https://pluralist.net/uploads/default/original/1X/f07ebae3545f5e5eda7e625997c2cdf2833fcf70.png)

* * *

- [The Second Book Of Machine Language - Chapter 10](https://www.atariarchives.org/2bml/chapter_10.php#:~:text=The%20Second%20Book%20Of%20Machine%20Language%20%2D%20Chapter%2010&text=Here%20are%20the%2056%20mnemonics,6502%20(or%206510)%20chip).

* * *

The MOS Technology 6502 processor has a set of 56 instructions. Here’s a list of these instructions categorized by their operation:

### Load/Store Operations

- LDA (Load Accumulator)
- LDX (Load X Register)
- LDY (Load Y Register)
- STA (Store Accumulator)
- STX (Store X Register)
- STY (Store Y Register)

### Arithmetic

- ADC (Add with Carry)
- SBC (Subtract with Carry)

### Increment & Decrement

- INC (Increment Memory)
- INX (Increment X Register)
- INY (Increment Y Register)
- DEC (Decrement Memory)
- DEX (Decrement X Register)
- DEY (Decrement Y Register)

### Shifts

- ASL (Arithmetic Shift Left)
- LSR (Logical Shift Right)
- ROL (Rotate Left)
- ROR (Rotate Right)

### Logical

- AND (Logical AND)
- ORA (Logical Inclusive OR)
- EOR (Exclusive OR)
- BIT (Bit Test)

### Control

- JMP (Jump)
- JSR (Jump to Subroutine)
- RTS (Return from Subroutine)
- RTI (Return from Interrupt)

### Branches

- BCC (Branch if Carry Clear)
- BCS (Branch if Carry Set)
- BEQ (Branch if Equal)
- BMI (Branch if Minus)
- BNE (Branch if Not Equal)
- BPL (Branch if Plus)
- BVC (Branch if Overflow Clear)
- BVS (Branch if Overflow Set)

### Status Flag Changes

- CLC (Clear Carry Flag)
- SEC (Set Carry Flag)
- CLI (Clear Interrupt Disable)
- SEI (Set Interrupt Disable)
- CLV (Clear Overflow Flag)
- CLD (Clear Decimal Mode)
- SED (Set Decimal Mode)

### System Functions

- BRK (Force Interrupt)
- NOP (No Operation)

### Register Transfers

- TAX (Transfer Accumulator to X)
- TXA (Transfer X to Accumulator)
- TAY (Transfer Accumulator to Y)
- TYA (Transfer Y to Accumulator)
- TSX (Transfer Stack Pointer to X)
- TXS (Transfer X to Stack Pointer)

These instructions are the foundation of programming for the 6502 processor, which was widely used in early home computers and video game consoles.
