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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started