Mail Archives: djgpp/1998/03/03/20:44:41
At 04:28 3/2/1998 -0800, Andrew Crabtree wrote:
>
>floyd hames wrote in message <19980302194433 DOT 3988 DOT qmail AT hotmail DOT com>...
>>I have been trying to use the instructions LDS and LES in an inline
>>assembly
>Someone more knowledgable here may correct me, but I'm not sure if gas
>supports these
>instructions (or any that are targetted for segment registers really). You
>could look at sys/farptr.h to
>see an example of how the DJ code loads a segment register and then uses a
>segment register override prefix. Basically, a mov to a segment register
>works but you must use a db to specify the prefix.
GAS is just an assembler like any other, and no assembler would be complete
if it didn't support every instruction. The LDS and LES instructions are
indeed present, as are LFS, LGS, and LSS, they just have their syntax
changed like every other instruction.
Segment overrides are also supported by GAS, like `es', `fs'. The reason you
see the `.byte' version used instead frequently is because GAS once had a
subtle bug whereby it would occasionally ignore prefixes in their normal
forms. I think it is fixed now, but paranoia lingers...
Nate Eldredge
eldredge AT ap DOT net
- Raw text -