

Stores PC in LR, equivalent of a function call. Instead of label, memory location can be also passed.īranch if equal, the result of cmp instruction is used.īranch and link. Set PC to the instruction to which the given label is pointing to. The value is used later for conditional branching.Īlways branch. Move some value (either other register or a constant) to the register.Ĭompare 2 numerical values and store the difference in comparison register (comp_reg = r0 - r1). Holds the address of the instruction in memory which will be executed next.įor function calls, the result is stored in R0, and R1-R3 are normally used to pass the parameters. Holds a return address of the function call. Points to the last element pushed to the stack (or 0xFFFFFF if nothing has been pushed yet). Most of the are general purpose, with a few special ones: You can run the tests simply by running nosetests from the project root directory.
#Unibox beta install#
Just clone this repository and install the dependencies ( pip install -r requirements.txt). Register bank after executing the instruction: Passing debug as the second argument will enable the debugging mode, in which the values of the register bank will be dumped after executing every instruction: $ python run.py demos/function_call.s debug │ Instruction │ Count │ Instruction │ Count │
#Unibox beta code#
Installing and running Executing code $ cat demos/function_call.s

Why Python? Development speed, as opposed to performance, is the key priority for this project so Pythonįits in perfectly. Yet, it's powerful enough to do things like recursion (see the Fibonacci example ). I will keep it simple (so probably no operation modes, interrupt handling, etc) because I built it for educational The purpose of this project is to implement a simple virtual machine, capable of executing assembly code similar to ARM. tar.gz xs-vm eXtremely Simple Virtual Machine No overhangs, the base can be printed without problems with nozzles up to 0.8mm, using PLA.Xs-vm by GedRap xs-vm eXtremely small virtual machine written in Python View on GitHub Download. It is very simple, it is printed in two parts: box and cover. This is a real design, which can be printed without any problems on any 3D printer. It is a very useful project because we are always looking for that ideal box to put our project, which also looks pretty, spacious, and also easy to work with. It can be printed in PLA (recommended), TPU, or ABS.īeing made of PLA or ABS, the box can be completely machined after printing and adapted to the different needs of our project. The base has a 4 mm reinforcement where different elements can be fixed such as: screwed plates, parts, batteries.

The box can be drilled and the cover has four holes to fix it to the base. The walls are 3 mm thick and so is the cover. The internal dimensions are: 60x56x46 mm. It is designed to hold printed circuit boards and accessories such as batteries. It has a beautiful appearance and takes advantage of the interior geometry to offer as much space as possible.

This is a very practical box to make projects.
