Thanks for the reply, this was very usefull.
> sdcc -Wl-bBSEG=0x08 bits.c
This was exactly what i was looking for in the manual, a linker option
to set the start address of the BSEG. Have i overlooked this
or should someone add this to the manual?
> Another thing, I don't really understand why you need the option
> --idata-loc 0x23 ???
This is completely useless in this example, of course. But... consider
the folowing example, which is a real world example for me:
A semi large project that fills the DATA segment to up and around
0x70. So there are 16 bytes left in the data segment.
Now add to this the use of a couple of large arrays, all of which are
larger than 16 bytes. For simplicity, assume one array of chars that
is 112 bytes long. No other possiblilties than to place this (these)
array(s) in idata
With this example, leaving idata segment at the standard location,
would mean that the stack is only 16 bytes large.
Relocating the idata segment dowm to 0x71, would leave 32 bytes
for the stack. That is a large difference.
So the --idata-loc is basicaly to squeeze every byte out of the data +
idata segments to maximize the stack.
I hope i'm clear on this point and didn't make any misassumptions.