bsyscall.inc 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2005 by Michael Van Canneyt,
  4. member of the Free Pascal development team.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$define FPC_BASEUNIX_HAS_FPPIPE}
  12. Function fppipe(var fildes : tfildes):cint;assembler;
  13. {
  14. This function puts the registers in place, does the call, and then
  15. copies back the registers as they are after the SysCall.
  16. }
  17. asm
  18. mov 42,%g1
  19. mov %i0,%o0
  20. ta 0x10
  21. bcc .LSyscOK
  22. nop
  23. call fpseterrno
  24. nop
  25. mov -1,%i0
  26. b .Lend
  27. nop
  28. .LSyscOK:
  29. st %o0,[%i0]
  30. st %o1,[%i0+4]
  31. mov 0,%i0
  32. .Lend:
  33. end;