167.

prev next contents
swap

swap top two stack words

Jasmin Syntax
     swap 
Stack

Before

After
word1
word2
word2
word1
...
...
Description

Swaps the top two single-word items on the stack. word1/word2 cannot belong to a long or double.

Bytecode

Type

Description
u1
swap opcode = 0x5F (95)
Notes

There is no swap2, although you could use:

     dup2_x2     pop2 
to achieve the same effect.


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates


Java Virtual Machine
Java Virtual Machine (Java Series)
ISBN: 1565921941
EAN: 2147483647
Year: 1996
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net