Embedding assembly code in c/c++ project
01/03/2018 10:46
Hello everyone, I'm trying to put in some watchdog code in my application and I'm havingtrouble embedding the assembly into the code.

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

Thanks in advance,Phil

Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
01/03/2018 10:46 - Well the code that I have to put in is already in assembly...

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

someQNX

Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
01/03/2018 10:46 - On Mon, 02 Aug 2004 22:52:24 GMT, Mario Charest NASM (Netwide assembler) for x86 processors have TASM (Borland) compatibility mode.

But you must make *.asm file[s] and then *.obj.

And linking with C files.


Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
01/03/2018 10:46 - 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...


Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
01/03/2018 10:46 - Phil <felipe.marcelino@sippican.com> wrote in message news:cem515$62r$1@inn.qnx.com...

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. Evenif you 'd put it in a stand alone .asm file you will probaby need tomake 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.


Source is Usenet: comp.os.qnx
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below