Intel XScale(R) technology topicLDRB - Load Register Byte

Syntax

LDR[condition]B dest, addr_mode

where:

 condition

One of 16 conditions. Refer to Condition Code Status.

 dest

destination register

 addr_mode

Addressing Mode 2: Load and Store Word or Unsigned Byte

Description

The LDRB instruction loads a byte from addr_mode into dest . This byte is zero-extended into a 32-bit word enabling 8-bit memory data to be manipulated. It also enables PC-relative addressing if used as a base register. The condition needs to be a valid value; else the instruction is rendered an NOP.

Note

A data abort exception is generated if an invalid load or store data access is attempted.

Addressing Mode

See Addressing Mode 2: Load and Store Word or Unsigned Byte

Flags Affected 

N

Z

C

V

Q

S

I

F

T

T

T

T

T

 

 

 

 

 

Encoding

31

 

28

27

26

25

24

23

22

21

20

19

 

16

15

 

12

11

 

0

 condition

 0

 1

 I

 P

 U

 1

 W

 1

 basereg

 dest

 addr_mode

Example

1                      @.text
2                      @.globl funcldrb
3                      @.align 0
4
5                      @ * * * LDRB (Addressing Mode 2) * * *
6                  AREA load_store, CODE, READONLY
7                  label1
8    00000000   E3A0B001   MOV   R11, #1
9    00000004   E2AB0001   ADC   R0, R11, #1
00000008   E4507000   LDRB  R7, label2
11
12   00000012   E12FFF17   BXR7
13
14   00000016   E3A0B001   MOV   R11, #1
15   00000020   E21B0001   ANDS  R0, R11, #1
16
17   00000024   E3A0000A   MOV   R0, #10
18   00000028   E3A01001   MOV   R1, #1
19   00000032   E5801000   STR   R1, [R0]
20   00000036   E5D02000   LDRB  R2, [R0]
21
22                         END
23
24                 label2
25                         DCD   0xdeadbeef
26                         DCB   "string"
27
28                         END

Further Information

See Addressing Mode 2: Load and Store Word or Unsigned Byte