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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/28/05 07:44
Read: times


 
#85993 - Re: hex to bin
Responding to: ???'s previous message
Russel, if you substitute



     jc one 

     mov a,#'0' ;if a '0' bit 
     sjmp h2 

one: 
     mov a,#'1' ;if a '1' bit 

h2: 



with


     clr	a
     addc	a,#'0'



you've got the routine I always use. I hope all this has served some purpose to the original poster. At best it may have shown him a better way to approcah the problem.


List of 10 messages in thread
TopicAuthorDate
Hex 2 Bin problem with program 8051            01/01/70 00:00      
   you do it first            01/01/70 00:00      
      hex to bin            01/01/70 00:00      
         Re: hex to bin            01/01/70 00:00      
         Surely: BCD to bin (hex is bin?)            01/01/70 00:00      
            like this            01/01/70 00:00      
               brackets            01/01/70 00:00      
   Posting            01/01/70 00:00      
   better code            01/01/70 00:00      
      if you can't explain            01/01/70 00:00      

Back to Subject List