A86: Re: Push


[Prev][Next][Index][Thread]

A86: Re: Push




push puts a value onto the stack and pop takes it off.  It is a first in
last out structure meaning whatever goes in first will come back out last.
here is an example:
current stack:
[c]
------ (rest of stack)
push [b]
current stack:
[b]
[c]
------ (rest of stack)
push [a]
current stack:
[a]
[b]
[c]
------ (rest of stack)
pop [a]
current stack:
[b]
[c]
------ (rest of stack)
and so on and so on.
it is also an easy way to copy a register to another one, like this:  (i
think)
push hl  ; put value of hl onto stack
pop de  ; take value off stack and put it into de
this is how i learned it from the tutorials that i read.

akshay
http://akdjr.freeservers.com
----- Original Message -----
From: <RSidetrack@aol.com>
To: <assembly-86@lists.ticalc.org>
Sent: Thursday, May 06, 1999 4:18 PM
Subject: A86: Push


>
> I am trying to learn what some things mean, and I was wondering exactly
what
> Push does
>
>



References: