🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.basm
4 messages
4 total messages Started by Diviner Chan Wed, 11 Sep 2002 20:01
How to access high 16 bit of EAX?
#243
Author: Diviner Chan
Date: Wed, 11 Sep 2002 20:01
10 lines
1132 bytes
Hi all,

I want to access high 16 bits of EAX. But I can't find EAH in
Delphi. How to do that?

Thank you very much.

--
Best regards,
Diviner.
Re: How to access high 16 bit of EAX?
#144
Author: Christen Fihl
Date: Wed, 11 Sep 2002 20:20
11 lines
1335 bytes
You can use AL,AH,AX,EAX, but not EAH :(

You have to shift the bits down into one of those registers first.

  shr eax,16

Now AX is the high part of EAX and this was the high 16 bit of EAX

--
Christen Fihl
http://HSPascal.Fihl.net/
Re: How to access high 16 bit of EAX?
#147
Author: Pierre Maurette
Date: Thu, 12 Sep 2002 12:01
16 lines
1327 bytes
yes for
  shr eax, 16.

but also:
  bswap eax
  mov word ptr [blabla], ax
  bswap eax

  (eax is not changed)

You can try (why not ?):
mov dword ptr [blabla - 2], eax
(word ptr blabla is now *eah")
(if you can write dummy data at blabla - 2)

Pierre
Re: How to access high 16 bit of EAX?
#150
Author: Frederico Pissarra
Date: Thu, 12 Sep 2002 13:25
15 lines
1363 bytes
"Diviner Chan" <diviner@i-cable.com> wrote in message
news:3D7FA132.E6934D1@i-cable.com...
> Hi all,
>
> I want to access high 16 bits of EAX. But I can't find EAH in
> Delphi. How to do that?
>
> Thank you very much.
>

This is because there is no EAH alias register... (as AH or AL for AX)...
You have to shift EAX 16 bits right to get access to upper 16 bits! :)

Best Regards,
Fred
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads