From: ArarghMail912NOSPAM on
On Sun, 27 Dec 2009 23:57:30 +0000 (UTC), dbr(a)kbrx.com wrote:

>I'll give it a try & see what happens.

And DON'T use '/coff' on the command line. You should get 32-bit OMF
files, which is what I think the Borland linker expects. Never used
Borland products, so don't really know.

<snip>
--
ArarghMail912 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.
From: Chris H on
In message <xaudnWLLO9McMqrWnZ2dnUVZ_tJi4p2d(a)web-ster.com>, Tim Wescott
<tim(a)seemywebsite.com> writes
>On Sun, 27 Dec 2009 17:23:59 +0000, Hul Tytus wrote:
>
>> comp.arch.embedded
>> Assembly code with Borland's C compiler
>>
>> Anyone have suggestions regarding the form for assembley code files
>> used
>> with Borland's version C compiler? The code below, assembled by masm6,
>> doesn't satisfy the linker (Borland's).
>> The segment names are a guess for the most part - taken from masm6's
>> accrued examples on other projects. "cs:DGROUP" appears off but, if the
>> error is due to segment names, maybe someone here knows suitable names?
>> The code & bat file & error messages are included below.
>>
>-- snip --
>
>If I'm working with a tool chain that supports compiling to assembly I
>cheat. I write a framework file in C and compile to assembly, then find
>the insides of the functions and start writing code.
>
>It may not be manly, but it works just fine.

I always recommended that method. Particularly when people wanted in
line assembly or a small amount of assembly in a C program.

write an empty c function call, with all the parameters, compile to
assembler and out the body in by hand.

This sorts out all the parameter passing and you can call it with a
standard C include file. Much more efficient.

Of course at one time all compilers went to assembly code Then you
assembled and linked. Actually even the compilers tended to be 3 pass
affairs. Now it is a single pass to object code ...

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



From: Vladimir Vassilevsky on


Chris H wrote:

> In message <xaudnWLLO9McMqrWnZ2dnUVZ_tJi4p2d(a)web-ster.com>, Tim Wescott
> <tim(a)seemywebsite.com> writes
>

>>If I'm working with a tool chain that supports compiling to assembly I
>>cheat. I write a framework file in C and compile to assembly, then find
>>the insides of the functions and start writing code.
>>
>>It may not be manly, but it works just fine.
>
>
> I always recommended that method. Particularly when people wanted in
> line assembly or a small amount of assembly in a C program.
>
> write an empty c function call, with all the parameters, compile to
> assembler and out the body in by hand.

The simple and stupid way for passing parameters between C and assembler
is by global variables. It is trivial, it is portable, and independent
from possible changes in the calling agreements of the future versions
of the same toolset. The aesthetes can implement some sort of locking or
roll their own stack to ensure atomic access to globals.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
From: Marco on
On Dec 27, 10:23 am, Hul Tytus <h...(a)panix.com> wrote:
> comp.arch.embedded
> Assembly code with Borland's C compiler
>
>    Anyone have suggestions regarding the form for assembley code files used
> with Borland's version C compiler?

What embedded target is this for?
From: Chris H on
In message <d6b5e078-9226-4f28-9f2d-db945618abe7(a)o28g2000yqh.googlegroup
s.com>, Marco <prenom_nomus(a)yahoo.com> writes
>On Dec 27, 10:23�am, Hul Tytus <h...(a)panix.com> wrote:
>> comp.arch.embedded
>> Assembly code with Borland's C compiler
>>
>> � �Anyone have suggestions regarding the form for assembley code files used
>> with Borland's version C compiler?
>
> What embedded target is this for?

X86 AFAIK Borland only did compilers for X86
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/