🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1351

Re: Need help in porting 8088/286 assembly code to 386.

#1351
From: Dana H. Myers
Date: Fri, 28 Jun 1991 05:59
41 lines
2761 bytes
In article <N_4C5L7@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes:
>In article <1991Jun24.160828.6047@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
>> In article <1991Jun21.161443.13880@kofax.uucp> jdm@kofax.uucp (James D. Murray) writes:
>> >realizing the changes that must be made to 8086/80286 assembly code
>> >to make it 80386-only.
>> >	I'm told that I need to do away with the lds and les instructions
>> >and rewrite code that considers the segement in address calculations.
>
>> My guess is that if the code ran on an 8088, it should run
>> reasonably quickly on a '386 without changes.  The 386/25 on my
>> desk runs 20 times faster than my 8088/4.77 at home.  Can an
>> additional 10%-50% going to buy anyone anything?
>
>Well, if the code uses segments extensively you can expect as much as a
>factor of 10 slowdown because of the extra costs involved in doing
>segment calculations. We have code here that runs slower on the 386
>than on the 286 because of this.

  I'm a little surprised. Loading a segment register in Real Mode is
comparable on both CPUs. Loading a segment register in Protected Mode
is comparable on both CPUs. One would expect a factor of about 8 slowdown
on the same load between Real and Protected Modes. In order to get this
order of magnitude slowdown, one would have to compare a Real Mode 286
with a Protected Mode 386, which, in my judgement, is apples and oranges.

  However, since the 386 allows one to set up an environment with
essentially flat segments, segment loads can be completely eliminated,
thus gaining a performance increase, even when comparing a Protected
Mode 386 to a Real Mode 286.

  Note that the extra cost is only incurred when *loading* a segment
register; once loaded, they cost nothing to use.

  When waving around numbers like Peter did, try to support them with
a little more than simple hocus pocus. ;-)


-- 
 * Dana H. Myers KK6JQ 		| Views expressed here are	*
 * (213) 337-5136 		| mine and do not necessarily	*
 * dana@locus.com		| reflect those of my employer	*
Technical Details
Message-ID: <1991Jun28.055946.2521800@locus.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ubc-cs!uw-beaver!zephyr.ens.tek.com!uunet!decwrl!mejac!orchard.la.locus.com!devnet.la.locus.com!dana
References: <1991Jun21.161443.13880@kofax.uucp> <1991Jun24.160828.6047@ima.isc.com> <N_4C5L7@xds13.ferranti.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ubc-cs!uw-beaver!zephyr.ens.tek.com!uunet!decwrl!mejac!orchard.la.locus.com!devnet.la.locus.com!dana
From: dana@locus.com (Dana H. Myers)
Newsgroups: comp.sys.intel,alt.lang.asm
Subject: Re: Need help in porting 8088/286 assembly code to 386.
Message-ID: <1991Jun28.055946.2521800@locus.com>
Date: 28 Jun 91 05:59:46 GMT
References: <1991Jun21.161443.13880@kofax.uucp> <1991Jun24.160828.6047@ima.isc.com> <N_4C5L7@xds13.ferranti.com>
Organization: Locus Computing Corp, Los Angeles
Lines: 41