Question: I need help writting a code in nasm 64- bits I have problems convertin from ASCII table to decimal. Explanation: I have stored a number

I need help writting a code in nasm 64- bits

I have problems convertin from ASCII table to decimal.

Explanation:

I have stored a number from the user input in year which has an integer value 2108

I undertand the way it saved its is

year(name) | '2' | '1' | '0' | '8' |

so i want to change it to integer/decimal because right now its in ASCII.

so that i can use it later for a division like this;

mov edx, 0

mov eax, [year] ;sending year to eax for div

mov ebx, [num] ;num has 4 already difined inside .data sect

div ebx ;divide

mov eax, edx ; edx has the remainder of division puttinng it inside eax, i want the remainder in this case

cmp eax, 0

.................

I have tried working around but everytime i do the division it gives me a different remainder. Help

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!