Implementing a Virtual Machine in C
Reading time: less than 1 minute
Hello everyone! In this post, we will be doing the Synacor Challenge. In this challenge, which you can find here, we are only given a tar file. Inside this archive is two files:
- arch-spec, which is the spesification of this imaginary machine
- challenge.bin, which is an executable designed to be run on the VM
The arch-spec file describes everything in detail, but let me summarize the machine in a few points. The virtual machine;
- Is little endian
- Has a memory made up of 16-bit unsigned integers
- Has a stack of 16-bit unsigned integers
- Has 8 registers which are also 16-bit unsigned integers
If you find this work useful, please cite it as:
title = "Implementing a Virtual Machine in C",
author = "Yaltirakli, Gokberk",
journal = "gkbrk.com",
year = "2022",
url = "https://www.gkbrk.com/wiki/synacorvm/"
Not using BibTeX? Click here for more citation styles.
Gokberk Yaltirakli, "Implementing a Virtual Machine in C", January, 2022. [Online]. Available: https://www.gkbrk.com/wiki/synacorvm/. [Accessed Jan. 13, 2022].
Yaltirakli, G. (2022, January 13). Implementing a Virtual Machine in C. https://www.gkbrk.com/wiki/synacorvm/
Gokberk Yaltirakli, Implementing a Virtual Machine in C, GKBRK.COM (Jan. 13, 2022), https://www.gkbrk.com/wiki/synacorvm/