embedding assembly code in c/c++ project

Hello everyone,

I’m trying to put in some watchdog code in my application and I’m having
trouble embedding the assembly into the code.

The sample code that came with the single board computer is written for the
Borland C++ compiler. Does anyone have any sample code, or a link to some
sample code that shows the syntax for embedding assembly code into the QNX
compiler.

Thanks in advance,
Phil

Why bother with assembly? Should be fairly simple to rewrite in C.

“Phil” <felipe.marcelino@sippican.com> wrote in message
news:celr53$sco$1@inn.qnx.com

Hello everyone,

I’m trying to put in some watchdog code in my application and I’m having
trouble embedding the assembly into the code.

The sample code that came with the single board computer is written for
the
Borland C++ compiler. Does anyone have any sample code, or a link to some
sample code that shows the syntax for embedding assembly code into the QNX
compiler.

Thanks in advance,
Phil

Well the code that I have to put in is already in assembly…


“Mario Charest” <nowheretobefound@8thdimension.com> wrote in message
news:cem20a$3n4$1@inn.qnx.com

Why bother with assembly? Should be fairly simple to rewrite in C.

“Phil” <> felipe.marcelino@sippican.com> > wrote in message
news:celr53$sco$> 1@inn.qnx.com> …
Hello everyone,

I’m trying to put in some watchdog code in my application and I’m having
trouble embedding the assembly into the code.

The sample code that came with the single board computer is written for
the
Borland C++ compiler. Does anyone have any sample code, or a link to
some
sample code that shows the syntax for embedding assembly code into the
QNX
compiler.

Thanks in advance,
Phil
\

“Phil” <felipe.marcelino@sippican.com> wrote in message
news:cem515$62r$1@inn.qnx.com

Well the code that I have to put in is already in assembly…

You will have to rewrite it to some degree because it’s very unlikely
borland C++
way of inserting assembly language in C code is the same as gcc. Even
if you 'd put it in a stand alone .asm file you will probaby need to
make some major changes.

So why not convert it to C and get rid of any futur compatibility issue?

For pointer how to deal with assembly langauge look at the gcc documentation
on gcc.gnu.org.


“Mario Charest” <> nowheretobefound@8thdimension.com> > wrote in message
news:cem20a$3n4$> 1@inn.qnx.com> …


Why bother with assembly? Should be fairly simple to rewrite in C.

“Phil” <> felipe.marcelino@sippican.com> > wrote in message
news:celr53$sco$> 1@inn.qnx.com> …
Hello everyone,

I’m trying to put in some watchdog code in my application and I’m
having
trouble embedding the assembly into the code.

The sample code that came with the single board computer is written for
the
Borland C++ compiler. Does anyone have any sample code, or a link to
some
sample code that shows the syntax for embedding assembly code into the
QNX
compiler.

Thanks in advance,
Phil


\