Usi Usi
Usi Usi

Reputation: 2997

Assembler STRB instructions armv7

I have this code:

STRB            R2, [R0,R1]

and its opcode is 42 54

I'm using this table http://imrannazar.com/ARM-Opcode-Map

but I so 54 is the opcode of my strb istructions.

What I want is STRB R2, 1

I need to assign to R2 register the decimal value 1.

I can't understand wich opcode for STRB I need to use to do what I want.

help me please

Upvotes: 1

Views: 7081

Answers (1)

Jacques
Jacques

Reputation: 6040

To assign a small immediate to a register, just do:

mov r2, #1

strb is used to store to memory. You're trying to put a value into a register.

Upvotes: 6

Related Questions