Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/22/01 03:11
Read: times


 
#11805 - RE: Comparing two numbers
Check out the CJNE instruction. The instruction is CJNE operand1,operand2,BranchAddress

"The Carry bit (C) is set if operand1 is less than operand2, otherwise it is cleared."

So a common structure is:

CJNE A,address,$+3
JC A_smaller_than_address
SJMP A_greater_or_equal_to_address

Additionally, CJNE doesn't change accumulator nor the contents of address while SUBB will change the accumulator.

Good luck,
Craig Steiner


List of 4 messages in thread
TopicAuthorDate
Comparing two numbers            01/01/70 00:00      
RE: Comparing two numbers            01/01/70 00:00      
RE: Comparing two numbers            01/01/70 00:00      
RE: Comparing two numbers            01/01/70 00:00      

Back to Subject List