From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Converting Assembly Date: 23 Oct 1997 07:06:12 GMT Organization: None provided Lines: 26 Message-ID: <62mt14$rc0$2f@195.26.68.19> NNTP-Posting-Host: 195.26.68.19 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Dj-Gateway: from mailing list djgpp AT delorie DOT com Precedence: bulk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk At 11:53 10/12/1997 -0400, Jeremy Braun wrote: >IF I have a piece of inline assembler from a pascal source file: > >mov ch,es:[1Ah] > >how would I convert that into AT&T style for use with DJGPP? Technically, the answer is: movb %es:0x1a,%ch But! GAS has been known to have bugs with segment overrides. The following would probably be safer: byte 0x26 # seg es movb 0x1a,%ch Another point: That instruction is *very* unlikely to do anything useful in protected mode. Unless you have changed `es', it will SIGSEGV. Reconsider what it's supposed to do. Nate Eldredge eldredge AT ap DOT net