From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJASM DOCS? Date: Thu, 12 Jun 1997 20:32:34 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 32 Message-ID: <33A05CE2.5B53@cs.com> References: <33A091A8 DOT 5BCF AT pukopn1 DOT puk DOT ac DOT za> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp103.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk acebear AT pukopn1 DOT puk DOT ac DOT za wrote: > > The docs I got with DJGPP includes very little info on using DJASM.EXE. > This is the assembler right? Any idea where I can get examples/docs for > it? djasm is not the main assembler! It is designed for one purpose only: to build the 2k real mode stub that is attached to all DJGPP programs and handles the tasks of detecting and loading DPMI, switching from real to protected mode, and passing control to the main program. It is possible to generate 16-bit executable code from djasm, but not recommended. The assembler that is used to compile your programs is 'as.exe', also known as GAS (the GNU ASsembler). It is automatically run by the 'gcc' frontend program, and you should _never_ need to invoke it manually. gcc does all kinds of stuff that you must duplicate for manual calls to as. Also, as does not handle preprocessor directives; to do this you must tell gcc to pass your source code through the preprocessor by invoking it with an uppercase 'S' as the file extension. This part is covered in the GCC docs ("info gcc invoking"). Don't try to second guess the DJGPP developers or the GNU developers; things are the way they are for a purpose. -- --------------------------------------------------------------------- | John M. Aldrich | "Waking a person unnecessarily | | aka Fighteer I | should not be considered a capital | | mailto:fighteer AT cs DOT com | crime. For a first offense, that | | http://www.cs.com/fighteer | is." - Lazarus Long | ---------------------------------------------------------------------