Skip to content

Opcodes

_nebula edited this page Apr 9, 2025 · 2 revisions

ADD

(Return type defined by this table.)

Takes two values from the stack, adds them together, and pushes the result onto the stack.

If either or both of the values are strings, or are variables representing strings, both are converting to strings and concatenated together. For example:

  • 5 ADD 6 = 11
  • 5 ADD "5" = 55
  • "test" ADD 2 = "test2"

AND

(Return type defined by this table.)

Takes two values from the stack, logical ANDs them together, and pushes the result.

B

Branches to the provided label. Does not affect the stack.

BF

Takes a bool from the stack, and branches to the provided label if the value is false.

BT

Takes a bool from the stack, and branches to the provided label if the value is true.

CALL

CALLV

CHKINDEX

CMP

CONV

DIV

DUP

EXIT

MOD

MUL

NEG

NOT

OR

POP

POPAF

POPENV

POPZ

Takes one value from the stack and discards it.

PUSH

PUSHAF

PUSHBLTN

PUSHENV

PUSHGLB

PUSHLOC

PUSHI

REM

RESTOREAREF

RET

Takes an RValue from the stack and returns it, stopping code execution.

SAVEAREF

SETOWNER

SHL

SHR

SUB

XOR

Math Return Type

Type 1 \ Type 2 Int32 (i) Boolean (b) String (s) Double (d) Int64 (l) RValue (v) None
Int32 (i) i i i d l v i
Boolean (b) i b b d l v b
String (s) i b s d l v s
Double (d) d d d d d v d
Int64 (l) l l l d l v l
RValue (v) v v v v v v v

Clone this wiki locally