syspalm.pp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. begin
  64. ExitCode:=0;
  65. end.
  66. {
  67. $Log$
  68. Revision 1.3 1998-08-31 12:18:37 peter
  69. * export changed to public which is allowed in implementation
  70. Revision 1.2 1998/08/22 10:23:59 florian
  71. + PilotMain implemented
  72. Revision 1.1 1998/08/05 17:19:07 florian
  73. + first few things for PalmOS support
  74. }