You can convert single digits from ASCII to number by simply subtracting '0'. To convert a multiple digit number, I guess you could count the number of digits and and multiply each digit by a power of ten corresponding to its position and sum all these to get the final number. But I'm wondering if there is any compact way to do this in x86-16 assembly.
tmp = 0;for() { tmp = tmp*10 + (*digits++)-'0'; }in asm however you like, with appropriate loop boundaries. i.e. the usualatoialgorithm. If you can use 32-bit addressing modes, you can multiply by 10 + add in 2 LEA instructions.