Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adolfo Builes
committed
Mar 23, 2010
0 parents
commit ed6238b
Showing
40 changed files
with
13,146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
segment .data | ||
matriz1: dq 4.0,1.0,4.0,1.0,4.0,1.0,4.0,1.0,4.0,1.0 | ||
matriz2: dq 3.0,1.0,4.0,1.0,4.0,1.0,4.0,1.0,4.0,1.0 | ||
msg2: db "%lf ,",10,0 | ||
|
||
segment .bss | ||
matriz3: resq 10 | ||
aux: resd 1 | ||
aux2: resd 1 | ||
aux3: resq 1 | ||
|
||
segment .text | ||
global main | ||
extern printf | ||
main: | ||
mov eax,matriz1 | ||
mov ebx,matriz2 | ||
mov edx,matriz3 | ||
mov ecx,10 | ||
jmp lp | ||
|
||
lp: | ||
fld qword [eax] | ||
fld qword [ebx] | ||
faddp st1 | ||
fstp qword [edx] | ||
add eax,8 | ||
add ebx,8 | ||
add edx,8 | ||
loop lp | ||
mov ecx,10 | ||
mov eax,matriz3 | ||
call printm | ||
jmp exit | ||
|
||
printm: | ||
mov [aux],eax | ||
mov [aux2],ecx | ||
push dword [eax+4] | ||
push dword [eax] | ||
push dword msg2 | ||
call printf | ||
add esp,12 | ||
mov eax,[aux] | ||
mov ecx,[aux2] | ||
add eax,8 | ||
loop printm | ||
|
||
exit: | ||
mov eax,1 | ||
mov ebx,0 | ||
int 0x80 |
Oops, something went wrong.