How compare to number in 8051 Assembly?

Status
Not open for further replies.

panda1234

Full Member level 2
Joined
Jan 22, 2015
Messages
125
Helped
4
Reputation
8
Reaction score
4
Trophy points
18
Activity points
1,172
Hi,
I want to create this expression in assembly how to do that?
for example: if(i<10) ...
 

Code:
            ;if(i < 10)
              CLR  C
	     MOV  A, i
	     SUBBB  A, #0AH
	     MOV	A,( i + 1)
	     SUBB  A, #00H
            JNC  skipifnotless
                 ; { code to do if i is less than 10}
skipifnotless:
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…