Hi everyone, i want to compare a number in a register to see if its equal to or greater than a number.
For example i want to see if R1 is >= 60, i have a programming guide but i dont really understand what it is saying
CJNE R7,#60H,NOT_EQ
; ... .... ; R7 = 60H.
NOT_EQ JC REQ_LOW ; IF R7 < 60H.
; ... .... ; R7 > 60H.
it says something like this and it says by testing the carry flag it can determine whether is it greater or smaller than 60H. Im quite new to assembly language so if someone could explain this to me simply i would really appreciate it.
Also, how would i compare a number stored in 3 registers.. say R1-R2-R3? Say if i wanted R1-R2-R3 >= 60?
thanks!
For example i want to see if R1 is >= 60, i have a programming guide but i dont really understand what it is saying
CJNE R7,#60H,NOT_EQ
; ... .... ; R7 = 60H.
NOT_EQ JC REQ_LOW ; IF R7 < 60H.
; ... .... ; R7 > 60H.
it says something like this and it says by testing the carry flag it can determine whether is it greater or smaller than 60H. Im quite new to assembly language so if someone could explain this to me simply i would really appreciate it.
Also, how would i compare a number stored in 3 registers.. say R1-R2-R3? Say if i wanted R1-R2-R3 >= 60?
thanks!