Re: Does Linux hog fs and gs registers?

From: Dan (spamtrap_at_crayne.org)
Date: 02/11/05


Date: Fri, 11 Feb 2005 20:05:20 +0000 (UTC)

I'm impressed that anyone could free up so many registers! As a point
of reference, though, when I started in assembler, we were lucky to
have an FPU... and it was uphill, both ways.

What I was trying to do was integrate the logic of some 8086 code for
operations involving multiple circular buffers, and it used the string
instructions. When I drove home from work, I thought, "Gee, these are
old-fashioned. A lot of guys forego them, in favor of bx." That's
when it hit me - looking at all that old 8086 code, I was struggling to
imagine doing this in some other fashion with only string instructions
or bx! I completely forgot that in .386 mode, I could use any other
register in the same way as bx. That gives me a lot of ways to point
anywhere I want.

Kind of embarrassing.

Oh well, my stuff is pretty boring code anyways, competing with the
stiff competition from COBOL code that we still run under XP. All
business stuff, not a graphic or noise in sight.

Thanks again for everyone's comments. I learned a lot.



Relevant Pages

  • Re: IGI vs FHC vs Parish Registers
    ... In Yorkshire, you may even get REALLY lucky, at one period, and be given ... the IGI contained vis a vis the actual registers to be able to work out ... Death Duty Registers records payment of death duties... ... Eve McLaughlin ...
    (soc.genealogy.britain)
  • Re: Fastest Code for byte-substitutions in a string?
    ... The code uses the old string instructions, ... "repne scasb" and stosb without a REP prefix, ... slow on any of the hardware that has been around for the last 10 years. ... instructions and replacing them with addresses in registers and ...
    (comp.lang.asm.x86)