pszczepan Posted May 25, 2010 Report Posted May 25, 2010 (edited) Hi I have FOR.. NEXT Loop On the left there is a macro definition, at the right is a simulator The question is - why $SW27 after 6 loops has value 28 when it started from 10 and it has 2 increase. For me it should be 22. Thanks for clue. Edited May 26, 2010 by pszczepan
HM_Dava Posted May 26, 2010 Report Posted May 26, 2010 You have set the starting value of $SW27 to H10 which is has a decimal value of 16 so incrementing by 2 six times = 28
pszczepan Posted May 26, 2010 Author Report Posted May 26, 2010 Thanks for answer. Anyway I have still problem with 6th loop. If I set H10 for a first loop I get value in W10 next is H10 + 2 (H12) and value is for W12 next H12 +2 (H14) value is for W14 next H14 +2 (H16) value is for W16 next H16 +2 (H18) value is for W18 next H18 +2 (it is not 20 - it is 1A) but I want to get value for W20. How I have to implement it - I cannot find solution ?
ParaffinPower Posted May 26, 2010 Report Posted May 26, 2010 Hello My suggestions: 1. Don't use Hex 2. Check the index registers are ticked and that BINARY is selected (not BCD) This works on the simulator. Pp
pszczepan Posted May 26, 2010 Author Report Posted May 26, 2010 (edited) Where can I find this option "index registers are ticked and that BINARY is selected (not BCD)". I found that, but all the time I have here binary thanks Edited May 26, 2010 by pszczepan
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now