asmpic said:
Do you know how to increment actual registers and not their corresponding values?
I'm not even sure what the question means?.
But a 14 bit PIC only has 35 instructions - so a very short glance at the MPASM helpfile shows you that there are only two possible commands
INCF
INCFSZ
The first increments a GPR, the second increments a GPR and skips the next line if the result equals zero.
So if you have a variable (GPR) called Test, then
INCF Test, f
Will increment it's value by one, and write the result back to Test.
INCF Test, w
Will increment the value by one, and put the result in the W register.
If you mean how do you do an index to the registers?, in general terms you don't! - however, there is a special register (not a GPR) called FSR which allows you to do this - which you look to be trying to use.
But because you're not setting variables up properly, nor initialising their values, your code will never work.
If you disassemble your code after you've compiled it (WinPicProg does this really well) you can see what your code is actually producing - in the earlier sample I disassembled the first two lines copy a variable to W (this variable has not been assigned a value though), and then writes it to another variable. This results in a random value being written to the second variable - which you really don't want!.