🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6055

Re: Segment overrides - TAMS bug???

#6055
From: Ralf Brown
Date: Sat, 04 May 1991 02:58
34 lines
1970 bytes
In article <1469@balrog.ctron.com> dj@ctron.com writes:
}In article <1991May3.063740.10187@ugle.unit.no>, rmich@Lise.Unit.NO (Rolf Michelsen) writes:
}> I have a problem with TAMS version 2.0. Has anybody tried to use
}> segment overrides in any of the string instructions?? I am trying
}> to move data from ES:SI to ES:DI with REP MOVS [byte es:si],[di] but 
}> did it work? NO :-( As far as I know it is possible to use segment
}> overrides for the SI-part of a string instruction. Am I wrong or is
}
}String instructions do not obey segment overrides.

Only partially true.  You can't override the ES: on the implicit use of DI,
but you *can* override the DS: on the implicit use of SI.  This means that
STOS and SCAS cannot make use of segment overrides, but LODS can be
overridden, as can the source operands of MOVS and CMPS.  To get TASM to
put in segment overrides on a string instruction, you'll need to jam the
appropriate byte into the assembly just prior to the string instruction.
I would suggest something like

SEG_ES MACRO
	DB 26h
	ENDM


...
	SEG_ES
	MOVSW
...


--
{backbone}!cs.cmu.edu!ralf  ARPA: RALF@CS.CMU.EDU   FIDO: Ralf Brown 1:129/3.1
BITnet: RALF%CS.CMU.EDU@CARNEGIE   AT&Tnet: (412)268-3053 (school)   FAX: ask
DISCLAIMER?  Did  | It isn't what we don't know that gives us trouble, it's
I claim something?| what we know that ain't so.  --Will Rogers
Technical Details
Message-ID: <1991May4.025827.11606@cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ralf
References: <1991May3.063740.10187@ugle.unit.no> <1469@balrog.ctron.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ralf
From: ralf+@cs.cmu.edu (Ralf Brown)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Segment overrides - TAMS bug???
Message-ID: <1991May4.025827.11606@cs.cmu.edu>
Date: 4 May 91 02:58:27 GMT
References: <1991May3.063740.10187@ugle.unit.no> <1469@balrog.ctron.com>
Sender: netnews@cs.cmu.edu (USENET News Group Software)
Organization: School of Computer Science, Carnegie Mellon
Lines: 34