Initial revision
[AROS-Contrib.git] / development / compilers / freepascal / rtl / palmos / syspalm.pp
blob87c998e60041adee5a680caea84794f3bfd43458
2 $Id$
4 This file is part of the Free Pascal run time library.
5 Copyright (c) 1999-2000 by Florian Klaempfl
6 member of the Free Pascal development team
8 See the file COPYING.FPC, included in this distribution,
9 for details about the copyright.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 **********************************************************************}
17 {$define PALMOS}
18 {$ASMMODE DIRECT}
19 Unit SysPalm;
21 {$I os.inc}
23 Interface
25 Type
26 { type and constant declartions doesn't hurt }
27 LongInt = $80000000..$7fffffff;
28 Integer = -32768..32767;
29 ShortInt = -128..127;
30 Byte = 0..255;
31 Word = 0..65535;
33 { !!!!
34 DWord = Cardinal;
35 LongWord = Cardinal;
38 { The Cardinal data type isn't currently implemented for the m68k }
39 DWord = LongInt;
40 LongWord = LongInt;
42 { Zero - terminated strings }
43 PChar = ^Char;
44 PPChar = ^PChar;
46 { procedure type }
47 TProcedure = Procedure;
49 const
50 { max. values for longint and int }
51 MaxLongint = High(LongInt);
52 MaxInt = High(Integer);
54 { Must be determined at startup for both }
55 Test68000 : byte = 0;
56 Test68881 : byte = 0;
58 { Palm specific data types }
59 type
60 Ptr = ^Char;
62 var
63 ExitCode : DWord;
64 { this variables are passed to PilotMain by the PalmOS }
65 cmd : Word;
66 cmdPBP : Ptr;
67 launchFlags : Word;
69 implementation
71 { mimic the C start code }
72 function PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;
74 begin
75 cmd:=_cmd;
76 cmdPBP:=_cmdPBP;
77 launchFlags:=_launchFlags;
78 asm
79 bsr PASCALMAIN
80 end;
81 PilotMain:=ExitCode;
82 end;
84 {*****************************************************************************
85 System Dependent Exit code
86 *****************************************************************************}
87 Procedure system_exit;
88 begin
89 end;
91 begin
92 ExitCode:=0;
93 end.
96 $Log$
97 Revision 1.1 2002/02/19 08:26:09 sasu
98 Initial revision
100 Revision 1.1 2000/07/13 06:31:10 michael
101 + Initial import
103 Revision 1.8 2000/01/07 16:41:51 daniel
104 * copyright 2000
106 Revision 1.7 2000/01/07 16:32:34 daniel
107 * copyright 2000 added
109 Revision 1.6 1999/09/17 10:00:40 florian
110 * now using direct assembler mode
112 Revision 1.5 1999/05/17 21:52:46 florian
113 * most of the Object Pascal stuff moved to the system unit
115 Revision 1.4 1999/01/18 10:05:56 pierre
116 + system_exit procedure added
118 Revision 1.3 1998/08/31 12:18:37 peter
119 * export changed to public which is allowed in implementation
121 Revision 1.2 1998/08/22 10:23:59 florian
122 + PilotMain implemented
124 Revision 1.1 1998/08/05 17:19:07 florian
125 + first few things for PalmOS support