* limit the ZX Spectrum programs address space up to $FDFC, because the RTL now

installs an interrupt handler at $FDFD

git-svn-id: trunk@45678 -
This commit is contained in:
nickysn 2020-06-22 14:13:54 +00:00
parent 1ae70c6825
commit e41912b076
2 changed files with 21 additions and 1 deletions

View File

@ -131,6 +131,13 @@ interface
constructor create;override;
end;
{ TZXSpectrumIntelHexExeOutput }
TZXSpectrumIntelHexExeOutput = class(TIntelHexExeOutput)
public
constructor create;override;
end;
implementation
uses
@ -1321,6 +1328,19 @@ implementation
MaxMemPos:=$FFFF;
end;
{*****************************************************************************
TZXSpectrumIntelHexExeOutput
*****************************************************************************}
constructor TZXSpectrumIntelHexExeOutput.create;
begin
inherited create;
{ The ZX Spectrum RTL switches to interrupt mode 2, and install an
interrupt handler + table, starting at address $FDFD, so we must limit
program size to $FDFC }
MaxMemPos:=$FDFC;
end;
{*****************************************************************************
Initialize
*****************************************************************************}

View File

@ -392,7 +392,7 @@ constructor TInternalLinkerZXSpectrum.create;
begin
inherited create;
CArObjectReader:=TArObjectReader;
CExeOutput:=TIntelHexExeOutput;
CExeOutput:=TZXSpectrumIntelHexExeOutput;
CObjInput:=TRelObjInput;
if ImageBaseSetExplicity then
FOrigin:=ImageBase