From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: How I can get 32Bit code with gcc? Date: Sun, 21 Jan 2001 12:16:09 -0500 Lines: 62 Message-ID: <94f5er$d1s2j$1@ID-57378.news.dfncis.de> References: <94ehvn$350$1 AT snoopy DOT bndlg DOT de> NNTP-Posting-Host: nas-204-8.rochester.navipath.net (64.20.204.8) X-Trace: fu-berlin.de 980097308 13693011 64.20.204.8 (16 [57378]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com You really get 32-bit code. The problem is that your disassembler assumes the code to be 16-bit and disassembles it in 16-bit manner. 32-bit and 16-bit instructions are very often encoded using the same sequences of op-codes, so unless the disassembler knows whether or not the code is 32-bit it may make a wrong dump. -- Alexei A. Frounze alexfru [AT] chat [DOT] ru frounze [AT] ece [DOT] rochester [DOT] edu http://alexfru.chat.ru http://members.xoom.com/alexfru/ http://welcome.to/pmode/ "Christian Merz" wrote in message news:94ehvn$350$1 AT snoopy DOT bndlg DOT de... > 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 > > but this is not what i want, i want such a thing like this: > > push ebp > mov ebp,esp > nop > . > . > . > > I have no idea whats going wrong here, but i need the 32bit code! More I > need a output file with 32bit segments too (flat memory stuff)! > > Anybody has an idea, how i'll get this simple thing running? > > thanks in advance > > chris > >