Guest User

Untitled

a guest
Aug 10th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .text
  2.  
  3. GLOBAL system_print
  4.  
  5. system_print:
  6.     push    ebp
  7.  
  8.     mov     ebp, esp
  9.  
  10.     ; Save registers that will be used by function
  11.     push    eax
  12.     push    ebx
  13.     push    ecx
  14.     push    edx
  15.  
  16.     ; Do your stuff
  17.     mov     ecx, [ebp + 8]
  18.     mov     edx, [ebp + 12]
  19.  
  20.     mov     eax, 4
  21.     mov     ebx, 1
  22.    
  23.     call    system.kernal
  24.  
  25.     ; Restore registers to previous state
  26.     pop     edx
  27.     pop     ecx
  28.     pop     ebx
  29.     pop     eax
  30.  
  31.     pop     ebp
  32.    
  33.     ret
  34.  
  35. system.kernal:
  36.     int     80h
  37.     ret
Add Comment
Please, Sign In to add comment