Guest User

Untitled

a guest
May 7th, 2012
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include 'system.asm'
  2. %include 'string.asm'
  3.  
  4. section .text
  5.  
  6. ;
  7. ; Writes Value stored in ESI to Console
  8. ; @param ESI Source String
  9. ; @modified NONE
  10. ;
  11. console.write:
  12.     push    eax
  13.     push    ebx
  14.     push    ecx
  15.  
  16.     mov eax, 4
  17.     mov ebx, 1
  18.        
  19.     call    string.length
  20.  
  21.     mov ecx, esi
  22.        
  23.     call    system.kernal
  24.  
  25.     pop     ecx
  26.     pop     ebx
  27.     pop     eax
  28.  
  29.     ret
  30.  
  31. ;
  32. ; Reads String Value from Console and stores it in EDI
  33. ; @return EDI Result String
  34. ; @modified EDI
  35. ;
  36. console.read:
  37.     push    eax
  38.     push    ebx
  39.  
  40.     mov     eax, 3
  41.     mov     ebx, 0
  42.  
  43.     call    system.kernal
  44.  
  45.     pop     ebx
  46.     pop     eax
Advertisement
Add Comment
Please, Sign In to add comment