Browse Source

+ the beginnings of an i8086-msdos internal obj writer

git-svn-id: trunk@30330 -
nickysn 10 years ago
parent
commit
f9d3e0c8d6
5 changed files with 161 additions and 93 deletions
  1. 1 0
      .gitattributes
  2. 1 4
      compiler/i8086/cputarg.pas
  3. 129 0
      compiler/ogomf.pas
  4. 29 89
      compiler/ppc8086.lpi
  5. 1 0
      compiler/systems.inc

+ 1 - 0
.gitattributes

@@ -492,6 +492,7 @@ compiler/oglx.pas svneol=native#text/plain
 compiler/ogmacho.pas svneol=native#text/plain
 compiler/ogmacho.pas svneol=native#text/plain
 compiler/ogmap.pas svneol=native#text/plain
 compiler/ogmap.pas svneol=native#text/plain
 compiler/ognlm.pas svneol=native#text/plain
 compiler/ognlm.pas svneol=native#text/plain
+compiler/ogomf.pas svneol=native#text/plain
 compiler/optbase.pas svneol=native#text/plain
 compiler/optbase.pas svneol=native#text/plain
 compiler/optconstprop.pas svneol=native#text/pascal
 compiler/optconstprop.pas svneol=native#text/pascal
 compiler/optcse.pas svneol=native#text/plain
 compiler/optcse.pas svneol=native#text/plain

+ 1 - 4
compiler/i8086/cputarg.pas

@@ -53,10 +53,7 @@ implementation
 //      ,agx86int
 //      ,agx86int
     {$endif}
     {$endif}
 
 
