ESP (stack) question (using HLA)???
- From: spamtrap@xxxxxxxxxx
- Date: Thu, 27 Oct 2005 22:49:13 +0000 (UTC)
I've tried to create my own (mini)stack using 'rstack' and pop & push
from it by assigning the ESP register then pop & push and then assign
ESP back to it's orinal value:
Wdeg: uns16 := 0;
rstack: uns16[ 2 ];
tesp: uns32;
....
mov( esp, tesp );
lea( esp, rstack );
//stdout.put( "esp = ", ( type uns32 esp ), nl ); This causes a stack
error!!!
push( ax );
mov( tesp, esp );
//stdout.put( "rstack = ", ( type uns16 rstack[ 0 ] ), nl );
....
mov( esp, tesp );
lea( esp, rstack );
pop( Wdeg );
mov( tesp, esp );
stdout.put( "Wdeg = ", ( type uns16 Wdeg ), nl );
Unfortunately, this isn't working. The value assigned to Wdeg is 0 not
82 (the value I thought I had pushed). Any ideas?
---John
.
- Follow-Ups:
- Re: ESP (stack) question (using HLA)???
- From: randyhyde@xxxxxxxxxxxxx
- Re: ESP (stack) question (using HLA)???
- From: spamtrap
- Re: ESP (stack) question (using HLA)???
- From: kain
- Re: ESP (stack) question (using HLA)???
- Prev by Date: Re: improve strlen
- Next by Date: Re: Combining two MMX registers into one SSE register?
- Previous by thread: Combining two MMX registers into one SSE register?
- Next by thread: Re: ESP (stack) question (using HLA)???
- Index(es):
Relevant Pages
|