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

DS allocation

hi,

due A51 datasheet, it says:

DS
The DS directive reserves a specified number of bytes in a memory space. The DS directive has the following format:

label: DS expression
...
The DS directive reserves space in the current segment at the current address.
The current address is then increased by the value of the expression.

The question is:
?XD?VAR_XDATA	SEGMENT	XDATA
		RSEG	?XD?VAR_XDATA
VAR1:	DS	0x10
VAR2:	DS	0x10
May I be sure that these lines provide exactly indicated placement order? Assume that the XDATA segment is placed at address X:0x1000 finally. So is it always true that VAR1 will be placed at 0x1000 and VAR2 at 0x1010? Or is it possible that due some reason locator may change this order and I must use something like:
?XD?VAR_XDATA	SEGMENT	XDATA
		RSEG	?XD?VAR_XDATA
VARS:	DS	0x20
VAR1	XDATA	VARS+0x00
VAR2	XDATA	VARS+0x10

Sorry for the question but due foreign language, the datasheet explanation does not make me sure about the answer.

Thanks,
Oleg

0