Use Direct Variable Memory

The %M direct variable memory area has shared memory across different data types.

  • This can be used to have the XEM CPU automatically convert BYTE arrays into WORD or DWORD arrays.

  • The BYTE array size must be divisible by 2 with no remainder to provide a valid WORD array size.

  • The BYTE array size must be divisible by 4 with no remainder to provide a valid DWORD array size.

  • A WORD array can also be converted to a DWORD and BYTE data.

  • A DWORD array can be converted to a WORD or BYTE array.

Memory Area Data Type Designator Memory Direct Variable Name
By Data Type
M

X (bit)

1 BIT

%MX0 - %MX262143

B (byte)

8 bits

%MB0 - %MB32767

W (word)

16 bits

%MW0 - %MW16383

D (dbl word)

32 bits

%MD0 - %MD8191

L (long word)

64 bits

%ML0 - %ML4095

 

 

 

LP312-1