www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/21/07:30:08

Date: Sun, 21 Jan 2001 14:28:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Christian Merz <cmerz AT bndlg DOT de>
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: <Pine.SUN.3.91.1010121142614.16311B-100000@is>
MIME-Version: 1.0
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

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.)

- Raw text -


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