Explorar o código

+ initialize StackBottom and StackLength in the startup of the ZX Spectrum system unit

git-svn-id: trunk@45166 -
nickysn %!s(int64=5) %!d(string=hai) anos
pai
achega
59b90c24ed
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      rtl/zxspectrum/system.pp

+ 4 - 2
rtl/zxspectrum/system.pp

@@ -80,6 +80,8 @@ const
   DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCR;
 
 var
+  fpc_stackarea_start: word; external name '__fpc_stackarea_start';
+  fpc_stackarea_end: word; external name '__fpc_stackarea_end';
   __heapsize: Word;external name '__heapsize';
   __fpc_initialheap: array[0..0] of byte;external name '__fpc_initialheap';
 
@@ -276,8 +278,8 @@ begin
 end;
 
 begin
-{  StackBottom := __stkbottom;
-  StackLength := __stktop - __stkbottom;}
+  StackBottom:=@fpc_stackarea_start;
+  StackLength:=(@fpc_stackarea_end-@fpc_stackarea_start)+1;
   { To be set if this is a GUI or console application }
   IsConsole := TRUE;
 {$ifdef FPC_HAS_FEATURE_DYNLIBS}