6502 Machine Language Tables and Aids

  /     /   Assembly     Programming     Retro    

When programming using machine code there are a few useful aids that can make it easier to do. I have created a couple of tables for the 6502 that can make the process easier. They are based on tables found in 'Machine Code for Beginners', which Usborne have made available as a PDF for free.

6502 Machine Language Hex Codes

When writing a program in machine code we need to be able to quickly find the machine language hex code for the instruction we want to enter. The following table should make this fairly simple.

Two's Complement Hex Code

If we need to use a negative number such as when using relative addresses, then the following table will allow us to quickly find the correct hex code to use. For example the two's complement of -92 in hex is A4.

Source Files

If you want to alter these tables, I have put the original files used to create them in a repo on GitHub.

Creative Commons License
6502 Machine Language Tables and Aids by Lawrence Woodman is licensed under a Creative Commons Attribution 4.0 International License.

Share This Post


Sign up to get new articles straight to your inbox.

Delivered by FeedBurner

Related Articles

Sweet 16 (The 6502 Dream Machine) Ported to the VIC-20

Sweet 16 was created by Steve Wozniak to reduce code size and make it easier to handle 16-bit pointers and arithmetic for his Apple Integer BASIC. He wrote it around 1977 and referred to it in an arti...   Read More

Position Independent Code (6502) on the Commodore VIC-20

If we are writing 6502 machine code and want to to create a routine or program that can be placed in any location then we have to create Position Independent Code (PIC) or make the code relocatable. H...   Read More

Adding Basic Stubs to Assembly Language on the Commodore VIC-20

To make machine language programs more friendly it's nice to add a Basic stub which contains a line with a SYS statement to start the code. This is easy to do on the VIC-20 and the process gives you a...   Read More

Hand Assembling to Machine Code on the Commodore VIC-20

I quite enjoy designing machine language routines on paper and then hand assembling them. For many people this would have been their only option until they got a more advanced machine language monitor...   Read More

Creating a TTY Simulator in Assembly Language on the VIC-20

The Vicmon machine language cartridge is an excellent tool for exploring the Vic-20. This article and its associated video will show you how to use it to create a simple program that will change the n...   Read More