This is part two of the ARM Assembly Basics tutorial series, covering data types and registers.
Similar to high level languages, ARM supports operations on different datatypes.
The data types we can load (or store) can be signed and unsigned words, halfwords, or bytes. The extensions for these data types are: -h or -sh for halfwords, -b or -sb for bytes, and no extension for words. The difference between signed and unsigned data types is:
- Singed data types can hold both positive and negative values and are therefore lower in range.
- Unsigned data types can hold large positive values (including ‘Zero’) but cannot hold negative values and are therefore wider in range.
Here are some examples of how these data types can be used with the instructions Load and Store:
ldr = Load Word ldrh = Load unsigned Half Word ldrsh = Load signed Half Word ldrb = Load unsigned Byte ldrsb = Load signed Bytes str = Store Word strh = Store unsigned Half Word strsh = Store signed Half Word strb = Store unsigned Byte strsb = Store signed Byte