浏览代码

+ set the initial SS:SP in the NewExe header

git-svn-id: trunk@42572 -
nickysn 6 年之前
父节点
当前提交
c70f2c63cd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/ogomf.pas

+ 2 - 0
compiler/ogomf.pas

@@ -3668,6 +3668,8 @@ cleanup:
       begin
         Header.InitialIP:=EntrySym.address;
         Header.InitialCS:=TNewExeSection(EntrySym.objsection.ExeSection).MemBasePos;
+        Header.InitialSP:=0;
+        Header.InitialSS:=Header.AutoDataSegmentNumber;
         Header.WriteTo(FWriter);
         { todo: write the rest of the file as well }
         Result:=True;