-//      ,ogcoff
-//      ,ogelf
-//      ,ogmacho
-//      ,cpuelf
+        ,ogomf
 
 
 {**************************************
 {**************************************
         Assembler Readers
         Assembler Readers

+ 129 - 0
compiler/ogomf.pas

@@ -0,0 +1,129 @@
+{
+    Copyright (c) 2015 by Nikolay Nikolov
+
+    Contains the binary Relocatable Object Module Format (OMF) reader and writer
+    This is the object format used on the i8086-msdos platform.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit ogomf;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+       { common }
+       cclasses,globtype,
+       { target }
+       systems,
+       { assembler }
+       cpuinfo,cpubase,aasmbase,assemble,link,
+       { output }
+       ogbase,
+       owbase;
+
+    type
+      TOmfObjData = class(TObjData)
+      public
+        function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
+        procedure writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);override;
+      end;
+
+      TOmfObjOutput = class(tObjOutput)
+      protected
+        function writeData(Data:TObjData):boolean;override;
+      public
+        constructor create(AWriter:TObjectWriter);override;
+      end;
+
+      TOmfAssembler = class(tinternalassembler)
+        constructor create(smart:boolean);override;
+      end;
+
+implementation
+
+    uses
+       SysUtils,
+       cutils,verbose,globals,
+       fmodule,aasmtai,aasmdata,
+       ogmap,
+       version
+       ;
+
+{****************************************************************************
+                                TOmfObjData
+****************************************************************************}
+
+    function TOmfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
+      begin
+        result:=aname;
+      end;
+
+    procedure TOmfObjData.writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);
+      begin
+      end;
+
+{****************************************************************************
+                                TOmfObjOutput
+****************************************************************************}
+
+    function TOmfObjOutput.writeData(Data:TObjData):boolean;
+      begin
+        result:=true;
+      end;
+
+    constructor TOmfObjOutput.create(AWriter:TObjectWriter);
+      begin
+        inherited create(AWriter);
+        cobjdata:=TOmfObjData;
+      end;
+
+{****************************************************************************
+                               TOmfAssembler
+****************************************************************************}
+
+    constructor TOmfAssembler.Create(smart:boolean);
+      begin
+        inherited Create(smart);
+        CObjOutput:=TOmfObjOutput;
+      end;
+
+{*****************************************************************************
+                                  Initialize
+*****************************************************************************}
+{$ifdef i8086}
+    const
+       as_i8086_omf_info : tasminfo =
+          (
+            id     : as_i8086_omf;
+            idtxt  : 'OMF';
+            asmbin : '';
+            asmcmd : '';
+            supported_targets : [system_i8086_msdos];
+            flags : [af_outputbinary,af_needar,af_no_debug];
+            labelprefix : '..@';
+            comment : '; ';
+            dollarsign: '$';
+          );
+{$endif i8086}
+
+initialization
+{$ifdef i8086}
+  RegisterAssembler(as_i8086_omf_info,TOmfAssembler);
+{$endif i8086}
+end.

+ 29 - 89
compiler/ppc8086.lpi

@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <CONFIG>
 <CONFIG>
   <ProjectOptions>
   <ProjectOptions>
     <Version Value="9"/>
     <Version Value="9"/>
@@ -28,11 +28,10 @@
         <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
         <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
       </local>
       </local>
     </RunParams>
     </RunParams>
-    <Units Count="230">
+    <Units Count="231">
       <Unit0>
       <Unit0>
         <Filename Value="pp.pas"/>
         <Filename Value="pp.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pp"/>
       </Unit0>
       </Unit0>
       <Unit1>
       <Unit1>
         <Filename Value="i8086\cgcpu.pas"/>
         <Filename Value="i8086\cgcpu.pas"/>
@@ -51,22 +50,18 @@
       <Unit4>
       <Unit4>
         <Filename Value="i8086\cpunode.pas"/>
         <Filename Value="i8086\cpunode.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cpunode"/>
       </Unit4>
       </Unit4>
       <Unit5>
       <Unit5>
         <Filename Value="i8086\cpupara.pas"/>
         <Filename Value="i8086\cpupara.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cpupara"/>
       </Unit5>
       </Unit5>
       <Unit6>
       <Unit6>
         <Filename Value="i8086\cpupi.pas"/>
         <Filename Value="i8086\cpupi.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cpupi"/>
       </Unit6>
       </Unit6>
       <Unit7>
       <Unit7>
         <Filename Value="i8086\cputarg.pas"/>
         <Filename Value="i8086\cputarg.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cputarg"/>
       </Unit7>
       </Unit7>
       <Unit8>
       <Unit8>
         <Filename Value="i8086\hlcgcpu.pas"/>
         <Filename Value="i8086\hlcgcpu.pas"/>
@@ -76,17 +71,14 @@
       <Unit9>
       <Unit9>
         <Filename Value="i8086\ra8086att.pas"/>
         <Filename Value="i8086\ra8086att.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ra8086att"/>
       </Unit9>
       </Unit9>
       <Unit10>
       <Unit10>
         <Filename Value="i8086\ra8086int.pas"/>
         <Filename Value="i8086\ra8086int.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ra8086int"/>
       </Unit10>
       </Unit10>
       <Unit11>
       <Unit11>
         <Filename Value="i8086\rgcpu.pas"/>
         <Filename Value="i8086\rgcpu.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="rgcpu"/>
       </Unit11>
       </Unit11>
       <Unit12>
       <Unit12>
         <Filename Value="i8086\n8086add.pas"/>
         <Filename Value="i8086\n8086add.pas"/>
@@ -96,7 +88,6 @@
       <Unit13>
       <Unit13>
         <Filename Value="i8086\n8086mat.pas"/>
         <Filename Value="i8086\n8086mat.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086mat"/>
       </Unit13>
       </Unit13>
       <Unit14>
       <Unit14>
         <Filename Value="i8086\n8086inl.pas"/>
         <Filename Value="i8086\n8086inl.pas"/>
@@ -106,7 +97,6 @@
       <Unit15>
       <Unit15>
         <Filename Value="i8086\n8086cal.pas"/>
         <Filename Value="i8086\n8086cal.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086cal"/>
       </Unit15>
       </Unit15>
       <Unit16>
       <Unit16>
         <Filename Value="x86\cgx86.pas"/>
         <Filename Value="x86\cgx86.pas"/>
@@ -121,27 +111,22 @@
       <Unit18>
       <Unit18>
         <Filename Value="x86\nx86set.pas"/>
         <Filename Value="x86\nx86set.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86set"/>
       </Unit18>
       </Unit18>
       <Unit19>
       <Unit19>
         <Filename Value="x86\nx86add.pas"/>
         <Filename Value="x86\nx86add.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86add"/>
       </Unit19>
       </Unit19>
       <Unit20>
       <Unit20>
         <Filename Value="x86\nx86cnv.pas"/>
         <Filename Value="x86\nx86cnv.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86cnv"/>
       </Unit20>
       </Unit20>
       <Unit21>
       <Unit21>
         <Filename Value="x86\cpubase.pas"/>
         <Filename Value="x86\cpubase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cpubase"/>
       </Unit21>
       </Unit21>
       <Unit22>
       <Unit22>
         <Filename Value="x86\nx86mem.pas"/>
         <Filename Value="x86\nx86mem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86mem"/>
       </Unit22>
       </Unit22>
       <Unit23>
       <Unit23>
         <Filename Value="x86\nx86inl.pas"/>
         <Filename Value="x86\nx86inl.pas"/>
@@ -151,31 +136,27 @@
       <Unit24>
       <Unit24>
         <Filename Value="x86\nx86cal.pas"/>
         <Filename Value="x86\nx86cal.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86cal"/>
       </Unit24>
       </Unit24>
       <Unit25>
       <Unit25>
         <Filename Value="x86\rgx86.pas"/>
         <Filename Value="x86\rgx86.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="rgx86"/>
       </Unit25>
       </Unit25>
       <Unit26>
       <Unit26>
         <Filename Value="x86\agx86att.pas"/>
         <Filename Value="x86\agx86att.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="agx86att"/>
       </Unit26>
       </Unit26>
       <Unit27>
       <Unit27>
         <Filename Value="i8086\n8086con.pas"/>
         <Filename Value="i8086\n8086con.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086con"/>
       </Unit27>
       </Unit27>
       <Unit28>
       <Unit28>
         <Filename Value="x86\nx86con.pas"/>
         <Filename Value="x86\nx86con.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nx86con"/>
       </Unit28>
       </Unit28>
       <Unit29>
       <Unit29>
         <Filename Value="x86\aasmcpu.pas"/>
         <Filename Value="x86\aasmcpu.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="aasmcpu"/>
       </Unit29>
       </Unit29>
       <Unit30>
       <Unit30>
         <Filename Value="x86\agx86int.pas"/>
         <Filename Value="x86\agx86int.pas"/>
@@ -185,6 +166,7 @@
       <Unit31>
       <Unit31>
         <Filename Value="x86\cga.pas"/>
         <Filename Value="x86\cga.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="cga"/>
       </Unit31>
       </Unit31>
       <Unit32>
       <Unit32>
         <Filename Value="x86\hlcgx86.pas"/>
         <Filename Value="x86\hlcgx86.pas"/>
@@ -218,7 +200,6 @@
       <Unit39>
       <Unit39>
         <Filename Value="i8086\n8086cnv.pas"/>
         <Filename Value="i8086\n8086cnv.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086cnv"/>
       </Unit39>
       </Unit39>
       <Unit40>
       <Unit40>
         <Filename Value="systems\i_msdos.pas"/>
         <Filename Value="systems\i_msdos.pas"/>
@@ -233,7 +214,6 @@
       <Unit42>
       <Unit42>
         <Filename Value="i8086\n8086mem.pas"/>
         <Filename Value="i8086\n8086mem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086mem"/>
       </Unit42>
       </Unit42>
       <Unit43>
       <Unit43>
         <Filename Value="cgobj.pas"/>
         <Filename Value="cgobj.pas"/>
@@ -248,7 +228,6 @@
       <Unit45>
       <Unit45>
         <Filename Value="scandir.pas"/>
         <Filename Value="scandir.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="scandir"/>
       </Unit45>
       </Unit45>
       <Unit46>
       <Unit46>
         <Filename Value="ncginl.pas"/>
         <Filename Value="ncginl.pas"/>
@@ -263,7 +242,6 @@
       <Unit48>
       <Unit48>
         <Filename Value="pdecsub.pas"/>
         <Filename Value="pdecsub.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pdecsub"/>
       </Unit48>
       </Unit48>
       <Unit49>
       <Unit49>
         <Filename Value="ncgcal.pas"/>
         <Filename Value="ncgcal.pas"/>
@@ -278,22 +256,18 @@
       <Unit51>
       <Unit51>
         <Filename Value="ncgadd.pas"/>
         <Filename Value="ncgadd.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgadd"/>
       </Unit51>
       </Unit51>
       <Unit52>
       <Unit52>
         <Filename Value="nadd.pas"/>
         <Filename Value="nadd.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nadd"/>
       </Unit52>
       </Unit52>
       <Unit53>
       <Unit53>
         <Filename Value="defutil.pas"/>
         <Filename Value="defutil.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="defutil"/>
       </Unit53>
       </Unit53>
       <Unit54>
       <Unit54>
         <Filename Value="constexp.pas"/>
         <Filename Value="constexp.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="constexp"/>
       </Unit54>
       </Unit54>
       <Unit55>
       <Unit55>
         <Filename Value="hlcgobj.pas"/>
         <Filename Value="hlcgobj.pas"/>
@@ -303,12 +277,10 @@
       <Unit56>
       <Unit56>
         <Filename Value="ncgmem.pas"/>
         <Filename Value="ncgmem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgmem"/>
       </Unit56>
       </Unit56>
       <Unit57>
       <Unit57>
         <Filename Value="cgutils.pas"/>
         <Filename Value="cgutils.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cgutils"/>
       </Unit57>
       </Unit57>
       <Unit58>
       <Unit58>
         <Filename Value="cutils.pas"/>
         <Filename Value="cutils.pas"/>
@@ -328,42 +300,34 @@
       <Unit61>
       <Unit61>
         <Filename Value="ncnv.pas"/>
         <Filename Value="ncnv.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncnv"/>
       </Unit61>
       </Unit61>
       <Unit62>
       <Unit62>
         <Filename Value="psub.pas"/>
         <Filename Value="psub.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="psub"/>
       </Unit62>
       </Unit62>
       <Unit63>
       <Unit63>
         <Filename Value="ngenutil.pas"/>
         <Filename Value="ngenutil.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ngenutil"/>
       </Unit63>
       </Unit63>
       <Unit64>
       <Unit64>
         <Filename Value="pinline.pas"/>
         <Filename Value="pinline.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pinline"/>
       </Unit64>
       </Unit64>
       <Unit65>
       <Unit65>
         <Filename Value="pmodules.pas"/>
         <Filename Value="pmodules.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pmodules"/>
       </Unit65>
       </Unit65>
       <Unit66>
       <Unit66>
         <Filename Value="aasmtai.pas"/>
         <Filename Value="aasmtai.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="aasmtai"/>
       </Unit66>
       </Unit66>
       <Unit67>
       <Unit67>
         <Filename Value="dbgdwarf.pas"/>
         <Filename Value="dbgdwarf.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="dbgdwarf"/>
       </Unit67>
       </Unit67>
       <Unit68>
       <Unit68>
         <Filename Value="symdef.pas"/>
         <Filename Value="symdef.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symdef"/>
       </Unit68>
       </Unit68>
       <Unit69>
       <Unit69>
         <Filename Value="ogcoff.pas"/>
         <Filename Value="ogcoff.pas"/>
@@ -373,77 +337,62 @@
       <Unit70>
       <Unit70>
         <Filename Value="psystem.pas"/>
         <Filename Value="psystem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="psystem"/>
       </Unit70>
       </Unit70>
       <Unit71>
       <Unit71>
         <Filename Value="symconst.pas"/>
         <Filename Value="symconst.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symconst"/>
       </Unit71>
       </Unit71>
       <Unit72>
       <Unit72>
         <Filename Value="paramgr.pas"/>
         <Filename Value="paramgr.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="paramgr"/>
       </Unit72>
       </Unit72>
       <Unit73>
       <Unit73>
         <Filename Value="ncgld.pas"/>
         <Filename Value="ncgld.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgld"/>
       </Unit73>
       </Unit73>
       <Unit74>
       <Unit74>
         <Filename Value="pparautl.pas"/>
         <Filename Value="pparautl.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pparautl"/>
       </Unit74>
       </Unit74>
       <Unit75>
       <Unit75>
         <Filename Value="ncgutil.pas"/>
         <Filename Value="ncgutil.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgutil"/>
       </Unit75>
       </Unit75>
       <Unit76>
       <Unit76>
         <Filename Value="ncgnstmm.pas"/>
         <Filename Value="ncgnstmm.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgnstmm"/>
       </Unit76>
       </Unit76>
       <Unit77>
       <Unit77>
         <Filename Value="nld.pas"/>
         <Filename Value="nld.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nld"/>
       </Unit77>
       </Unit77>
       <Unit78>
       <Unit78>
         <Filename Value="nmem.pas"/>
         <Filename Value="nmem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nmem"/>
       </Unit78>
       </Unit78>
       <Unit79>
       <Unit79>
         <Filename Value="ncal.pas"/>
         <Filename Value="ncal.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncal"/>
       </Unit79>
       </Unit79>
       <Unit80>
       <Unit80>
         <Filename Value="symtype.pas"/>
         <Filename Value="symtype.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symtype"/>
       </Unit80>
       </Unit80>
       <Unit81>
       <Unit81>
         <Filename Value="symsym.pas"/>
         <Filename Value="symsym.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symsym"/>
       </Unit81>
       </Unit81>
       <Unit82>
       <Unit82>
         <Filename Value="symbase.pas"/>
         <Filename Value="symbase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symbase"/>
       </Unit82>
       </Unit82>
       <Unit83>
       <Unit83>
         <Filename Value="nflw.pas"/>
         <Filename Value="nflw.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nflw"/>
       </Unit83>
       </Unit83>
       <Unit84>
       <Unit84>
         <Filename Value="scanner.pas"/>
         <Filename Value="scanner.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="scanner"/>
       </Unit84>
       </Unit84>
       <Unit85>
       <Unit85>
         <Filename Value="ncon.pas"/>
         <Filename Value="ncon.pas"/>
@@ -458,7 +407,6 @@
       <Unit87>
       <Unit87>
         <Filename Value="defcmp.pas"/>
         <Filename Value="defcmp.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="defcmp"/>
       </Unit87>
       </Unit87>
       <Unit88>
       <Unit88>
         <Filename Value="fpcdefs.inc"/>
         <Filename Value="fpcdefs.inc"/>
@@ -467,52 +415,42 @@
       <Unit89>
       <Unit89>
         <Filename Value="nmat.pas"/>
         <Filename Value="nmat.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nmat"/>
       </Unit89>
       </Unit89>
       <Unit90>
       <Unit90>
         <Filename Value="optdfa.pas"/>
         <Filename Value="optdfa.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="optdfa"/>
       </Unit90>
       </Unit90>
       <Unit91>
       <Unit91>
         <Filename Value="parabase.pas"/>
         <Filename Value="parabase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="parabase"/>
       </Unit91>
       </Unit91>
       <Unit92>
       <Unit92>
         <Filename Value="cgbase.pas"/>
         <Filename Value="cgbase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cgbase"/>
       </Unit92>
       </Unit92>
       <Unit93>
       <Unit93>
         <Filename Value="ncgcnv.pas"/>
         <Filename Value="ncgcnv.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgcnv"/>
       </Unit93>
       </Unit93>
       <Unit94>
       <Unit94>
         <Filename Value="ncgcon.pas"/>
         <Filename Value="ncgcon.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgcon"/>
       </Unit94>
       </Unit94>
       <Unit95>
       <Unit95>
         <Filename Value="nset.pas"/>
         <Filename Value="nset.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nset"/>
       </Unit95>
       </Unit95>
       <Unit96>
       <Unit96>
         <Filename Value="optloop.pas"/>
         <Filename Value="optloop.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="optloop"/>
       </Unit96>
       </Unit96>
       <Unit97>
       <Unit97>
         <Filename Value="aasmbase.pas"/>
         <Filename Value="aasmbase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="aasmbase"/>
       </Unit97>
       </Unit97>
       <Unit98>
       <Unit98>
         <Filename Value="aasmdata.pas"/>
         <Filename Value="aasmdata.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="aasmdata"/>
       </Unit98>
       </Unit98>
       <Unit99>
       <Unit99>
         <Filename Value="aasmsym.pas"/>
         <Filename Value="aasmsym.pas"/>
@@ -521,11 +459,11 @@
       <Unit100>
       <Unit100>
         <Filename Value="aggas.pas"/>
         <Filename Value="aggas.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="aggas"/>
       </Unit100>
       </Unit100>
       <Unit101>
       <Unit101>
         <Filename Value="agjasmin.pas"/>
         <Filename Value="agjasmin.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="agjasmin"/>
       </Unit101>
       </Unit101>
       <Unit102>
       <Unit102>
         <Filename Value="aopt.pas"/>
         <Filename Value="aopt.pas"/>
@@ -554,10 +492,12 @@
       <Unit108>
       <Unit108>
         <Filename Value="assemble.pas"/>
         <Filename Value="assemble.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="assemble"/>
       </Unit108>
       </Unit108>
       <Unit109>
       <Unit109>
         <Filename Value="browcol.pas"/>
         <Filename Value="browcol.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="browcol"/>
       </Unit109>
       </Unit109>
       <Unit110>
       <Unit110>
         <Filename Value="catch.pas"/>
         <Filename Value="catch.pas"/>
@@ -578,11 +518,11 @@
       <Unit114>
       <Unit114>
         <Filename Value="cfileutl.pas"/>
         <Filename Value="cfileutl.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="cfileutl"/>
       </Unit114>
       </Unit114>
       <Unit115>
       <Unit115>
         <Filename Value="cg64f32.pas"/>
         <Filename Value="cg64f32.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cg64f32"/>
       </Unit115>
       </Unit115>
       <Unit116>
       <Unit116>
         <Filename Value="cghlcpu.pas"/>
         <Filename Value="cghlcpu.pas"/>
@@ -607,6 +547,7 @@
       <Unit121>
       <Unit121>
         <Filename Value="comprsrc.pas"/>
         <Filename Value="comprsrc.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="comprsrc"/>
       </Unit121>
       </Unit121>
       <Unit122>
       <Unit122>
         <Filename Value="cpid.pas"/>
         <Filename Value="cpid.pas"/>
@@ -619,7 +560,6 @@
       <Unit124>
       <Unit124>
         <Filename Value="cresstr.pas"/>
         <Filename Value="cresstr.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="cresstr"/>
       </Unit124>
       </Unit124>
       <Unit125>
       <Unit125>
         <Filename Value="cstreams.pas"/>
         <Filename Value="cstreams.pas"/>
@@ -644,10 +584,12 @@
       <Unit130>
       <Unit130>
         <Filename Value="dirparse.pas"/>
         <Filename Value="dirparse.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="dirparse"/>
       </Unit130>
       </Unit130>
       <Unit131>
       <Unit131>
         <Filename Value="elfbase.pas"/>
         <Filename Value="elfbase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="elfbase"/>
       </Unit131>
       </Unit131>
       <Unit132>
       <Unit132>
         <Filename Value="export.pas"/>
         <Filename Value="export.pas"/>
@@ -660,10 +602,12 @@
       <Unit134>
       <Unit134>
         <Filename Value="finput.pas"/>
         <Filename Value="finput.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="finput"/>
       </Unit134>
       </Unit134>
       <Unit135>
       <Unit135>
         <Filename Value="fmodule.pas"/>
         <Filename Value="fmodule.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="fmodule"/>
       </Unit135>
       </Unit135>
       <Unit136>
       <Unit136>
         <Filename Value="fpccrc.pas"/>
         <Filename Value="fpccrc.pas"/>
@@ -677,7 +621,6 @@
       <Unit138>
       <Unit138>
         <Filename Value="gendef.pas"/>
         <Filename Value="gendef.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="gendef"/>
       </Unit138>
       </Unit138>
       <Unit139>
       <Unit139>
         <Filename Value="globstat.pas"/>
         <Filename Value="globstat.pas"/>
@@ -686,7 +629,6 @@
       <Unit140>
       <Unit140>
         <Filename Value="htypechk.pas"/>
         <Filename Value="htypechk.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="htypechk"/>
       </Unit140>
       </Unit140>
       <Unit141>
       <Unit141>
         <Filename Value="impdef.pas"/>
         <Filename Value="impdef.pas"/>
@@ -703,6 +645,7 @@
       <Unit144>
       <Unit144>
         <Filename Value="link.pas"/>
         <Filename Value="link.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="link"/>
       </Unit144>
       </Unit144>
       <Unit145>
       <Unit145>
         <Filename Value="macho.pas"/>
         <Filename Value="macho.pas"/>
@@ -715,7 +658,6 @@
       <Unit147>
       <Unit147>
         <Filename Value="nbas.pas"/>
         <Filename Value="nbas.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="nbas"/>
       </Unit147>
       </Unit147>
       <Unit148>
       <Unit148>
         <Filename Value="ncgbas.pas"/>
         <Filename Value="ncgbas.pas"/>
@@ -724,7 +666,6 @@
       <Unit149>
       <Unit149>
         <Filename Value="ncgflw.pas"/>
         <Filename Value="ncgflw.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ncgflw"/>
       </Unit149>
       </Unit149>
       <Unit150>
       <Unit150>
         <Filename Value="ncgmat.pas"/>
         <Filename Value="ncgmat.pas"/>
@@ -757,7 +698,6 @@
       <Unit157>
       <Unit157>
         <Filename Value="ngtcon.pas"/>
         <Filename Value="ngtcon.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ngtcon"/>
       </Unit157>
       </Unit157>
       <Unit158>
       <Unit158>
         <Filename Value="nobj.pas"/>
         <Filename Value="nobj.pas"/>
@@ -770,7 +710,6 @@
       <Unit160>
       <Unit160>
         <Filename Value="node.pas"/>
         <Filename Value="node.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="node"/>
       </Unit160>
       </Unit160>
       <Unit161>
       <Unit161>
         <Filename Value="nopt.pas"/>
         <Filename Value="nopt.pas"/>
@@ -809,18 +748,22 @@
       <Unit169>
       <Unit169>
         <Filename Value="oglx.pas"/>
         <Filename Value="oglx.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="oglx"/>
       </Unit169>
       </Unit169>
       <Unit170>
       <Unit170>
         <Filename Value="ogmacho.pas"/>
         <Filename Value="ogmacho.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="ogmacho"/>
       </Unit170>
       </Unit170>
       <Unit171>
       <Unit171>
         <Filename Value="ogmap.pas"/>
         <Filename Value="ogmap.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="ogmap"/>
       </Unit171>
       </Unit171>
       <Unit172>
       <Unit172>
         <Filename Value="ognlm.pas"/>
         <Filename Value="ognlm.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="ognlm"/>
       </Unit172>
       </Unit172>
       <Unit173>
       <Unit173>
         <Filename Value="optbase.pas"/>
         <Filename Value="optbase.pas"/>
@@ -857,18 +800,22 @@
       <Unit181>
       <Unit181>
         <Filename Value="owar.pas"/>
         <Filename Value="owar.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="owar"/>
       </Unit181>
       </Unit181>
       <Unit182>
       <Unit182>
         <Filename Value="owbase.pas"/>
         <Filename Value="owbase.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="owbase"/>
       </Unit182>
       </Unit182>
       <Unit183>
       <Unit183>
         <Filename Value="parser.pas"/>
         <Filename Value="parser.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="parser"/>
       </Unit183>
       </Unit183>
       <Unit184>
       <Unit184>
         <Filename Value="pass_1.pas"/>
         <Filename Value="pass_1.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="pass_1"/>
       </Unit184>
       </Unit184>
       <Unit185>
       <Unit185>
         <Filename Value="pass_2.pas"/>
         <Filename Value="pass_2.pas"/>
@@ -885,7 +832,6 @@
       <Unit188>
       <Unit188>
         <Filename Value="pdecobj.pas"/>
         <Filename Value="pdecobj.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pdecobj"/>
       </Unit188>
       </Unit188>
       <Unit189>
       <Unit189>
         <Filename Value="pdecvar.pas"/>
         <Filename Value="pdecvar.pas"/>
@@ -910,17 +856,14 @@
       <Unit194>
       <Unit194>
         <Filename Value="ppu.pas"/>
         <Filename Value="ppu.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ppu"/>
       </Unit194>
       </Unit194>
       <Unit195>
       <Unit195>
         <Filename Value="procinfo.pas"/>
         <Filename Value="procinfo.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="procinfo"/>
       </Unit195>
       </Unit195>
       <Unit196>
       <Unit196>
         <Filename Value="pstatmnt.pas"/>
         <Filename Value="pstatmnt.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pstatmnt"/>
       </Unit196>
       </Unit196>
       <Unit197>
       <Unit197>
         <Filename Value="ptconst.pas"/>
         <Filename Value="ptconst.pas"/>
@@ -961,6 +904,7 @@
       <Unit206>
       <Unit206>
         <Filename Value="script.pas"/>
         <Filename Value="script.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="script"/>
       </Unit206>
       </Unit206>
       <Unit207>
       <Unit207>
         <Filename Value="switches.pas"/>
         <Filename Value="switches.pas"/>
@@ -989,11 +933,11 @@
       <Unit213>
       <Unit213>
         <Filename Value="systems.pas"/>
         <Filename Value="systems.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="systems"/>
       </Unit213>
       </Unit213>
       <Unit214>
       <Unit214>
         <Filename Value="tgobj.pas"/>
         <Filename Value="tgobj.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="tgobj"/>
       </Unit214>
       </Unit214>
       <Unit215>
       <Unit215>
         <Filename Value="tokens.pas"/>
         <Filename Value="tokens.pas"/>
@@ -1026,43 +970,40 @@
       <Unit222>
       <Unit222>
         <Filename Value="i8086\n8086ld.pas"/>
         <Filename Value="i8086\n8086ld.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086ld"/>
       </Unit222>
       </Unit222>
       <Unit223>
       <Unit223>
         <Filename Value="i8086\symcpu.pas"/>
         <Filename Value="i8086\symcpu.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symcpu"/>
       </Unit223>
       </Unit223>
       <Unit224>
       <Unit224>
         <Filename Value="x86\ni86mem.pas"/>
         <Filename Value="x86\ni86mem.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="ni86mem"/>
       </Unit224>
       </Unit224>
       <Unit225>
       <Unit225>
         <Filename Value="x86\symi86.pas"/>
         <Filename Value="x86\symi86.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symi86"/>
       </Unit225>
       </Unit225>
       <Unit226>
       <Unit226>
         <Filename Value="x86\symx86.pas"/>
         <Filename Value="x86\symx86.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="symx86"/>
       </Unit226>
       </Unit226>
       <Unit227>
       <Unit227>
         <Filename Value="i8086\n8086tcon.pas"/>
         <Filename Value="i8086\n8086tcon.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086tcon"/>
       </Unit227>
       </Unit227>
       <Unit228>
       <Unit228>
         <Filename Value="i8086\tgcpu.pas"/>
         <Filename Value="i8086\tgcpu.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="tgcpu"/>
       </Unit228>
       </Unit228>
       <Unit229>
       <Unit229>
         <Filename Value="i8086\n8086util.pas"/>
         <Filename Value="i8086\n8086util.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="n8086util"/>
       </Unit229>
       </Unit229>
+      <Unit230>
+        <Filename Value="ogomf.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="ogomf"/>
+      </Unit230>
     </Units>
     </Units>
   </ProjectOptions>
   </ProjectOptions>
   <CompilerOptions>
   <CompilerOptions>
@@ -1099,7 +1040,6 @@
         <StopAfterErrCount Value="50"/>
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
       </ConfigFile>
       <CustomOptions Value="-di8086 -dEXTDEBUG -gl"/>
       <CustomOptions Value="-di8086 -dEXTDEBUG -gl"/>
-      <CompilerPath Value="$(CompPath)"/>
     </Other>
     </Other>
   </CompilerOptions>
   </CompilerOptions>
 </CONFIG>
 </CONFIG>

+ 1 - 0
compiler/systems.inc

@@ -216,6 +216,7 @@
              ,as_i8086_nasmobj
              ,as_i8086_nasmobj
              ,as_gas_powerpc_xcoff
              ,as_gas_powerpc_xcoff
              ,as_arm_elf32
              ,as_arm_elf32
+             ,as_i8086_omf
        );
        );
 
 
        tlink = (ld_none,
        tlink = (ld_none,