2
0

system.pp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 {$ifdef VER1_0}syspalm{$else}system{$endif};
  15. {$I os.inc}
  16. Interface
  17. {Platform specific information}
  18. const
  19. LineEnding = #10;
  20. LFNSupport = false;
  21. DirectorySeparator = '/';
  22. DriveSeparator = ':';
  23. PathSeparator = ';';
  24. FileNameCaseSensitive = false;
  25. maxExitCode = 255; {$ERROR TODO: CONFIRM THIS}
  26. Type
  27. { type and constant declartions doesn't hurt }
  28. LongInt = $80000000..$7fffffff;
  29. Integer = -32768..32767;
  30. ShortInt = -128..127;
  31. Byte = 0..255;
  32. Word = 0..65535;
  33. { !!!!
  34. DWord = Cardinal;
  35. LongWord = Cardinal;
  36. }
  37. { The Cardinal data type isn't currently implemented for the m68k }
  38. DWord = LongInt;
  39. LongWord = LongInt;
  40. { Zero - terminated strings }
  41. PChar = ^Char;
  42. PPChar = ^PChar;
  43. { procedure type }
  44. TProcedure = Procedure;
  45. const
  46. { max. values for longint and int }
  47. MaxLongint = High(LongInt);
  48. MaxInt = High(Integer);
  49. { Must be determined at startup for both }
  50. Test68000 : byte = 0;
  51. Test68881 : byte = 0;
  52. { Palm specific data types }
  53. type
  54. Ptr = ^Char;
  55. var
  56. ExitCode : DWord;
  57. { this variables are passed to PilotMain by the PalmOS }
  58. cmd : Word;
  59. cmdPBP : Ptr;
  60. launchFlags : Word;
  61. implementation
  62. { mimic the C start code }
  63. function PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;
  64. begin
  65. cmd:=_cmd;
  66. cmdPBP:=_cmdPBP;
  67. launchFlags:=_launchFlags;
  68. asm
  69. bsr PASCALMAIN
  70. end;
  71. PilotMain:=ExitCode;
  72. end;
  73. {*****************************************************************************
  74. System Dependent Exit code
  75. *****************************************************************************}
  76. Procedure system_exit;
  77. begin
  78. end;
  79. begin
  80. ExitCode:=0;
  81. end.
  82. {
  83. $Log$
  84. Revision 1.5 2004-09-03 19:26:52 olle
  85. + added maxExitCode to all System.pp
  86. * constrained error code to be below maxExitCode in RunError et. al.
  87. Revision 1.4 2002/09/07 16:01:25 peter
  88. * old logs removed and tabs fixed
  89. }