Mail Archives: djgpp/1997/09/24/13:45:20
M. Schulter <mschulter AT value DOT net> wrote in article
<607m3p$805$3 AT vnetnews DOT value DOT net>...
> gcc -Wall -g -o hello.exe hello.s
I don't think that either the -Wall or the -g has any affect here really.
Both are handled by cc1 and not
passed down to as.
> Another, possibly, would be a Linux-style approach that calls C
> functions like _printf or _puts from within a GAS file, rather like
> the output from a hello.c with `gcc hello.c -S'. Could this be done in
> DJGPP?
Why not? It seems silly for a hello world type program, but works.
Another
option is to have a c program whose main function just calls another one
(asm_main or sth)
which does the real work. That way you don't have to worry about whether
to call __main or not
and leave it up to the compiler.
> solutions to the enigma of a standalone hello.s (or hello.S --
> preprocessor not excluded).
Not worth it using GAS. With NASM or debug you can get it down to 20 bytes
or less
for the com file (depends on the message size)
- Raw text -