Guest User

Untitled

a guest
Oct 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. //Cooler_ explain
  2.  
  3. int write(int fd,const char * buf,unsigned int count)
  4. {
  5.  long __res;
  6.  asm("int $0x80"
  7.  : "=a" (__res)
  8.  : "0" (__NR_write), "b" ((long)fd),
  9.  "c" ((long)buf), "d" ((long)count));
  10.  if ((unsigned long)__res >= (unsigned long)-125)
  11.  {
  12.   errno = -__res;
  13.   __res = -1;
  14.  }
  15.  return (int) __res;
  16. }
Add Comment
Please, Sign In to add comment