25 lines
336 B
Plaintext
25 lines
336 B
Plaintext
section .text
|
|
global _start
|
|
|
|
_multiply_regs:
|
|
mul ebx
|
|
mov eax, ebx
|
|
ret
|
|
|
|
_multiply_stack:
|
|
enter 2,0
|
|
mov eax, [esp+4]
|
|
mov ebx, [esp+8]
|
|
mul ebx
|
|
mov eax, ebx
|
|
leave
|
|
ret
|
|
|
|
_start:
|
|
mov ax, 6 ;The number to multiply by
|
|
mov ebx, 16 ;base number to multiply.
|
|
call _multiply_regs
|
|
push 6
|
|
push 16
|
|
call _multiply_stack
|