------------------------------------------------------------------------
*From:* Jeff Chimene [mailto:address@hidden
*Sent:* May 25, 2009 2:47 PM
*To:* Ron Norman
*Subject:* Re: [open-cobol-list] Proposed addition to OpenCOBOL: an
object module generator
HI Ron:
For future, I'd prefer to keep this discussion on the list.
Other comments in line.
On 05/25/2009 11:32 AM, Ron Norman wrote:
The module format COFF vs ELF is a minor issue compared to which machine
instruction set would be used.
Agreed. That's why I omitted it from the proposal.
In the proposed model, the executable code is all C.
As for the proposed object file, when decoded to assembler, it might
look something like:
.entry MAIN
.extern SETUP
.extern PERFORMA
.extern PERFORMB
.end
The concept is that a C routine (aka the "inner interpreter") calls
the routines (also written in C, in the current cob1 library and a TBD
library). There needs to be additional code that replaces the current
C code emitted by the COBOL compiler, The new C code will handle
branching and data structures (data definition, working storage). That
new code would be in the TBD library.
To reiterate, all code that must be portable is written in GNU C. The
object file output by the COBOL compiler contains no executable code,
only pointers to routines in cob1 and another TBD library. The
organization of these pointers is commonly referred to as a "thread".
Cheers,
jec
-----Original Message-----
From: Jeff Chimene [mailto:address@hidden
Sent: May 25, 2009 11:16 AM
To:Ron Norman
Subject: Re: [open-cobol-list] Proposed addition to OpenCOBOL: an
objectmodule generator
On Mon, May 25, 2009 at 6:15 AM,Ron Norman <address@hidden> <mailto:address@hidden> wrote:
Just my 2 cents, but GNU C does generate object modules on the
platform in
use.
Agreed. One of the proposal's goals is to generate object files that
represent compiled COBOL code as opposed to compiled C code.
If OpenCOBOL generated the object module directly then it needs to
deal with
the many different hardware platforms, Intel x86,Itanium,PA-Risc,
PowerPC,
SPARC, etc...
The object module format would be COFF. That /should/ be portable
across those systems.
GNU C does have some internal features which seem to allow GOTO and
computed
GOTO to be implemented.
Agreed. However, I don't suggest transforming the current C code into
threaded C code. I am suggesting using the theaded model in object
files. The run-time system uses the GNU C syntax for indirect jumps to
follow the thread.
Roger While would know better than I.
I waiting for feedback from him on this proposal.