문제

How can I compare two bits if they are equal or not in 8051? I need to jump if two bits are equal. I have a value in a register and I am searching if this value is equal another constant value. Example: I have "EDh" value and I have another value in R0 register.

도움이 되었습니까?

해결책

To compare a register and an immediate (a constant), and then conditionally jump, you can use the CJNE instruction.

다른 팁

It's been a long time since I worked with the 8051. But I seem to remember that the CJNE instruction was quite useful.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top