Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with assembler-inline-code with standard builder

12 views
Skip to first unread message

Ralf Wehling

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
hi together
I work on a project which use an ADU on a serial port. I developed a
assembler inline routine
which worked fine with a small program . After developing (and
expanding) the main program the IDE the compiler generate an asm file
instead of an exe file. (i made no change in options.....??????????).
What happens???
A try to link the obj file was also without success....
Who can help?

Stefan Hoffmeister

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to
: Ralf Wehling <02361...@t-online.de> wrote:

>I developed a
>assembler inline routine
>which worked fine with a small program . After developing (and
>expanding) the main program the IDE the compiler generate an asm file
>instead of an exe file. (i made no change in options.....??????????).
>What happens???

From the subject I take it that you are using Borland C++ Builder
"Standard" edition.

When you write inline assembler code, BCB will automatically switch to
generating ASM source files which then will have to "compiled" with
Turbo Assembler (TASM).

As Borland C++ Builder "Standard" does not come with TASM (only Pro
and C/S do), you face a problem.

Three solutions:

- Upgrade to a copy of C++ Builder Pro (IMO the best choice)

- Purchase TASM 5.0

- Rewrite your inline assembler code in the "Delphi" part of
C++ Builder (i.e. as an Object Pascal assembler-only routine)
There you do not need an external assembler.


--
Stefan Hoffmeister http://www.econos.de/
No private email, please, unless expressly invited.

J.A. Bijsterbosch

unread,
Nov 2, 1998, 3:00:00 AM11/2/98
to
Hello Stefan,

Stefan Hoffmeister <no....@address.in.signature> schreef in artikel
<3634b9a5...@forums.inprise.com>...
> : Ralf Wehling <02361...@t-online.de> wrote:
>
[ snip question about ASM in BCB code ]


> - Rewrite your inline assembler code in the "Delphi" part of
> C++ Builder (i.e. as an Object Pascal assembler-only routine)
> There you do not need an external assembler.

This sounds like an interesting approach to those very few times one needs
to do this, in my case at least<g>. However having no experience with
Object Pascal and very little with assembler, is there a faq or tutorial
you know of that describes the use of ASM in delphi source files?

> Stefan Hoffmeister

--
Greetings from overcast Amsterdam

Jan

email: bij...@worldonline.nl
http://home.worldonline.nl/~bijster

Stefan Hoffmeister

unread,
Nov 2, 1998, 3:00:00 AM11/2/98
to
: "J.A. Bijsterbosch" <bij...@worldonline.nl> wrote:

>[ snip question about ASM in BCB code ]
>> - Rewrite your inline assembler code in the "Delphi" part of
>> C++ Builder (i.e. as an Object Pascal assembler-only routine)
>> There you do not need an external assembler.
>
>This sounds like an interesting approach to those very few times one needs
>to do this, in my case at least<g>. However having no experience with
>Object Pascal and very little with assembler, is there a faq or tutorial
>you know of that describes the use of ASM in delphi source files?


unit ThisIsAssembler;

interface

procedure AProcedure; register; // use __fastcall calling convention

implementation

procedure AProcedure; register; assembler;
asm
int 3

// Well, simply assembler - see docs

end;


end.

J.A. Bijsterbosch

unread,
Nov 6, 1998, 3:00:00 AM11/6/98
to
Hello Stefan,

Stefan Hoffmeister <no....@address.in.signature> schreef in artikel

<364021f7...@forums.inprise.com>...
> : "J.A. Bijsterbosch" <bij...@worldonline.nl> wrote:
>
[ snip question inline asm in OP ]


> procedure AProcedure; register; assembler;
> asm
> int 3
>
> // Well, simply assembler - see docs
>
> end;

Well, that looked more straightforward then I thought<g>.
Thanks for the info...

> Stefan Hoffmeister

--
Greetings from sunny Amsterdam

0 new messages