About using assembly with c

Posted by kristus on Stack Overflow See other posts from Stack Overflow or by kristus
Published on 2010-05-08T09:53:10Z Indexed on 2010/05/08 9:58 UTC
Read the original article Hit count: 186

Filed under:
|
|
|

Hi.

I've sort of just finished a mandatory task at school, and I'm about to deliver it.

But then I came across something that was unfamiliar, header files. :(

What I've got:

test-program.c
task_header.h
function1.s
function2.s
function3.s
function4.s

test-program.c:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "task_header.h"
.
..
...

task_header.h:

extern void function1(...);
extern void function2(...);
extern int  function3(...);
extern void function4(...);

And then I use the command:

gcc -m32 -o runtest test-program.c function1.s function2.s function3.s function4.s

Is this a proper way to do it, or is it possible to modify it? So I can type:

gcc -m32 -o runtest test-program.c

?

© Stack Overflow or respective owner

Related posts about school

Related posts about assembly