Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openvm

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openvm

Open source, secure and fast virtual machine to run Oxygen Byte Codes.

  • 1.6.3
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

OpenVM

OpenVM is a simple virtual machine designed for educational purposes. It includes a set of commands and compilers to execute Oxygen Byte Code (OBC) and provides different types of memory, such as long-term memory and short-term memory.

Please read commands

Table of Contents

Features

  • Oxygen Byte Code (OBC): Execute programs written in OBC using the OpenVM virtual machine.
  • Long Memory: Simulate non-resettable accessible memory with the LongMemory class.
  • Short-Term Memory (SHM): Simulate short-term memory with the SHM class.
  • Compiler: Translate between OBC and ORC (Oxygen Readable Code) using the provided compiler.
  • Reader: Interpret and execute OBC commands using the Reader class.

Installation

bun i openvm
# or
npm i openvm
# or
yarn add openvm
# or
pnpm i openvm

Usage

import { VM } from '../src/openvm.js'
import fs from 'fs'

const vm = new VM()
const file = fs.readFileSync('./test/your-file.o', {
  encoding: 'utf8',
})
vm.run(file)

Just import your Oxygen Readable Code file and create a new VM instance. Now you are ready to run your code.

your-file.o

; Now you are can use comments!
jmp 0x0                 ; Set cursor to 0x0
set hello%20world       ; Set 0x0 to hello world (%20 equals to space)
jmp 0x1                 ; Set cursor to 0x1
set put%200x0           ; Setting 0x1 to command put 0x0 (%20 equals to space)
run 0x1                 ; Run 0x1
exit 0                  ; Exit the program without errors

License

MIT

Keywords

FAQs

Package last updated on 19 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc