Don't like ads? PRO users don't see any ads ;-)

Arch_formula

By: t1nman on May 2nd, 2012  |  syntax: ASM (NASM)  |  size: 0.34 KB  |  hits: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. extern ExitProcess
  2.  
  3. %include "io.inc"
  4.  
  5. section .data
  6.         x dd 1
  7.         y dd 2
  8.         z dd 1
  9.        
  10. section .text use32
  11.  
  12. ..start:
  13.                 mov eax, [x]
  14.                 add eax, [y]
  15.                 push eax
  16.                 mov eax, [x]
  17.                 imul dword [y]
  18.                 mov ebx, eax
  19.                 pop eax
  20.                 sub eax, ebx
  21.                 mov ebx, [z]
  22.                 xor edx, edx
  23.                 idiv ebx
  24.                
  25.                 push eax
  26.                 call outi
  27.                
  28.                 push dword 0
  29.                 call ExitProcess