954,490 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

String To Int

Is there a way, in Assembly, to convert a string to an int (number)?

matiome
Newbie Poster
3 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

The code could do with being in the assembly equivlent to a function.
eg
###################
.string_to_int
more code here
###################

matiome
Newbie Poster
3 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

Sure, what have you tried so far?

For instance, can you do the same in C (or any other high level language) without resorting to some library function?

Start with "123" on paper, and think about how you might get say 3 from "3".

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

I'm afraid I don't know how to program in assembly or C very well!

matiome
Newbie Poster
3 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

What about little snippets of info like

'3' - '0' = 3
?

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You