Mail Archives: djgpp/2001/01/21/07:30:08
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 -