bsyscall.inc 1.2 KB

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