stack

package
v0.0.0-...-6774e02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DUP

type DUP struct{ base.NoOperandsInstruction }

Duplicate the top operand stack value

func (*DUP) Execute

func (self *DUP) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

\_
  |
  V

[...][c][b][a][a]

type DUP2

type DUP2 struct{ base.NoOperandsInstruction }

Duplicate the top one or two operand stack values

func (*DUP2) Execute

func (self *DUP2) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]____

\____   |
     |  |
     V  V

[...][c][b][a][b][a]

type DUP2_X1

type DUP2_X1 struct{ base.NoOperandsInstruction }

Duplicate the top one or two operand stack values and insert two or three values down

func (*DUP2_X1) Execute

func (self *DUP2_X1) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

 _/ __/
|  |
V  V

[...][b][a][c][b][a]

type DUP2_X2

type DUP2_X2 struct{ base.NoOperandsInstruction }

Duplicate the top one or two operand stack values and insert two, three, or four values down

func (*DUP2_X2) Execute

func (self *DUP2_X2) Execute(frame *rtda.Frame)

bottom -> top [...][d][c][b][a]

 ____/ __/
|   __/
V  V

[...][b][a][d][c][b][a]

type DUP_X1

type DUP_X1 struct{ base.NoOperandsInstruction }

Duplicate the top operand stack value and insert two values down

func (*DUP_X1) Execute

func (self *DUP_X1) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

 __/
|
V

[...][c][a][b][a]

type DUP_X2

type DUP_X2 struct{ base.NoOperandsInstruction }

Duplicate the top operand stack value and insert two or three values down

func (*DUP_X2) Execute

func (self *DUP_X2) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

 _____/
|
V

[...][a][c][b][a]

type POP

type POP struct{ base.NoOperandsInstruction }

Pop the top operand stack value

func (*POP) Execute

func (self *POP) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

|
V

[...][c][b]

type POP2

type POP2 struct{ base.NoOperandsInstruction }

Pop the top one or two operand stack values

func (*POP2) Execute

func (self *POP2) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

|  |
V  V

[...][c]

type SWAP

type SWAP struct{ base.NoOperandsInstruction }

Swap the top two operand stack values

func (*SWAP) Execute

func (self *SWAP) Execute(frame *rtda.Frame)

bottom -> top [...][c][b][a]

 \/
 /\
V  V

[...][c][a][b]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL