Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .text
  2.     global _start
  3.  
  4. _start:
  5.     mov ecx, 12
  6.     mov eax, '1'
  7.  
  8. l1:
  9.     mov [num], eax
  10.     mov eax, 4
  11.     mov ebx, 1
  12.     push ecx
  13.    
  14.     mov ecx, num
  15.     mov edx, 1
  16.     int 0x80
  17.    
  18.     mov byte [ws], 10
  19.     mov eax, 4
  20.     mov ebx, 1
  21.     mov ecx, ws
  22.     mov edx, 1
  23.     int 0x80
  24.    
  25.     mov eax, [num]
  26.     sub eax,'0'
  27.     inc eax
  28.     add eax,'0'
  29.     pop ecx
  30.     loop l1
  31.  
  32.     mov eax, 1
  33.     int 0x80
  34.  
  35. section .bss
  36.     num resb 1
  37.     ws resb 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement