Re: Creating a pure binary image using binutils ?
- From: Tauno Voipio <tauno.voipio@xxxxxxxxxxxxx>
- Date: Mon, 15 Sep 2008 15:35:25 GMT
ksashtekar@xxxxxxxxx wrote:
Hello Friends,
I am trying to boot a floppy image on Bochs (x86 emulator).
I have made a small program in assembly where i use the bios video
services (0x10) to write a character to the screen.
I compiled this program using gcc.
I am going to write it to the boot sector of the floppy image.
Can anybody tell me how to get a pure binary image from the elf file
gcc has produced.
I guess i have to use objcopy. But I am not sure. Can anybody help?
It seems obvious that the file you produced with
gcc is 32 bit code. A PC boots in 16 bit mode and
it does not understand 32 bit code, when initially
booted.
The code read from the boot diskette (image) has
to transfer the computer into 32 bit mode before
the binary produced by gcc is runnable.
On the other hand, the 32 bit code cannot use
common BIOS routines which run in 16 bit mode.
--
Tauno Voipio
tauno voipio (at) iki fi
.
- Follow-Ups:
- Re: Creating a pure binary image using binutils ?
- From: cs_posting
- Re: Creating a pure binary image using binutils ?
- References:
- Creating a pure binary image using binutils ?
- From: ksashtekar@xxxxxxxxx
- Creating a pure binary image using binutils ?
- Prev by Date: Re: Embedding MATLAB
- Next by Date: Re: How to create a sine lookup table...
- Previous by thread: Re: Creating a pure binary image using binutils ?
- Next by thread: Re: Creating a pure binary image using binutils ?
- Index(es):
Relevant Pages
|