syspalm.pp 2.7 KB

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