delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/13/22:12:28

Date: Mon, 13 Oct 1997 19:10:16 -0700 (PDT)
Message-Id: <199710140210.TAA28988@adit.ap.net>
Mime-Version: 1.0
To: jtbraun AT bellsouth DOT net, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Converting Assembly

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



- Raw text -


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