From 4bfe7caea3646a03d6a66cac1af826dbaa956724 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 22 Aug 1998 10:23:59 +0000 Subject: [PATCH] + PilotMain implemented --- rtl/palmos/syspalm.pp | 55 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/rtl/palmos/syspalm.pp b/rtl/palmos/syspalm.pp index 9d80978637..4d4c6b0def 100644 --- a/rtl/palmos/syspalm.pp +++ b/rtl/palmos/syspalm.pp @@ -28,34 +28,67 @@ Unit SysPalm; Byte = 0..255; Word = 0..65535; + { !!!! DWord = Cardinal; LongWord = Cardinal; + } + + { The Cardinal data type isn't currently implemented for the m68k } + DWord = LongInt; + LongWord = LongInt; { Zero - terminated strings } - PChar = ^Char; - PPChar = ^PChar; + PChar = ^Char; + PPChar = ^PChar; { procedure type } TProcedure = Procedure; - const - { max. values for longint and int } - MaxLongint = High(LongInt); - MaxInt = High(Integer); + const + { max. values for longint and int } + MaxLongint = High(LongInt); + MaxInt = High(Integer); - { Must be determined at startup for both } - Test68000 : byte = 0; - Test68881 : byte = 0; + { Must be determined at startup for both } + Test68000 : byte = 0; + Test68881 : byte = 0; + + { Palm specific data types } + type + Ptr = ^Char; + + var + ExitCode : DWord; + { this variables are passed to PilotMain } + cmd : Word; + cmdPBP : Ptr; + launchFlags : Word; implementation + { mimic the C start code } + function _PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;export; + + begin + cmd:=_cmd; + cmdPBP:=_cmdPBP; + launchFlags:=_launchFlags; + asm + bsr PASCALMAIN + end; + _PilotMain:=ExitCode; + end; + begin - // here should be some startup code inserted + ExitCode:=0; end. { $Log$ - Revision 1.1 1998-08-05 17:19:07 florian + Revision 1.2 1998-08-22 10:23:59 florian + + PilotMain implemented + + Revision 1.1 1998/08/05 17:19:07 florian + first few things for PalmOS support }