Re: Intel Assembly error
On Wed 16 Aug 2000, Branden Robinson wrote:
> I am not an assembly guru on any architecture, but here's what I think this
> means. Please be warned that these could be the ravings of a deranged
> The AX register is an old 16-bit register from 8086 days. When you're
> running in 32-bit mode, as all Linux systems do, the register should be
> accessed by its 32-bit name, EAX.
Actually, I believe they are separate entities.
> I think at some point gcc (or gas) used to automatically convert such
> misreferences. There's a whole slew of register names on the IA32 from the
> old 16-bit days that have a 32-bit version with the "E" prepended.
> (I think, in some contexts, you can actually use the 16-bit register names
> to fetch the low-order 16 bits out of the actual 32-bit register.)
No, you have AH to access the high 16 bits of EAX, and AL for the low
16 bits of EAX. Or was that the high 8 bits of AX etc...
Apart from that, using assembler is evil (if there isn't a C language
alternative) because then your source will never run on anything
besides the processor the assembler code is written for.
home: email@example.com http://www.wurtel.demon.nl/
work: firstname.lastname@example.org http://www.murphy.nl/
debian: email@example.com http://www.debian.org/
isdn4linux: firstname.lastname@example.org http://www.isdn4linux.de/