bins


Insert bit in register (Bitfield Insert)

[Syntax]

-

bins reg1, pos, width, reg2

 

The following can be specified as ipos and width:

-

Absolute expression having a value of up to 5 bits

[Function]

Loads the lower width bits in general-purpose register reg1 and stores them from the bit position bit pos + width - 1 in the specified field in general-purpose register reg2 in bit pos. This instruction does not affect any fields in general-purpose register reg2 except the specified field, nor does it affect general-purpose register reg1.

[Description]

-

The assembler generates one bins machine instruction.

[Flag]

CY

---

OV

0

S

"1" if the word data MSB of the result is "1", otherwise, "0"

Z

"1" if the operation result is "0"; otherwise, "0"

SAT

---

[Caution]

-

If an absolute expression satisfying any one of the conditions below is specified as pos or width, the assembler outputs the following message and stops assembling.

-

pos exceeds the range of 0 to +31

-

width exceeds the range of 1 to +32

-

(pos + width - 1) exceeds the range of 0 to 31

E0551200 : Syntax error.