Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Run virtual machines in the Wolfram Language
Contributed by: Wolfram Research
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["Wolfram/VirtualMachine"]
To load the code after installation, evaluate this code:
Needs["Wolfram`VirtualMachine`"]
Create an instance of the "PDP-8" virtual machine:
In[1]:= |
Out[1]= |
Get information about the object:
In[2]:= |
Out[2]= |
Load a program that fills the machine's memory with the value 8^^3333:
In[3]:= |
Out[3]= |
Run the machine until it executes the halt instruction:
In[4]:= |
Out[4]= |
Obtain the state of the processor after the machine has halted:
In[5]:= |
Out[5]= |
Verify the program has filled the entire memory:
In[6]:= |
Out[6]= |
Use the Association in the second argument to create an instance of a "RegisterMachine" defined by a simple program:
In[7]:= |
Out[7]= |
Run the register machine for 10 steps:
In[8]:= |
Out[8]= |
Get the state of the machine:
In[9]:= |
Out[9]= |
Get a Dataset representing the evolution of the register machine:
In[10]:= |
Out[10]= |
Create a new instance of the "PDP-8" virtual machine:
In[11]:= |
Out[11]= |
Use the PDP-8's front panel to interact with the computer:
In[12]:= |
Out[12]= |
Create a customized instance of the "Intel4004" virtual machine by setting the number of ROM and RAM chips to use:
In[13]:= |
Out[13]= |
Use the following resource function to assemble a subroutine that computes the 4-bit AND of two numbers:
In[14]:= |
Out[14]= |
Use the debugger to load the subroutine into ROM memory and debug it:
In[15]:= |
Out[15]= |
Wolfram Language Version 12.3