Sign in to follow this  
Followers 0
MIKE31

cmp instruction

5 posts in this topic

HI how to write counter PV value as BCD in CMP(20) . Is it cnt 005 #230. I am not sure if this is right .Thanks for the help. Mike

Share this post


Link to post
Share on other sites
The format would be CMP C005 #230 to compare the PV of counter 5 to BCD 230.

Share this post


Link to post
Share on other sites
If i am not wrong CMP C0005 &5 should also work for BCD

Share this post


Link to post
Share on other sites
Well ............ technically you are correct. The binary value for numbers less than 10 is the same, but it is poor coding practice to provide a decimal argument to a function that requires BCD.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0