Guidance
指路人
g.yi.org
software / rapidq / Examples / ASM / rqasm / vector.asm

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
bits 32

segment .text
start:
   enter 0, 0
   ; load arguments into registers
    mov eax, [ebp+16]
    mov ebx, [ebp+12]
   mov ecx, [ebp+8]
   ; initialize the result to 0
   mov dword [eax], 0
   mov dword [eax+4], 0
   mov dword [eax+8], 0
.process:
   ; process x
   mov edx, [eax]
   add edx, [ebx]
   mov [eax], edx
   ; process y
   mov edx, [eax+4]
   add edx, [ebx+4]
   mov [eax+4], edx
   ; process z
   mov edx, [eax+8]
   add edx, [ebx+8]
   mov [eax+8], edx
   ; iterate
   add ebx, 12
   loop .process
   ; return
   leave
   ret 16
  
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2001-08-06 16:55:10