+ added new i8086 compiler options -Wtexe and -Wtcom for specifying the MS-DOS

binary format (.exe or .com)
* the default format for i8086 tiny model binaries changed to .exe

git-svn-id: trunk@25528 -
This commit is contained in:
nickysn 2013-09-21 16:44:14 +00:00
parent e2903ded95
commit 567cdf875b
4 changed files with 26 additions and 6 deletions

View File

@ -156,6 +156,7 @@ interface
{$if defined(i8086)}
x86memorymodel : tx86memorymodel;
msdostargetformat : tmsdostargetformat;
{$endif defined(i8086)}
{$if defined(ARM)}
@ -487,6 +488,7 @@ interface
disabledircache : false;
{$if defined(i8086)}
x86memorymodel : mm_small;
msdostargetformat : msdos_exe;
{$endif defined(i8086)}
{$if defined(ARM)}
instructionset : is_arm;

View File

@ -682,6 +682,7 @@ interface
type
tx86memorymodel = (mm_tiny,mm_small,mm_medium,mm_compact,mm_large,mm_huge);
tmsdostargetformat = (msdos_exe, msdos_com);
{ hide Sysutils.ExecuteProcess in units using this one after SysUtils}
const

View File

@ -1950,6 +1950,23 @@ begin
else
IllegalPara(opt);
end;
't':
begin
{$if defined(i8086)}
if (target_info.system in [system_i8086_msdos]) then
begin
case Upper(Copy(More,j+1,255)) of
'EXE': init_settings.msdostargetformat:=msdos_exe;
'COM': init_settings.msdostargetformat:=msdos_com;
else
IllegalPara(opt);
end;
break;
end
else
{$endif defined(i8086)}
IllegalPara(opt);
end;
'T':
begin
if target_info.system in systems_macos then

View File

@ -268,13 +268,13 @@ begin
if s<>'' then
LinkRes.Add('library '+MaybeQuoted(s));
end;
if current_settings.x86memorymodel=mm_tiny then
LinkRes.Add('format dos com')
else
LinkRes.Add('format dos');
case current_settings.msdostargetformat of
msdos_exe: LinkRes.Add('format dos');
msdos_com: LinkRes.Add('format dos com');
else
InternalError(2013092101);
end;
LinkRes.Add('option dosseg');
{ if current_settings.x86memorymodel=mm_tiny then
LinkRes.Add('system com');}
LinkRes.Add('name ' + maybequoted(current_module.exefilename));
{ Write and Close response }