delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/03/20:44:41

Date: Tue, 3 Mar 1998 17:37:15 -0800 (PST)
Message-Id: <199803040137.RAA07780@adit.ap.net>
Mime-Version: 1.0
To: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: DJGPP inline assembly instructions LDS and LES

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019