Date: Sun, 21 Jan 2001 14:28:08 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Christian Merz cc: djgpp AT delorie DOT com Subject: Re: How I can get 32Bit code with gcc? In-Reply-To: <94ehvn$350$1@snoopy.bndlg.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 21 Jan 2001, Christian Merz wrote: > I have following problem with gcc. If I compile and link, for example the > following code with "gcc -c main.c -o > main.o -nostdlib -fno-builtin -nostartfiles -Di586" and "ld -o > main.com -oformat binary -T startup\link.scr startup\c1.o main.o" (c1.o is > my on startup code). > > /*main.c*/ > int main() { > for(;;); > return 0; > } > > i'll get somthing like that, if I take a look with the dos debug.exe: > > 0x100: pusb bp > 0x101: mov bp,sp > 0x103: nop > 0x104: jmp 0x104 > 0x106: mov si,si > 0x109: xor ax,ax > 0x10c: jmp 0x10f > 0x10f: leave > 0x110: ret What does "objdump --disassemble main.o" produce? Does it show 32-bit code or 16-bit code? (DOS's DEBUG is not a reliable tool to look at anything except code produced by real-mode DOS compilers.)