summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/palmunits/src/palmos.pp
blob: bf912fc67b12dbda8eac7cd2f6562bcf3b26590a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
unit palmos;

interface

(************************************************************
 * Common constants
 *************************************************************)
type
  Int8 = ShortInt;
  Int16 = Integer;
  Int32 = LongInt;

  UInt8 = Byte;
  UInt16 = Word;
  UInt32 = LongWord;

// Logical data types

  WChar = UInt16;      // 'wide' int'l character type.
  Err = UInt16;
  LocalID = UInt32;    // local (card relative) chunk ID
  Coord = Int16;       // screen/window coordinate
  MemPtr = Pointer;    // global pointer
  MemHandle = Pointer; // global handle

  ProcPtr = function: Int32;

const
  NULL = 0;
  bitsInByte = 8;

(************************************************************
 * Palm specific TRAP instruction numbers
 *************************************************************)

const
  sysDbgBreakpointTrapNum = 0;  // For soft breakpoints
  sysDbgTrapNum           = 8;  // For compiled breakpoints
  sysDispatchTrapNum      = 15; // Trap dispatcher

type
  Enum = Byte;
  WordEnum = Word;
  LongEnum = LongWord;

  Int8Ptr = ^Int8;
  Int16Ptr = ^Int16;
  Int32Ptr = ^Int32;

  UInt8Ptr = ^UInt8;
  UInt16Ptr = ^UInt16;
  UInt32Ptr = ^UInt32;
  PointerPtr = ^Pointer;

  PCharPtr = ^PChar;
  MemPtrPtr = ^MemPtr;
  WCharPtr = ^WChar;
  Smallint = Integer;

implementation

end.