Instruction

Mnemonic

Opcode

Parameter length

Push

push

0x01

Varies from 1 to 8

Push byte

push byte <value>

0x01

1

Push word

push word <value>

0x01

2

Push dword

push dword <value>

0x01

4

Push qword

push qword <value>

0x01

8

Push pointer

push ptr <symbol>

0x01

4

Push float

push float <value>

0x01

4

Pop

pop

0x02

Varies from 1 to 8

Set stack segment

sss

0x03

0

Load stack segment

lss

0x04

0

Set stack pointer

ssp

0x05

0

Load stack pointer

lsp

0x06

0

Load byte

bload

0x07

1

Load word

wload

0x07

2

Load dword

dload

0x07

4

Load qword

qload

0x07

8

Store byte

bstore

0x08

1

Store word

wstore

0x08

2

Store dword

dstore

0x08

4

Store qword

qstore

0x08

8

Branch if equal

beq <label>

0x09

4

Branch if not equal

bne <label>

0x0A

4

Branch if greater than

bgt <label>

0x0B

4

Branch if less than

blt <label>

0x0C

4

Branch if zero

bz <label>

0x0D

4

Branch if not zero

bnz <label>

0xF0

4

Branch

bra <label>

0x0F

4

Branch subroutine

bsr <label>

0x10

4

Add float

add_f

0x11

0

Add

add

0x12

0

Subtract float

sub_f

0x13

0

Subtract

sub

0x14

0

Multiply float

mul_f

0x15

0

Multiply unsigned

mul

0x16

0

Multiply signed

mul_s

0x31

0

Divide float

div_f

0x17

0

Divide unsigned

div

0x18

0

Divide signed

div_s

0x30

0

Cosine

cos

0x19

0

Sine

sin

0x20

0

Tangent

tan

0x21

0

Inverse cosine

icos

0x22

0

Inverse sine

isin

0x23

0

Inverse tangent

itan

0x24

0

Square root

sqrt

0x25

0

Bitwise And

and

0x32

0

Bitwise Or

bor

0x33

0

Bitwise Xor

xor

0x34

0

Left bit shift unsigned

shl

0x35

0

Left bit shift signed

shl_s

0x36

0

Right bit shift unsigned

shr

0x37

0

Right bit shift signed

shr_s

0x38

0

Test if equal

teq

0x39

0

Test if not equal

tne

0x40

0

Test if greater than

tgt

0x44

0

Test if greater than (signed)

tgt_s

0x45

0

Test if less than

tlt

0x46

0

Test if less than

(signed)

tlt_s

0x47

0

Test if greater than (float)

tgt_f

0x48

0

Test if less than

(float)

tlt_f

0x49

0

Call internal interrupt

sysf <interrupt>

0x27

4

Return

ret

0x28

0

Heap allocate

heap_alloc

0x29

0

Begin Fault region

begin_fault <fault_handler>

0x50

4

End fault

end_fault

0x51

4

Throw

throw

0x52

4

Convert unsigned to signed

convu_s

0x53

0

Convert signed to unsigned

convs_u

0x54

0

Convert byte to dword

convb_d

0x54

0

Convert word to dword

convw_d

0x55

0

Convert qword to dword

convq_d

0x56

0

Convert float to dword

convf_d

0x57

0

Convert dword to float

convd_f

0x58

0

Duplicate top of stack

dup

0x59

Varies from 0-8

Load byte  from array

ldelem_b

0x5A

0

Load word from array

ldelem_w

0x5B

0

Load dword from array

ldelem_d

0x5C

0

Load qword from array

ldelem_q

0x5D

0

Last edited May 1, 2013 at 2:53 AM by GruntXProductions, version 1

Comments

No comments yet.