fork download
  1. not dh ; sys_read count = edx = 65280
  2. sub esp,edx ; allocate 65280 bytes on stack
  3.  
  4. mov al,3 ; 0x03 = "read" syscall
  5. mov ecx,esp ; sys_read buf = ecx = stack pointer
  6. int 0x80 ; eax = sys_read(stdin, esp, 65280)
  7.  
  8. add ecx,eax ; add read bytes to stack pointer
  9.  
  10. inc ebx ; sys_write fd = 1 = stdout
  11. mov edx,ebx ; sys_write count = 1
  12.  
  13. reverse:
  14. dec ecx ;
  15. cmp ecx,esp ; check if we've gone too far
  16. jl done ;
  17.  
  18. mov al,4 ; 0x04 = "write" syscall
  19. int 0x80 ; eax = sys_write(stdout, ecx, 1)
  20.  
  21. jmp reverse
  22.  
  23. done:
Runtime error #stdin #stdout 0s 5384KB
stdin
A man a plan a canal Panama
stdout
amanaP lanac a nalp a nam A