Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reg assembler logistics

4 views
Skip to first unread message

RB

unread,
Jul 7, 2010, 11:03:54 AM7/7/10
to
I am not experience in assembler, but sometimes I attempt to
do (or study ) things that I can only see thru assembler. So
I have the following that I would like comments on from using
the inline assembler of MS VC 6.x
-----------------------------------------------------------------
__asm // delete afer experiment
{ // Question 1 is mov reg, ebp-4 Legal ?
push eax // save eax
mov eax, ebp-4 // MS compiler makes this, mov eax, ebp, it drops the minus 4, evidently the ebp-4
// is not allowed. Anyhow the addr of 12FF80h (which is the addr held in ebp) gets
// moved to eax.
mov eax, [ebp-4] // this moves a copy of the value (0012FEA1h) held in addr (12FF7Ch) of ebp-4 into eax.
push [ebp-4] // this pushes the value (0012FEA1h) into the current addr of esp (12ff14h)
// Question 2 is push ebp-4 Legal?
push ebp-4 // this disassembles to, push ebp , it does not appear to do anything since the
// value (0012FEA1h) was already sitting at the current addr of esp (12ff10h) and
// nothing changed. The address ptd to by ebp-4 was 12FF7Ch at the time.
pop eax
pop eax
pop eax // restore eax
}

RB

unread,
Jul 7, 2010, 9:52:50 PM7/7/10
to
I have solved this issue from experimentation.

doriangray

unread,
Jul 30, 2010, 1:25:07 PM7/30/10
to
RB wrote:
> I have solved this issue from experimentation.

good

--
Dorian

0 new messages