smiles
Advanced Member level 4

I am writing Assembly code (Pic16F877) for a small project.
For example, you enter '1' then '2' then '3' and '4' keys and you get a number 1234 in a word variable named Delay (10101111100010). I get it by the way 1x10+2=12, then 12x10+3=123, then 123x10+4=1234.
Do multiplying with 10 by rotate left (delete carry flag) three times then plus itself two times
Now my problem is don't find out the way to contain 1234.
I used
Delay res 2 (... and seem that what I think is word then is only two separate bytes and the rotate left isn't effective)
Caused that I want to use 1234 like 1234xDelay1ms and the word contain 1234 just only need to decrease by 1 rapidly then we have 1234ms delay (time for lamp light up, for i.e)
...
in brief, how can I store value 5000 for creating 5000xDelay1ms (5s) ? :|
Could you give me some ways to solve this, thanks !!!
For example, you enter '1' then '2' then '3' and '4' keys and you get a number 1234 in a word variable named Delay (10101111100010). I get it by the way 1x10+2=12, then 12x10+3=123, then 123x10+4=1234.
Do multiplying with 10 by rotate left (delete carry flag) three times then plus itself two times
Now my problem is don't find out the way to contain 1234.
I used
Delay res 2 (... and seem that what I think is word then is only two separate bytes and the rotate left isn't effective)
Caused that I want to use 1234 like 1234xDelay1ms and the word contain 1234 just only need to decrease by 1 rapidly then we have 1234ms delay (time for lamp light up, for i.e)
...
in brief, how can I store value 5000 for creating 5000xDelay1ms (5s) ? :|
Could you give me some ways to solve this, thanks !!!