amicommon: implement StackTop for other Amiga-like systems

git-svn-id: trunk@36697 -
This commit is contained in:
Károly Balogh 2017-07-08 23:48:29 +00:00
parent cca38c9f08
commit 6e3936c534
2 changed files with 8 additions and 1 deletions

View File

@ -44,6 +44,13 @@
System Dependent Structures/Consts
*****************************************************************************}
{$ifndef FPC_SYSTEM_HAS_STACKTOP}
{$define FPC_SYSTEM_HAS_STACKTOP}
function StackTop: pointer;
begin
StackTop:=FindTask(nil)^.tc_SPUpper;
end;
{$endif FPC_SYSTEM_HAS_STACKTOP}
const
CTRL_C = 20; { Error code on CTRL-C press }

View File

@ -302,7 +302,7 @@ end;
begin
IsConsole := TRUE;
StackLength := CheckInitialStkLen(InitialStkLen);
StackBottom := Sptr - StackLength;
StackBottom := StackTop - StackLength;
{ OS specific startup }
AOS_wbMsg:=nil;
ASYS_origDir:=0;