syspalm.pp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 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.8 2000-01-07 16:41:51 daniel
  76. * copyright 2000
  77. Revision 1.7 2000/01/07 16:32:34 daniel
  78. * copyright 2000 added
  79. Revision 1.6 1999/09/17 10:00:40 florian
  80. * now using direct assembler mode
  81. Revision 1.5 1999/05/17 21:52:46 florian
  82. * most of the Object Pascal stuff moved to the system unit
  83. Revision 1.4 1999/01/18 10:05:56 pierre
  84. + system_exit procedure added
  85. Revision 1.3 1998/08/31 12:18:37 peter
  86. * export changed to public which is allowed in implementation
  87. Revision 1.2 1998/08/22 10:23:59 florian
  88. + PilotMain implemented
  89. Revision 1.1 1998/08/05 17:19:07 florian
  90. + first few things for PalmOS support
  91. }