This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to add the two numbers in this controller

sir ,

i want to add to data from the external memory. so i need correct format for this controller


XBYTE[0x1234] = 0x55;
XBYTE[0x1245] = 0x11;

how to add this data and save it to another memory

Parents

  • sorry sir. i had concentrate in some other work. so i had using new thread list.then coming to my point. i want a data for ex 0x55 is data. i want to get the data from particular memory location. so i have using XBYTE. But ur ans coding is the data is transfer through acc. it is corect. but i want

    addend is store in the particular memory address &

    augend is store in the another memory address and

    result sum is stored in some other memory location

    
    #include<stdio.h>
    #include<reg51.h>
    #include<intrins.h>
    
    
    unsigned char xdata addend;
    unsigned char xdata augend;
    unsigned int  xdata sum;
    void main()
    {
    addend = 0x55;
    augend = 0x11;
    
    sum = addend + augend;
    }
    

Reply

  • sorry sir. i had concentrate in some other work. so i had using new thread list.then coming to my point. i want a data for ex 0x55 is data. i want to get the data from particular memory location. so i have using XBYTE. But ur ans coding is the data is transfer through acc. it is corect. but i want

    addend is store in the particular memory address &

    augend is store in the another memory address and

    result sum is stored in some other memory location

    
    #include<stdio.h>
    #include<reg51.h>
    #include<intrins.h>
    
    
    unsigned char xdata addend;
    unsigned char xdata augend;
    unsigned int  xdata sum;
    void main()
    {
    addend = 0x55;
    augend = 0x11;
    
    sum = addend + augend;
    }
    

Children