LDmicro indirect addressing - LDmicro/LDmicro GitHub Wiki

  • Example 1. PIC16F887: The general-purpose variable as the indirect address.
    The variable name that begins with a '#' character and subsequent as a general-purpose variable name treated as the indirect address of hardware register.
    Variable #Caddr treated as the indirect address of hardware register PORTA = 0x05.
    Address 0x05 is stored in general-purpose variable Caddr.
    The operation MOV #Caddr = 0x07070707 writes to the ports: #PORTA = 7; #PORTB = 7; #PORTC = 7; #PORTD = 7.
    default
    default
    portsPIC16F887_1.zip

  • Example 2. PIC16F887: The counter as the indirect address.
    default
    default
    portsPIC16F887_2.zip

  • Example 3. PIC16F887: Copying from an indirect address to an indirect address.
    default
    default
    portsPIC16F887_3.zip

  • Example 4. ATmega2560: Calculating the indirect address.
    default
    default
    portsATmega2560_1.zip