Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .bss
  4.     msg: resw 1
  5.    section .text
  6.    global CMAIN
  7. CMAIN:
  8.  mov ebp,esp
  9.  GET_STRING msg,4276
  10.  mov ecx,msg
  11.  mov edx,msg
  12.  _push_loop:
  13.  mov al,[ecx]
  14.  cmp al,0
  15.  jz _pop_loop
  16.  
  17.  push ax
  18.  inc ecx
  19.  jmp _push_loop
  20.  
  21.  _pop_loop:
  22.  pop ax
  23.  
  24.  mov [edx],ax
  25. inc edx
  26. cmp edx,ecx
  27. jz _done
  28. jmp _pop_loop
  29.   _done:
  30.  PRINT_STRING msg
  31.  
  32.  ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement