From: Ed Beroset
Subject: Re: Directly writing to m
Brian McCloud wrote:
>
> EB>> SM> (assuming, of course, that mov ax,ss:[sp] worked ;)
> EB>>
> EB>>DG> Why wouldn't it?
[...]
> EB>there is no way to specify [sp] as a destination address.
>
> However, in 32-bit addressing modes, the SIB byte allows ss:[esp] as a
> destination. So,
> mov ss:[esp], eax
> encodes as (hexidecimal, assuming a Use32 segment)
> 8B 04 24
That's certainly true, but [esp] and [sp] are not the same thing.
There's a way to use [esp] but not [sp] as a destination address. Sorry
if that wasn't clear.
Ed
-!-
---
---------------
* Origin: The Circuit! Board * Spokane * (1:346/100)
|