www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/27/17:43:10

Date: Sat, 28 Dec 1996 11:20:59 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: simple in-line asm question ?
To: Jens Vaasjo <jvaasjo AT gpu DOT srv DOT ualberta DOT ca>
Cc: djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <32C5029B.236A@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <32C1CFB6 DOT 482E AT gpu DOT srv DOT ualberta DOT ca>

Jens Vaasjo wrote:
> 
> With in-line assemly in djgpp can you assume that es==ds when
> it gets enters your inline assemly ?

yes

> Also does the es register have to be preserved (if you change es do you
> have to set it back its its original value) ?

yes, otherwise, gcc's string operations (esp strlen) won't work

> Also if you have to preserve the es register does it have to be done
> manually ("pushl %%es\n" and "popl %%es\n") or can you put something in
> the 'registers clobbered' section ("ecx" works but "es" does not)?

Manually, gcc's extended asm doesn't know about segment registers.


Bill
-- 
Leave others their otherness.

- Raw text -


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