Before I say anything, can someone maybe direct me to a good assembly help forum? I feel kind of 'rule-breaky' just posting my questions in the lounge of the C++ forum, I know it's for off-topic stuff, but still.
But anyways, I'm having a problem with adding two single digit numbers (Since they are ASCII I do the add 48 thing, I know that doesn't work past 9, giving some guidance on this would really be appreciated). Anyways, heres the code.
Why are you storing a number in a byte? You should be using at least a word length. Also remember you can use the atod (ASCII to decimal) and itoa (convert back to ASCII) macros from io.h. Should be something simple like:
1 2 3 4 5
value1 DWORD 10
value2 DWORD 20
mov eax, value1 ; (Copy value1 into eax register, remember first byte is in al.)
add eax, value2 ; (Two memory operands cannot be used with the add instruction.)
Okay, the word fixes fixed it. Can you explain exactly what you mean for converting ASCII to decimal? I'm making this in the A86 Assembler, not a C++ or C compiler with _asm.