Copy Link
Add to Bookmark
Report

Addressing Modes

Assembler coding - Lesson 4

eZine's profile picture
Published in 
Assembler coding
 · 24 Nov 2022

Addressing Modes

Here we will discuss some addressing modes of the C64.

Below are some of the easier Addressing Techniques available on the C64.

Implicit Addressing

This is where the instruction operates exclusively inside the processor.

Example

  10 TAY - Transfer Contents of Accumulator to Y Register


Immediate Addressing

This is where the op-code is followed by a constant.

Example

  10 LDA #50


Absolute Addressing

This is where the op-code is followed by a 16 bit memory address.

Example

  10 LDA $4000

or

  10 LDA 16384 (This is the same but just in decimal)


Indexed Addressing

This method is used to access a block of data. Here a 16 bit address and an 8 bit register are added together to give the final memory location.

Examples

  10 LDA BLOCK,X - (Load value into accumulator from address BLOCK + X register) 
10 LDA $4000,X
10 STA TABLE,Y

Other modes are available but not readily used in early programming techniques.

The Programmers Reference Guide lists all op-codes and addressing modes available for each instruction.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT