Messages in this thread | | | Date | Fri, 15 Oct 1999 12:58:15 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: bootsect.S changes |
| |
On Fri, 15 Oct 1999, Brian Gerst wrote:
> Richard B. Johnson wrote: > > I think this is still a 'work in progress'. I hope that somebody adds > > a directive to gas that tells it to assemble 16-bit code so the source > > code doesn't have to be wrong to get it to make 16-bit code. The > > prefix 0x66 is a switch. It changes the default oprand size of the > > processor. If the processor is in 32-bit mode, 0x66 is used to make > > it do word, instead of longword operations. If the processor is > > in 16-bit mode, 0x66 prefix makes it do longword instead of the default > > word operations. Therefore, an assembler needs to 'know' when to > > not use 0x66. In other words it needs to know the current operation > > mode of the processor. > > > > Maybe a switch like ".i-32" (Intel 32-bit) ".i-16" (Intel 16-bit) > > needs to be added to GAS. > > > > It's already there: .code16 and .code32 >
Yep. But with some versions it doesn't work very well:
sc.o(.text+0x7): relocation truncated to fit: R_386_16 data sc.o(.text+0xc): relocation truncated to fit: R_386_16 data sc.o(.text+0x10): relocation truncated to fit: R_386_16 data sc.o(.text+0x15): relocation truncated to fit: R_386_16 data make: *** [sc] Error 1
You have to turn it on/off depending upon whether you are accessing data or not. Basically fairly broken.....
Cheers, Dick Johnson **** FILE SYSTEM WAS MODIFIED **** Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |