About using assembly with c
- by kristus
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
?