Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/31/03 08:41
Read: times


 
#51788 - Converting Decimal to Hex (difficult)
Hi all,

I asked for help a month ago. In the thread:
http://www.8052.com/forum/read.phtml?id=48699
which abhishek singh's code did the job.

Now, I want to do the same thing just backward.
for example:
30(H)(suppose to be 30) --> 1E(H)

I need to use it with this time model: 12:34
every digit represents a register. Every register is a value of a pressed key.
so, I enter the time (press 4 keys), the system automatically treat it like a hex number (suppose to be decimal) and I want it to continue counting in hex.

I can use this code to combine two digits:

SWAP R2
MOV A, R2
ORL A, R1
MOV R1, A ;The hours in R1


How can I convert it to hex?
Thanks and please give me suggestions about solving this issue.





List of 7 messages in thread
TopicAuthorDate
Converting Decimal to Hex (difficult)            01/01/70 00:00      
   RE: Converting Decimal to Hex (difficult)            01/01/70 00:00      
      To Menno            01/01/70 00:00      
         RE: To Menno            01/01/70 00:00      
   RE: Converting Decimal to Hex (difficult)            01/01/70 00:00      
   The problem was solved            01/01/70 00:00      
   RE: Converting Decimal to Hex (difficult)            01/01/70 00:00      

Back to Subject List