메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

What is the instruction for using accumulator?

Latest Updated:01/23/2014

Question:

A instruction which uses the accumulator does not result in the expected value.

Answer:

Check whether any of the following instructions is used in the interrupt processing routine.

- DSP function instructions (MACHI, MACLO, MULHI, MULLO, MVFACHI, MVFACMI, MVTACHI, MVTACLO, RACW)
- Multiply instructions (EMUL, EMULU, MUL)
- Multiply-accumulate instruction (RMPA)

The above instructions use the accumulator. If any of the above instructions are used in the interrupt processing routine, prevent the accumulator from breaking by using method (1) or (2) below.
(1) Prohibit interrupts from occurring at the places where the accumulator is used (PSW.I).
(2) Push the accumulator value at the start of the interrupt processing routine, and restore the accumulator value at the end.

For more on the accumulator, see Accumulator (ACC) in the Register Set of the CPU section of the CPU chapter of the User's Manual: Hardware.

Suitable Products
RX210
  • 이 기사가 도움이 되셨나요?