system.pp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Florian Klaempfl
  4. member of the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$define PALMOS}
  12. {$ASMMODE DIRECT}
  13. unit system;
  14. {$I os.inc}
  15. Interface
  16. {Platform specific information}
  17. const
  18. LineEnding = #10;
  19. LFNSupport = false;
  20. DirectorySeparator = '/';
  21. DriveSeparator = ':';
  22. PathSeparator = ';';
  23. FileNameCaseSensitive = false;
  24. CtrlZMarksEOF: boolean = false; (* #26 not considered as end of file *)
  25. maxExitCode = 255; {$ERROR TODO: CONFIRM THIS}
  26. MaxPathLen = 256;
  27. AllFilesMask = '*';
  28. Type
  29. { type and constant declartions doesn't hurt }
  30. LongInt = $80000000..$7fffffff;
  31. Integer = -32768..32767;
  32. ShortInt = -128..127;
  33. Byte = 0..255;
  34. Word = 0..65535;
  35. { !!!!
  36. DWord = Cardinal;
  37. LongWord = Cardinal;
  38. }
  39. { The Cardinal data type isn't currently implemented for the m68k }
  40. DWord = LongInt;
  41. LongWord = LongInt;
  42. { Zero - terminated strings }
  43. PChar = ^Char;
  44. PPChar = ^PChar;
  45. { procedure type }
  46. TProcedure = Procedure;
  47. const
  48. { max. values for longint and int }
  49. MaxLongint = High(LongInt);
  50. MaxInt = High(Integer);
  51. { Must be determined at startup for both }
  52. Test68000 : byte = 0;
  53. Test68881 : byte = 0;
  54. { Palm specific data types }
  55. type
  56. Ptr = ^Char;
  57. var
  58. ExitCode : DWord;
  59. { this variables are passed to PilotMain by the PalmOS }
  60. cmd : Word;
  61. cmdPBP : Ptr;
  62. launchFlags : Word;
  63. implementation
  64. { mimic the C start code }
  65. function PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;
  66. begin
  67. cmd:=_cmd;
  68. cmdPBP:=_cmdPBP;
  69. launchFlags:=_launchFlags;
  70. asm
  71. bsr PASCALMAIN
  72. end;
  73. PilotMain:=ExitCode;
  74. end;
  75. {*****************************************************************************
  76. System Dependent Exit code
  77. *****************************************************************************}
  78. Procedure system_exit;
  79. begin
  80. end;
  81. function GetProcessID: SizeUInt;
  82. begin
  83. GetProcessID := 1;
  84. end;
  85. function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
  86. begin
  87. result := stklen;
  88. end;
  89. begin
  90. StackLength := CheckInitialStkLen (InitialStkLen);
  91. ExitCode:=0;
  92. end.