Advertisement
bkit4s0

[loop nasm]

Jun 16th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .text
  2.     global _start
  3. _start:
  4.     mov ecx, 10
  5.     mov eax, '1'
  6. l1:
  7.     mov [num], eax
  8.     mov eax, 4
  9.     mov ebx, 1
  10.     push ecx
  11.     mov ecx, num
  12.     mov edx, 1
  13.     int 0x80
  14.    
  15.     mov eax, [num]
  16.     sub eax, '0'
  17.     inc eax
  18.     add eax, '0'
  19.     pop ecx
  20.    
  21.     loop l1
  22.    
  23.     mov eax, 1
  24.     int 0x80
  25. section .bss
  26.     num resb 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement