Skip to content

Learning how to write assembly language for the 6502 microprocessor

License

Notifications You must be signed in to change notification settings

lewismoten/6502-program-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

6502-program-1

Learning how to write assembly language for the 6502 microprocessor.

What is 6502

The 6502 is an 8-bit microprocessor designed by MOS Technology in 1975. It's low cost enabled many affordable home PC's to be built. It can be found in devices such as the Atari, Commodore, and NES.

Programs

Developer Tools

Assembler

The assembler converts assembly language into machine code, resulting in a bin file, often put onto a ROM chip that the CPU retrieves its instructions from.

  • Web: 6502 Assembler
    • Remove comments from asm file
  • Windows: Use asm6 executable in ./tools/asm6. View readme
    • Command: .\tools\asm6\asm6.exe .\src\code-injection\main.asm
    • Creates .\src\code-injection\main.bin to put on your ROM.
    • Fork A fork of loopy asm6 assembler asm6f
  • Mac/Windows/Linux: vasm - a portable and retargetable assembler

Syntax Highlighting

This project contains asm files written in assembly language using the 6502 instruction set. Syntax highlighting makes it easier to view the file by applying color to specific commands and values.

  • Atom: Install the language-6502asm package for syntax highlighting on .asm files.

Hex Viewer

A hex editor is useful for viewing and editing bin files created by the assembler.

Virtual Machine

  • Web virtual 6502
    • Ignores entry specified at 0xFFFB, 0xFFFC. Starts at address 0x0000

Tutorial Videos

I'm following Ben Eater's tutorial videos on YouTube for two of his kits.

  • 6502 Computer Kit
  • Kit 1: Clock module.

555 Timer

6502 Kit

Personal Note

I've punched in machine code for:

This is my first experience writing in assembly language directly. In the past I've written machine language out on paper and flipped switches to enter programs manually for an 1802, and emulated 8080 CPU chips. I've only worked out the assembly in reverse afterwards while writing documentation on an 8800. Note that my Light Switch program on GitHub was published within a markdown file rather than an asm file.

I grew up with, and still have an Atari 400 with 16k of ram. I was unfamiliar with how to write to it in machine language. I am repairing it and hope one day to write programs in assembly. In the mean time, I've purchased a few chips on ebay and a 6502 kit.

About

Learning how to write assembly language for the 6502 microprocessor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published