syscall.inc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. Copyright (c) 2002 by the Free Pascal development team
  3. Syscall implementation for linux m68k
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  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. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  15. MA 02111-1301, USA.
  16. ****************************************************************************
  17. }
  18. function FpSysCall(sysnr:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL0'];
  19. asm
  20. move.l sysnr, d0
  21. trap #0
  22. move.l d0, @Result
  23. end;
  24. function FpSysCall(sysnr,param1:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL1'];
  25. asm
  26. move.l sysnr, d0
  27. move.l param1, d1
  28. trap #0
  29. move.l d0, @Result
  30. end;
  31. function FpSysCall(sysnr,param1,param2:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL2'];
  32. asm
  33. move.l sysnr, d0
  34. move.l param1, d1
  35. move.l param2, d2
  36. trap #0
  37. move.l d0, @Result
  38. end;
  39. function FpSysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL3'];
  40. asm
  41. move.l sysnr, d0
  42. move.l param1, d1
  43. move.l param2, d2
  44. move.l param3, d3
  45. trap #0
  46. move.l d0, @Result
  47. end;
  48. function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL4'];
  49. asm
  50. move.l sysnr, d0
  51. move.l param1, d1
  52. move.l param2, d2
  53. move.l param3, d3
  54. move.l param4, d4
  55. trap #0
  56. move.l d0, @Result
  57. end;
  58. function FpSysCall(sysnr,param1,param2,param3,param4,param5:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL5'];
  59. asm
  60. move.l sysnr, d0
  61. move.l param1, d1
  62. move.l param2, d2
  63. move.l param3, d3
  64. move.l param4, d4
  65. move.l param5, d5
  66. trap #0
  67. move.l d0, @Result
  68. end;
  69. function FpSysCall(sysnr,param1,param2,param3,param4,param5,param6:TSysParam):TSysResult; assembler; [public,alias:'FPC_SYSCALL6'];
  70. asm
  71. move.l sysnr, d0
  72. move.l param1, d1
  73. move.l param2, d2
  74. move.l param3, d3
  75. move.l param4, d4
  76. move.l param5, d5
  77. move.l param6, a0
  78. trap #0
  79. move.l d0, @Result
  80. end;