Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,24 +1,7 @@
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
.text
.globl multiply
.type multiply,@function
multiply:
movl 4(%esp), %eax
mull 8(%esp)
ret

View file

@ -1,7 +1,24 @@
multiply proc arg1:dword, arg2:dword
mov eax, arg1
mov ebx, arg2
section .text
global _start
_multiply_regs:
mul ebx
mov eax, ebx
ret
multiply endp
_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

View file

@ -1,5 +1,7 @@
invoke multiply, 6, 16
;or..
push 16
push 6
call multiply
multiply proc arg1:dword, arg2:dword
mov eax, arg1
mov ebx, arg2
mul ebx
mov eax, ebx
ret
multiply endp

View file

@ -0,0 +1,5 @@
invoke multiply, 6, 16
;or..
push 16
push 6
call multiply