Board index » delphi » Compiler Option?

Compiler Option?

I'm currently taking a Pascal course at our local City College, and am
using Borland Turbo Pascal 7.0.  Is there a flag for the TPC that will
spit out .lis and .obj files before compiling straight to the
executable?  Personally I don't care, but the course teacher wants
those compiler logs, and object files to be output as well.  Any help
would be greatly appreciated by this 'green' programmer!  Oh, also how
do you link the .obj's in Borland after created?

                                        mailto:black...@rain.org

                          -Gregg Black / RAIN Tech Support

 

Re:Compiler Option?


RAIN Network Navigation Center in Santa Barbara wrote:

Quote
> I'm currently taking a Pascal course at our local City College, and am
> using Borland Turbo Pascal 7.0.  Is there a flag for the TPC that will
> spit out .lis and .obj files before compiling straight to the
> executable?  Personally I don't care, but the course teacher wants
> those compiler logs, and object files to be output as well.  Any help
> would be greatly appreciated by this 'green' programmer!  Oh, also how
> do you link the .obj's in Borland after created?

Turbo Pascal doesn't compile to .OBJ format.  Units are compiled directly to
..TPU, and the main program code is compiled directly to .EXE.  There are no
interim files created, and the compiler does not rely on a preprocessor,
assembler, or external linker for compilation.  Turbo Pascal is a fairly
specific implementation, and if you need a Standard Pascal compiler, it's
probably not recommended.  Now, if your instructor has specified Turbo Pascal,
either the specification is incorrect, or (s)he really doesn't know much about
Turbo Pascal.

[Removed comp.lang.pascal from newsgroups list -- this group has been defunct
for several years now.]

Quote
>                                         mailto:black...@rain.org

>                           -Gregg Black / RAIN Tech Support

--
Scott Earnest            | SPAM protection in effect. Remove  |
setech@_ix.netcom.com    | "_" as needed for true addresses.  |
earnests@_homenet.lm.com |    UIN:1136443  EFnet:pale_blue    |
sinykal@_{*word*104}space.org  | URL: http://www.netcom.com/~setech |

Re:Compiler Option?


RAIN Network Navigation Center in Santa Barbara wrote:

Quote

> I'm currently taking a Pascal course at our local City College, and am
> using Borland Turbo Pascal 7.0.  Is there a flag for the TPC that will
> spit out .lis and .obj files before compiling straight to the
> executable?

Sorry, that can't be done; Turbo Pascal (4.0 at least; I don't know
about
earlier versions) doesn't make .obj files.  It does make something
similar
to .lis files, however it does make .map files.  Below is a brief
snipping
of one from one of my projects:

 Start  Stop   Length Name               Class

 00000H 089EFH 089F0H compinfo           CODE
 089F0H 100FAH 0770BH BGIDriv            CODE
 10100H 13B2BH 03A2CH Graph              CODE
 13B30H 13B6CH 0003DH os                 CODE
 13B70H 13CB9H 0014AH pcilist            CODE
 13CC0H 14212H 00553H pci                CODE
.
.
.

  Address         Publics by Value

 0000:0000       verbose_write
 0000:0043       numstr
 0000:0079       strupr
 0000:00F5       ISOK
 0000:011C       GetInfo
 0000:01A6       _GetDrives
.
.
.

Perhaps this is what you are looking for?  BTW - I got this output as a
.map
file by using one of the options in the `Options`->`Linker` menu item of
Turbo Pascal 7.  I don't know how to get such a file with previous
versions.

Quote
>              Personally I don't care, but the course teacher wants
> those compiler logs, and object files to be output as well.  Any help
> would be greatly appreciated by this 'green' programmer!  Oh, also how
> do you link the .obj's in Borland after created?

Like I said, Turbo Pascal doesn't make .obj files.  However, there is
this
method (a snipping from one of my programs):

{$L timeproc.obj}
{$F+}
function _grabtime : integer; external;
function _Time_Processor_bsf : integer; external;
{$F-}

In this case, timeproc.obj was generated from timeproc.asm by TASM.
Before
there was an inline assembler, this was the way programmers usually put
assembly routines in their Pascal programs.  I still use this method,
primarily
because this was the only way I could get the routines to work (hard
coding the
'386 instructions used in timeproc.asm in the asm...end statement
generated results
that were off my as much as 250%)  This same method can be used to
integrate
C routines in your Pascal program.

BTW - I didn't send this to comp.lang.pascal.  As I understand, that NG
is
`dead`.

--
----------------------------------------------------------------------
Phil Brutsche

"Be of stout heart, Number One.  We've handled the Borg.  We can
certainly handle Admiral Jellico." - Jean-Luc Picard

----------------------------------------------------------------------

Re:Compiler Option?


i don't own TP (for my bunghole) but there should be a verbose option
somewere.  do tp /? (or whatever the TP command is) to find out what
the verbose option is.

On Wed, 18 Feb 1998 00:58:48 GMT, h...@rain.org (RAIN Network
Navigation Center in Santa Barbara) wrote:

Quote

>I'm currently taking a Pascal course at our local City College, and am
>using Borland Turbo Pascal 7.0.  Is there a flag for the TPC that will
>spit out .lis and .obj files before compiling straight to the
>executable?  Personally I don't care, but the course teacher wants
>those compiler logs, and object files to be output as well.  Any help
>would be greatly appreciated by this 'green' programmer!  Oh, also how
>do you link the .obj's in Borland after created?

>                                    mailto:black...@rain.org

>                          -Gregg Black / RAIN Tech Support

---------------------http://w3.nai.net/~perfecto--------------------------
Perry Fecteau, Republican
The new pages go up January 1,1998  *** POSTPONED UNTIL FURTHER NOTICE ***
---------------------http://w3.nai.net/~perfecto--------------------------

Other Threads