??? 05/18/04 03:49 Read: times |
#70582 - RE: A simple problem - Adnan Responding to: ???'s previous message |
Hi,
If you want to store anything more than 255 decimal or 0xFF then you have to resort to multi byte storage methods. One simple way would be declare these spaces in the user RAM area based on the actual space that you need. And in deciding this you will need to know to convert from BCD to HEX and back. Some such conversion routines are available in my home page http://www.8052.com/users/RRAGHU and look under the CodeLib. And as to your next query if your processor will hang if R1 overflows : It purely depends on what you do with the incremented value of the R1 register. By itself the R1 register will just rollover to Zero and thats it. But if you are using THIS value to divide something, or in some other operation, then wierd things can happen. Note : While everybody understands the unoffical abbreviations, some members are keen to maintain the decorum of this forum by avoiding the SMS version. And no harm in following that discipline.( Once out of this forum and with my Cell phone you must see the SMS that I use !!) Enjoy. Raghu |