zhaniko93
New Member
Hello and happy new year to all
I have faced such a problem: (pic16f84a assembly)
I want to save 3 digit (in binary, in decimal 0-7) numbers in registers and I have lot of them, so each register for each of them will not be enough. I decided to do so:
in one register (REG1), save first 3 digits for first one, (0-2), second (3-5) to second digit and last two digits of REG1 and first digit of REG2 to the third one. in conclusion, I need 3 registers for 8 numbers which is enought but I want this to be done automatically. I mean, I will call something, which will save number which is in W in appropriate place, (so that I will need 3 registers for 8 numbers) and than when I call another thing, it must return the n'th number I saved. I'm stuck. can anyone help me?
I have faced such a problem: (pic16f84a assembly)
I want to save 3 digit (in binary, in decimal 0-7) numbers in registers and I have lot of them, so each register for each of them will not be enough. I decided to do so:
in one register (REG1), save first 3 digits for first one, (0-2), second (3-5) to second digit and last two digits of REG1 and first digit of REG2 to the third one. in conclusion, I need 3 registers for 8 numbers which is enought but I want this to be done automatically. I mean, I will call something, which will save number which is in W in appropriate place, (so that I will need 3 registers for 8 numbers) and than when I call another thing, it must return the n'th number I saved. I'm stuck. can anyone help me?