Re: A86: More ASM Questions
[Prev][Next][Index][Thread]
Re: A86: More ASM Questions
In a message dated 1/23/99 9:07:48 PM Eastern Standard Time,
cflan@granitecity.com writes:
> If I push AF on the stack my stack would "look" like this
>
> AF
>
> If I push BC on the stack, my stack would now "look" like this
>
> BC
> AF
>
> Is this correct?
figuratively, no. the value that af had when it was pushed would be on the
stack. there would be no reference to af. same for bc.
>
> If I popped BC would the stack look like this
>
> AF
> BC
>
no. the value originally in bc would return to bc, and then be removed from
the stack. instead, the stack would look like this:
AF
hope this helps. the stack takes some time to understand. just remember that
whatever register was pushed onto the stack is irrelevent when it comes time
to pop the value. it can be popped to any [regular] register.