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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/18/07 22:42
Read: times


 
#145928 - you are on 8052.com...
Responding to: ???'s previous message
... so it's expected you "speak" at least a little bit the '51 asm:
DecAscii2Bin:
   mov   dptr,#ascii
   clr   a
   mov   r2,a
   mov   r3,a
   mov   r4,a
   mov   r5,a
DA2BLoop:
   clr   a 
   movc  a,@a+dptr
   jz    DA2BEnd
   add   a,#-'0'
   xch   a,r2
   mov   b,#10
   mul   ab
   add   a,r2
   mov   r2,a
   mov   a,b
   addc  a,#0
   xch   a,r3
   mov   b,#10
   mul   ab
   add   a,r3
   mov   r3,a
   mov   a,b
   addc  a,#0
   xch   a,r4
   mov   b,#10
   mul   ab
   add   a,r4
   mov   r4,a
   mov   a,b
   addc  a,#0
   xch   a,r5
   mov   b,#10
   mul   ab
   add   a,r5
   mov   r5,a
   inc   dptr
   jmp   DA2BLoop
DA2BEnd:
   ret

ascii: db '1234567890',0

   end

I doubt it will help too much, though...

JW


List of 19 messages in thread
TopicAuthorDate
ASCII to Binary in Assembly            01/01/70 00:00      
   What guidance do you need?            01/01/70 00:00      
      this might be part of the fun :-)            01/01/70 00:00      
         Not 8051?            01/01/70 00:00      
            Isn't a double 32 bits?            01/01/70 00:00      
               I think so            01/01/70 00:00      
                  No, it's not correct            01/01/70 00:00      
               No, that's wrong.            01/01/70 00:00      
                  Thanks            01/01/70 00:00      
      I'm here so far !!            01/01/70 00:00      
         Definitely not 8051!            01/01/70 00:00      
            you are on 8052.com...            01/01/70 00:00      
      Sorry Andy            01/01/70 00:00      
         Leg up            01/01/70 00:00      
            I think i got it! may u check it?            01/01/70 00:00      
               listen to your teacher            01/01/70 00:00      
               Check            01/01/70 00:00      
   Bonus question            01/01/70 00:00      
      Lol            01/01/70 00:00      

Back to Subject List