Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to convert the string in X to an integer and save it in Y

Status
Not open for further replies.

asamxx

MIS
Jul 21, 2010
1
US
I need IA-32 instructions to convert the string in X to an integer and save it in Y.
INCLUDE Irvine32.inc

.data
X byte "659"
Y word ?
.code

begin:

?

end begin
 
1. What is the numerical (think Ansii codes) value of the first character ("6")?

2. How would you convert this numerical value to its respective digit value? ("6" -> 6)?

3. How do you convert the digit value to its place value? (6 -> 600)

I won't write the code for you as you won't learn anything that way but answer the above questions, and it should help the light bulb come on. Writing your own code for your own solution is 90% of the fun of programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top