                          Assembler coding - Lesson 4

                                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 Adressing                                                      
                                                                             
    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.                                          

   [IMG]_[IMG]
