syspalm.pp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1998 by Florian Klaempfl
  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 PALMOS}
  13. Unit SysPalm;
  14. {$I os.inc}
  15. Interface
  16. Type
  17. { type and constant declartions doesn't hurt }
  18. LongInt = $80000000..$7fffffff;
  19. Integer = -32768..32767;
  20. ShortInt = -128..127;
  21. Byte = 0..255;
  22. Word = 0..65535;
  23. { !!!!
  24. DWord = Cardinal;
  25. LongWord = Cardinal;
  26. }
  27. { The Cardinal data type isn't currently implemented for the m68k }
  28. DWord = LongInt;
  29. LongWord = LongInt;
  30. { Zero - terminated strings }
  31. PChar = ^Char;
  32. PPChar = ^PChar;
  33. { procedure type }
  34. TProcedure = Procedure;
  35. const
  36. { max. values for longint and int }
  37. MaxLongint = High(LongInt);
  38. MaxInt = High(Integer);
  39. { Must be determined at startup for both }
  40. Test68000 : byte = 0;
  41. Test68881 : byte = 0;
  42. { Palm specific data types }
  43. type
  44. Ptr = ^Char;
  45. var
  46. ExitCode : DWord;
  47. { this variables are passed to PilotMain }
  48. cmd : Word;
  49. cmdPBP : Ptr;
  50. launchFlags : Word;
  51. implementation
  52. { mimic the C start code }
  53. function _PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;
  54. begin
  55. cmd:=_cmd;
  56. cmdPBP:=_cmdPBP;
  57. launchFlags:=_launchFlags;
  58. asm
  59. bsr PASCALMAIN
  60. end;
  61. _PilotMain:=ExitCode;
  62. end;
  63. {*****************************************************************************
  64. System Dependent Exit code
  65. *****************************************************************************}
  66. Procedure system_exit;
  67. begin
  68. end;
  69. begin
  70. ExitCode:=0;
  71. end.
  72. {
  73. $Log$
  74. Revision 1.4 1999-01-18 10:05:56 pierre
  75. + system_exit procedure added
  76. Revision 1.3 1998/08/31 12:18:37 peter
  77. * export changed to public which is allowed in implementation
  78. Revision 1.2 1998/08/22 10:23:59 florian
  79. + PilotMain implemented
  80. Revision 1.1 1998/08/05 17:19:07 florian
  81. + first few things for PalmOS support
  82. }