From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: compiling Date: Sun, 02 May 1999 11:12:21 -0400 Lines: 50 Message-ID: <372C6B55.1174@erols.com> References: <12552 DOT 990502 AT dkd DOT ot DOT lt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 6sJFkt2JjzCyX9b7C6CflMzglrixvcIjFoeqrmed4uQ= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 2 May 1999 15:14:02 GMT X-Mailer: Mozilla 3.01 (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexander_Pankov wrote: > I need VERY-VERY small com-file, for "32-DOS". What is "32-DOS" ? > Compiling *.o file, for > example, I get less than 500 bytes! How to link this small file??? Link it into what executable format. If you want a simple linked format like a DOS COM file then I recommend my linker JLOC (see my web page). You can do the same things with the DJGPP linker LD, but I think it is much harder to learn how to do it using LD's documentation than using JLOC's documentation. If that is the format you want, how do you plan to execute it? (or is that what 32-DOS is?). My bootp and bootf bootsectors let you go directly from boot-up to a 32-bit flat image, but I don't know how to run a 32-bit flat image (analogous to a DOS COM) within any x86 OS). > And where can I get description of *.o files??? http://www.delorie.com/djgpp/doc/coff/ I don't think it is enough to actually understand the format of .o files (it certainly wasn't for me; I needed a lot of experiments beyond that) but it is the best description I found. > I heard that DJGPP supports user-defined calls. If you figure out how to do that tell me also. > For example, Delphi > sends some parameters through registers EAX, ECX, EDX. DJGPP supports a very limited ability to send some parameters through registers, for example: void test(int input) __attribute__ ((regparm (1))); The above line tells GCC that the parameter "input" is passed in via eax rather than on the stack. Search for regparm in your documentation to see what more you can do with it. It isn't as flexible as you would like, but it does much of what you probably want. -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/