.intel_syntax noprefix
.include "console.i"
.data
ask1: .long 0
ask2: .long 0
ans : .long 0
.text
ask: .asciz "Enter number: "
ans1: .asciz "multiplication= "
_entry:
Prompt ask
GetInt ask1
Prompt ask
GetInt ask2
mov eax, ask1
mov edx, ask2
mul edx
mov ans,edx
Prompt ans1
PutInt ans
PutEol
ret
.global _entry
.end
OUTPUT:
Enter number: 2
Enter number: 4
multiplication= 0
In above code it gives output as 0.
why it is showing 0 instead of 8 ?
edit1: added mov ans, edx