6502-assembly

Reference 6502 assembly instructions, addressing modes, and optimization patterns.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/hwatkins/my-skills --skill 6502-assembly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 6502-assembly
Source: https://github.com/hwatkins/my-skills/tree/main/skills/6502-assembly
Command: npx skills add https://github.com/hwatkins/my-skills --skill 6502-assembly

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a complete 6502 assembly reference to help developers learn, write, and optimize code across multiple derivatives.

Core Features & Use Cases

  • Comprehensive instruction set overview, addressing modes, memory layout, and platform-specific patterns for 8-bit/retro computing.
  • Real-world use cases across NES, Commodore 64, Apple II, BBC Micro, and more, with patterns for common algorithms and optimizations.
  • Quick lookup and learning aid for questions about opcodes, addressing modes, or architecture challenges.

Quick Start

Show me a 6502 addressing mode example across NES and Commodore 64.

Frequently Asked Questions about 6502-assembly

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write 6502 assembly code for NES or Commodore 64?

6502 assembly code for NES or Commodore 64 requires understanding the instruction set, addressing modes, and memory layout specific to each platform's hardware architecture. This reference provides complete opcode details, addressing modes, and platform-specific patterns to help developers write and optimize code for 6502-based systems.

What addressing modes are available in the 6502 instruction set?

The 6502 instruction set supports multiple addressing modes including immediate, zero page, absolute, indexed, and indirect addressing to access memory locations. This reference details each addressing mode with examples, showing how they function across platforms like the Apple II and BBC Micro for precise memory manipulation.

Can I implement 16-bit math operations and multiplication on the 6502 architecture?

Implementing 16-bit math, multiplication, and division on the 6502 architecture requires combining multiple 8-bit instructions using specific algorithms and carry flag management. This reference provides common algorithmic patterns for multi-byte arithmetic operations, enabling complex math on 8-bit retro computing systems.

How do I optimize 6502 assembly routines for better performance?

Optimizing 6502 assembly routines involves selecting efficient addressing modes, minimizing clock cycles per instruction, and leveraging zero page memory for frequently accessed variables. This reference outlines platform-specific patterns and optimization strategies to reduce execution time and memory footprint across 6502 derivatives.

Does this 6502 assembly reference cover platform-specific patterns for the BBC Micro and Apple II?

Yes, this 6502 assembly reference covers platform-specific patterns for the BBC Micro, Apple II, NES, and Commodore 64. It details memory layout, hardware quirks, and architecture challenges unique to each system, helping developers adapt generic 6502 opcodes to different retro computing environments.