NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: maplesirop on February 24, 2013, 02:33:56 AM

Title: how do you convert an ASCII character into a decimal number?
Post by: maplesirop on February 24, 2013, 02:33:56 AM
If I have an input

Code: [Select]
mov eax, 3
mov ebx, 0
mov ecx, input
mov edx, 10
int 0x80

how do I convert input into a decimal number?
Title: Re: how do you convert an ASCII character into a decimal number?
Post by: Mathi on February 24, 2013, 12:31:07 PM
Check this post

http://forum.nasm.us/index.php?topic=1578.msg6555#msg6555 (http://forum.nasm.us/index.php?topic=1578.msg6555#msg6555)
Title: Re: how do you convert an ASCII character into a decimal number?
Post by: maplesirop on February 24, 2013, 04:40:56 PM
thanks

Code: [Select]
mov eax, 3
mov ebx, 0
mov ecx, input
str2int data
mov edx, 10
int 0x80

would this convert ecx into an int decimal?