mad1231999

Untitled

Apr 26th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .data
  2. msg     db      "Hello, World!", 0x0a
  3. len     equ     $-msg
  4.  
  5. section .text
  6. global _start
  7.  
  8. _start:
  9.         mov     cx, 10  ; loop counter
  10.  
  11.         _loop_start:
  12.                 push    cx      ; push loop counter onto stack, so it doesn't get overwritten
  13.  
  14.                mov     ebx, 0x01
  15.                mov     ecx, msg
  16.                mov     edx, len
  17.                mov     eax, 0x04
  18.                int     0x80
  19.  
  20.                pop     cx
  21.                dec     cx
  22.                cmp     cx, 0
  23.                jge     _loop_start
  24.  
  25.        _done:
  26.                mov     ebx, 0x00
  27.                mov     eax, 0x01
  28.                int     0x80
Advertisement
Add Comment
Please, Sign In to add comment