www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/24/13:45:20

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: hello.s, anyone?
Date: 23 Sep 1997 21:00:29 GMT
Organization: Hewlett Packard
Lines: 28
Message-ID: <01bcc863$e35d6ec0$45111d0f@ros51675cra>
References: <607m3p$805$3 AT vnetnews DOT value DOT net>
NNTP-Posting-Host: ros51675cra.rose.hp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019