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:01
Read: times


 
#145923 - I'm here so far !!
Responding to: ???'s previous message
mov al, ascii ; for the first element in the string "12345..."
mov ah, ascii+1; for the second element in the string"12345.."
.
.
.
sub al, 30h ; so i get the decimal and not the hex

But my question is how i would store all the number in eax so i can use another PROC to make eax into a binary

AtoB
mov eax, ascii ; move 1234.. to eax
mov ecx,2 ; move 2 as the divisor
LOOP: cmp edx,0 ; compare quotient
je EXITL ; exit
div ecx ; div eax from ecx
shl ebx, edx ; shift ebx for edx 0 or 1
EXITL: mov binary, eax
ret




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