syspalm.pp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.2 2000-07-13 11:33:54 michael
  76. + removed logs
  77. }