Next: Indexinstructions
Up: Stackinstructions
Previous: Stackinstructions
Arithemtic operations using the stack for parameters are executed in
the following order:
-
- 1. The last value pushed on the stack is the first operand.
-
- 2.The first value pushed on the stack is the second operand.
-
- 3.The operation is executed and the parameters are removed from
the stack.
-
- 4.The result is pushed on the stack.
- PUSHAC
- The accumulator is pushed on the stack. The stack
pointer is decreased after the value is stored.
- POPAC
- The stack pointer is increased by one and the value at
that address is stored to the accumulator.
- ADDST
- Adds the two last pushed elements on the stack. See
stack arithmetics.
- SUBST
- Subtracts the two last pushed elements on the stack. See
stack arithmetics.
- MULST
- Multiplies the two last pushed elements on the stack. See
stack arithmetics.
- DIVST
- Divides the two last pushed elements on the stack. See
stack arithmetics.
- LSA
- Transfers the value stored in the accumulator to the stack
pointer.
- LDS
- Transfers the address stored in the stack pointer to the
accumulator.
- PUSH
- Pushs a 16 bit value on the stack. Only direct addressing
mode is possible with this instruction.
- POP
- Pops the top value from the stack and stores it to the
specified address. Only direct addressing mode is supported.
Next: Indexinstructions
Up: Stackinstructions
Previous: Stackinstructions
Markus Hennecke
9/14/2003