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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/19/07 07:54
Read: times


 
#145939 - Check
Responding to: ???'s previous message

Whilst I'm rusty on x86 asm, you have no loop control and you don't test for illegal characters on the input string.

For your input string, the default method of ending the string is with a value of 0.

get character
if equal to 0,exit ;end of string
if > 39h,exit ;bad character
if < 30h,exit ;bad character
;
; character must be 0..9 in ascii
;



I'd suggest you spend some time with the debugger or simulator for your code. Single stepping through the code will show you where things go wrong. Don't keep posting code here until you're pretty sure it works. one or two hours with the debugger will allow you to test and identify the problems in your code. You'll also be able to tell your teacher how you tested it which should earn you more points.

Nevertheless, the code you've showed us is a good start. It's not correct, but the debugger will show you where it goes wrong.



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