www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/01/14:15:42

Message-ID: <368D1E22.FBB7E4C9@gmx.de>
Date: Fri, 01 Jan 1999 20:12:34 +0100
From: Christian Hofrichter <ChristianHofrichter AT gmx DOT de>
X-Mailer: Mozilla 4.5 [de]C-CCK-MCD QXW03201 (Win95; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: How to get (direct) access to the 16 higher bits of a 32-bit register ?
Reply-To: djgpp AT delorie DOT com

I can get access to the 8 lower bits of the accumulator-register with
al, to the 16 lower bits of the accumulator-register with ax and to the
whole register with eax.
But how can I get access to 16 or 8 higher bits of, let's say, eax ?
If this is not possible are there tricks to do that. (bit operations
like "and" or "or" or "xor") ?
The problem is that I must move the value in ah_lo (bits 8-16)  to
al_hi(bits 16-24)iand the value in al_hi to ah_lo.
I tried the syntax ax_hi and so one for the higher bits, and gcc did not
complain about that, but when I disassembled the code, I saw that it
used for ax_hi ax. So I had no success.

- Raw text -


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