Do programming to see if the RAM location 37H contains an even value. If so, send it to P2. If not, make it even and then send it to P2. Test result in Simulator registers windows.
ORG 0000H
MOV A,37H
MOV B,#02H
DIV AB
MOV A,B
CJNE A,00H,NEXT
SJMP GO
NEXT:INC 37H
GO:
MOV P2,37H
END
Comments
Post a Comment
if you have any doubts,please let me know