What is not r0 in keil

Since you want to perform the XOR at runtime, you will have to use instructions to accomplish that. Unfortunately, the XRL instruction only operates on the A register, so you might have to do some rearranging. Assuming A is not available, but R3 is, you can do:

MOV R3, A ; save A to R3 MOV A, R0 XRL A, R1 XCH A, R3 ; restore A and put the result into R3 CJNE R3, #0, NOT_EQUAL

If A is available, you can use the CJNE accepting a memory operand knowing that registers are memory mapped:

MOV A, R0 CJNE A, 1, NOT_EQUAL ; 1 is the bank0 address of R1

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.

Accept and hide this message