VM18 Instructions

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 4

DownloadVM18-instructions
Open PDF In BrowserView PDF
VM-18 Instruction Set

Format โ€œINSTRUCTION [๐š๐ซ๐  ๐Ÿ ] [๐š๐ซ๐  ๐Ÿ ] โ€ฆ [๐š๐ซ๐  ๐’ ]โ€
where [arg ๐‘– ] is pushed onto the stack before [arg ๐‘–+1] and [arg ๐‘– ]
represents a single byte.

opcode: 0x01
PUSH_BYTE [byte]
Pushes next byte found in the instruction stream onto the stack

opcode: 0x02
HALT
Stops execution of instruction stream

opcode: 0x03
ADD_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes the result of Number1 + Number2 onto stack

opcode: 0x04
SUB_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes the result of Number1 - Number2 onto stack

opcode: 0x05
MUL_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes the result of Number1 โˆ™ Number2 onto stack

opcode: 0x06
DIV_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes the result of Number1 รท Number2 onto stack

opcode: 0x07
MOD_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes the result of Number1 modulo Number2 onto stack

opcode: 0x08
LOAD_BYTE [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐Ÿ ] [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐Ÿ ] โ€ฆ [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐’ ]
Fetches byte stored at address, ADDRESS1 being MSB, and pushes onto
stack. Address size is determined by the VM implementation.

opcode: 0x09
STORE_BYTE [BYTE] [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐Ÿ ] [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐Ÿ ] โ€ฆ [๐€๐ƒ๐ƒ๐‘๐„๐’๐’๐’ ]
Stores byte at address, ADDRESS1 being MSB. Address size is determined
by the VM implementation.

opcode: 0x0A
SEND_INTERFACE [I] [๐€ ๐Ÿ ] [๐€ ๐Ÿ ] โ€ฆ [๐€ ๐’ ] [๐๐Ÿ ] [๐๐Ÿ ] โ€ฆ [๐๐’ ]
Sends N bytes starting at address A to interface number I. A1 and N1
are the MSBs, and ๐‘› is the number of bytes in the implementationโ€™s
memory address.

opcode: 0x0B

RECV_INTERFACE [I] [๐€ ๐Ÿ ] [๐€ ๐Ÿ ] โ€ฆ [๐€ ๐’ ] [๐๐Ÿ ] [๐๐Ÿ ] โ€ฆ [๐๐’ ]
Receives N bytes to address A from interface number I. A1 and N1 are
the MSBs, and ๐‘› is the number of bytes in the implementationโ€™s memory
address.

opcode: 0x0C
AND_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes result of performing the bitwise AND on Number1 and Number2 .

opcode: 0x0D
OR_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes result of performing the bitwise OR on Number1 and Number2 .

opcode: 0x0E
NOT_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ]
Pushes result of performing the bitwise NOT on Number.

opcode: 0x0F
XOR_BYTE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ]
Pushes result of performing the bitwise XOR on Number1 and Number2 .

opcode: 0x10
JUMPG [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
If Number1 > Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x11
JUMPE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]

If Number1 == Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x12
JUMPL [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
If Number1 < Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x13
JUMPNE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
If Number1 != Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x14
JUMPLE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
If Number1 <= Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x15
JUMPGE [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐๐ฎ๐ฆ๐›๐ž๐ซ๐Ÿ ] [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
If Number1 >= Number2 , move instruction pointer to instruction address
specified by I๐‘– where ๐‘› is the implementationโ€™s address size.

opcode: 0x16
JUMP [๐ˆ๐Ÿ ] [๐ˆ๐Ÿ ] โ€ฆ [๐ˆ๐’ ]
Move instruction pointer to instruction address specified by I๐‘– where ๐‘›
is the implementationโ€™s address size.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.7
Linearized                      : No
Page Count                      : 4
Language                        : en-US
Tagged PDF                      : Yes
XMP Toolkit                     : 3.1-701
Producer                        : Microsoftยฎ Word 2016
Creator                         : PooPooPeePee
Creator Tool                    : Microsoftยฎ Word 2016
Create Date                     : 2018:06:08 15:07:52-04:00
Modify Date                     : 2018:06:08 15:07:52-04:00
Document ID                     : uuid:A7EC05B5-41AE-47E2-97B2-99B25366E39C
Instance ID                     : uuid:A7EC05B5-41AE-47E2-97B2-99B25366E39C
Author                          : PooPooPeePee
EXIF Metadata provided by EXIF.tools

Navigation menu