Keil Logo Arm Logo

CARM User's Guide

Discontinued

2-Byte Scalars

Scalars of type

  • signed short
  • and unsigned short

are stored using two bytes (16 bits) in little endian (default) or big endian (if the BIGENDIAN compiler directive is specified).

Little Endian (default)

When configured for little endian, the low-order byte is stored first, followed by the high-order byte. For example, an integer value of 0x1234 is stored in memory as follows:

Address Offset +0 +1
Contents 0x34 0x12

Big Endian

When configured for big endian, the high-order byte is stored first, followed by the low-order byte. For example, an integer value of 0x1234 is stored in memory as follows:

Address Offset +0 +1
Contents 0x12 0x34

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.