~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/palmos/system.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

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