From: Martin Str|mberg Subject: Re: LD - the DJGPP linker Newsgroups: comp.os.msdos.djgpp References: User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha)) Message-ID: <1026337050.214821@queeg.ludd.luth.se> Cache-Post-Path: queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: 10 Jul 2002 21:37:30 GMT Lines: 33 NNTP-Posting-Date: 10 Jul 2002 21:37:30 GMT NNTP-Posting-Host: queeg.ludd.luth.se X-Trace: 1026337050 news.luth.se 467 130.240.16.109 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Graham Warren wrote: : This question is about linking code written in assembler using the DJGPP : linker. : Hi, : When I write 32-bit code in assembler (to simply display a string, no setup, : or entry code whatsoever),then compile to the COFF object file format and : link using LD, is this automatically a protected mode program. If so, where Probably. If you don't write a linker script of your own or give certain options to ld, I think it'll create a protected mode program. : does the code come from to enter protected mode? It's prepended to the actual program. The stub is 2kiB. If you look at all DJGPP program you'll find that they all have the same stub (with minor differences if the stub has been changed). : Am I writing a protected-mode program here or simply a 32-bit plain DOS : executable? Yes and yes. You're are writing a pm program with a stub which makes it a plain DOZE executable. There are no 32-bit plain DOZE executables. DOZE is 16-bit always. : Thanks, apologies for the dumb question What's dumb? The question that isn't asked! Right, MartinS