forgot to post. ----- Original Message ----- From: "Jeremy Jackson" <[EMAIL PROTECTED]> To: "Ronald G Minnich" <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 10:14 AM Subject: Re: 16-bit address amd 32-bit address
> quote from http://www.linuxdoc.org/HOWTO/Assembly-HOWTO/gas.html: > ... > Again, the sources for Linux (the OS kernel) come in as excellent examples; > see under linux/arch/i386/ the following files: kernel/*.S, > boot/compressed/*.S, mathemu/*.S. > ... > 3.2.4. 16-bit mode > Binutils (2.9.1.0.25+) now fully support 16-bit mode (registers and > addressing) on i386 PCs. Use .code16 and .code32 to switch between assembly > modes. > Also, a neat trick used by several people (including the oskit authors) is > to force GCC to produce code for 16-bit real mode, using an inline assembly > statement asm(".code16\n"). GCC will still emit only 32-bit addressing > modes, but GAS will insert proper 32-bit prefixes for them. > ... > I'm not sure about linking though, and I've never done this myself. > ----- Original Message ----- > From: "Ronald G Minnich" <[EMAIL PROTECTED]> > To: "Eric Seppanen" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, February 06, 2002 12:15 PM > Subject: Re: 16-bit address amd 32-bit address > > > > On Wed, 6 Feb 2002, Eric Seppanen wrote: > > > > > I have also had problems with gcc not correctly generating 16-bit code > > > is some cases (in mixed 16/32bit code where symbols need to be resolved > > > later by the linker). I was not able to find a solution; maybe another > > > assembler would work better. > > > > > > my solution was to let nasm assemble it and then put the bytes into the .S > > file with the .byte operator > > > > ron > > >