How to store multiple values to multiple large addresses?

Viewed 11
;Store  0x2222333344445555 and 0x1111222233334444 at addresses 0x1000100010001000 and 0x1000100010001100
;respectively. Then load in x6 and x7 and calculate sum, difference, or and xor of the 2 values
;storing results in regs x28-x31.

a:  DD      b           
    ORG     0x1000100010001000          
b:  DD      0x2222333344445555          

c:  DD      d           
    ORG     0x1000100010001100      
d:  DD      0x1111222233334444

    ld      x6, a(x0)       
    ld      x6, 0(x6)       

    ld      x7, c(x0)       ;;ERROR wrong # args
    ld      x7, 0(x7)

For the above program, the first part during run-time, I'm loading the address of 0x1000100010001000 into register x6, then loading the value of that address into the same register. However, when I do the same for register x7, it gives an error that I'm using the ld operator wrong and specifies I'm missing an immediate value.

I'm suspecting it might be because I'm using the ORG assembler twice or using too many labels at the start? Is there a reason that this fails and is there a different approach to solve this problem?

1 Answers
b:  DD  a
e:  DD  c

    ORG     0x1000100010001100
    a:  DD 0x1111222233334444

    ORG     0x1000100010001000
    c:  DD 0x2222333344445555

Doing something like this for the heading and then operations on b and e solved the problem.

Related