Pular para o conteúdo principal
Renesas Brasil - Knowledgebase

What should I write on A-(-10) in the RA78K0? Is -1 interpreted as FF ?

Latest Updated:12/01/2011


I want to use A-(-10) in the RA78K0, but what should I write?
When I write SUB A, #-10, I get an out of range error.
When I write SUBW AX, #-10, I get an illegal operand error.
Is -1 interpreted as FF ?


Write the following:

SUB A,#LOW -10

In the above-described method you have been using, -10 is interpreted as FFF6, and the program's attempt to subtract this from the A register (8 bits) is what caused the error. This problem is solved by using the lower byte of the value to be subtracted.
Therefore, use the LOW operator.

Suitable Products