This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc and real-mode i386
- To: berndj at prism dot co dot za
- Subject: Re: gcc and real-mode i386
- From: John Wehle <john at feith dot com>
- Date: Thu, 1 Mar 2001 19:53:23 -0500 (EST)
- Cc: gcc at gcc dot gnu dot org
> Some while ago I tried to build a bootloader for i386 machines, but
> using gcc.
>
> ...
>
> I started search-and-destroying all occurrences of "call" to "calll"
> and "ret" to "retl" but then gave up rather than wonder if I got *all*
> the instances. Has anyone else done this already? (If after-2.95.2
> gcc now does The Right Thing, sorry, I'll go and RTFM.)
Another approach is to have the startup code switch to 32 bit protected
mode early on and use gcc without modification. This is probably less
work and less error prone than hacking gcc to support x86 real-mode.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------