ldsr


Loads to system register.

[Syntax]

-

ldsr reg, regID

-

ldsr reg, regID, selID

 

The following can be specified as regID and selID:

-

Absolute expression having a value of up to 5 bits

[Function]

-

Syntax "ldsr reg, regID"

Stores the value of the register specified by the first operand in the system registerNote indicated by the system register number specified by the second operand.

-

Syntax "ldsr reg, regID, selID"

Stores the register value specified in the first operand into the system registerNote indicated by the system-register number specified in the second operand, and the group number specified in the third operand.

If selID is omitted, it is assumed that selID=0 was specified.

Note

For details of the system registers, see the Relevant Device's Hardware User's Manual provided with the each device.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

Caution

If the program status word (PSW) is specified as the system register, the value of the corresponding bit of reg is set as each flag.

[Caution]

-

If an absolute expression having a value exceeding the range of 0 to 31 is specified as regID, the assembler outputs the following message, then continues assembling using the lower 5 bitsNote of the specified value.

 

W0550018 : illegal regID for ldsr

Note

The ldsr machine instruction takes an immediate value in the range of 0 to 31 (0x0 to 0x1F) as the second operand.