Skip to content

Instantly share code, notes, and snippets.

@ulexec
ulexec / VM.c
Created February 23, 2017 20:22 — forked from SouhailHammou/VM.c
Virtual machine with a custom instruction set.
/*
VM by Souhail Hammou : custom instruction set
data space and stack space are customizable.
Important : In calculations the VM is using unsigned values.
*/
#include <stdio.h>
#include <stdint.h>
#include <conio.h>
#define TRUE 1
#define FALSE 0
@ulexec
ulexec / stack-vm.js
Created March 4, 2017 04:32 — forked from DmitrySoshnikov/stack-vm.js
Educational Stack-based Virtual Machine
/**
* Educational Stack-based VM.
*
* See also:
* - More complex example with recursion: https://gist.github.com/DmitrySoshnikov/afda459222e96e6002ac
* - Register-based VM example: https://gist.github.com/DmitrySoshnikov/6407781
*
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
* http://dmitrysoshnikov.com
* MIT Stye License (C) 2015