I'm a beginner in assembly language. I try to multiply two numbers.
section .data
a dw 1;
b dw 2;
global _start
section .text
_start:
mov eax, [a];
mov ebx, [b];
movv:
mul ebx;
mull:
mov eax, 1;
mov ebx, 0;
int 80h;
I compile and run it with the following command: nasm -g -f elf pr1.s && ld -m elf_i386 pr1.o -o pr1 && gdb ./pr1
When I in gdb view the register eax value I get 131073 and ebx 65538
Why I get this values instead of 1 and 2?