?DT?FormatBitSegment SEGMENT DATA OVERLAYABLE RSEG ?DT?FormatBitSegment local_a: DS 1 local_q: DS 1 local_c: DS 1 local_x: DS 1 local_e: DS 1
; the array is in xdata, address in dptr mov r7,#5 mov r0,#local_a loop: movx a,@dptr mov @r0,a inc dptr inc r0 djnz r7,loop
The linker doesn't even enter the picture, I'd say. It's the assembler that assigns relative positions within a given segment. The linker only modifies absolute positions of whole segments.