Online ReTI IDE & simulator

Back to the IDE & simulator

Table of Contents



This is the documentation for Online ReTI IDE & Simulator v0.1. If you find any bugs in either this documentation or the IDE or simulator you can contact me at [YOU NEED JAVASCRIPT TO SEE THIS EMAIL].

Documentation IDE


The main idea behind the IDE is to help you write code for the ReTI. It also tries to find errors and help you resolve those.


There are three components:

  1. The Toolbar: Contains a select-box where you can change the operation bit-mode of the ReTI. It also contains the run-button to start your code and errors are displayed in the toolbar.
  2. The Editor: Editor with syntax-highlighting for ReTI-Code. If the IDE can figure out where your error is, it will mark it for you.
  3. The Memory-Table: After each run the memory of the ReTI is dumped and displayed.


The Bit-configuration defines with how many bits the registers and memory-cells should work.


Activating the strict mode will help you find bugs. It won't allow you to read from cells that you haven't written to yet.

Documentation Simulator


This is a small IDE and simulator for the "ReTI"-machine used at my uni course Technische Informatik WS11/12. It supports all commands introduced so far. (see section "Commands")
The simulator is implemented like a scripting language - that means you can't access memory-cells holding an instruction/command as these aren't encoded. But apart from that the simulator should work as expected.


The Syntax for the "ReTI"-machine is quite simple: Each line contains an instruction in the following format:
<COMMAND> <ARG-1> <ARG-N> ...
An argument may either be a register-name or an integer.

Comments start with ; and end at the end of a line. You may put anything into comments as it is ignored.

Register names

Possible register names are PC, IN1, IN2, ACC


The only supported data-type is integer. To insert an integer into your code, you may provide it in binary, hex or dec:

Expression Examples
^([-+]?\d*)$ 44, -345, +34, ...
^([01]*)b$ 10101b, 111101b, 11b, ...
^0x([0-9A-F]*)$ 0xEF, 0x80000000, ...


Command Action
DW <INT i>MEM([PC]) := i
LOAD <REG reg> <INT i>reg := MEM(i)
LOADIN1 <REG reg> <INT i>reg := MEM([IN1] + i)
LOADIN2 <REG reg> <INT i>reg := MEM([IN2] + i)
LOADI <REG reg> <INT i>reg := i
STORE <INT i>MEM(i) := [ACC]
STOREIN1 <INT i>MEM([IN1] + i) := [ACC]
STOREIN2 <INT i>MEM([IN2] + i) := [ACC]
MOVE <REG src> <REG dest>dest := src
SUBI <REG reg> <INT i> reg := reg - i
ADDI <REG reg> <INT i> reg := reg + i
XORI <REG reg> <INT i> reg := reg ^ i
ORI <REG reg> <INT i> reg := reg | i
ANDI <REG reg> <INT i> reg := reg & i
SUB <REG reg> <INT i> reg := reg - MEM(i)
ADD <REG reg> <INT i> reg := reg + MEM(i)
XOR <REG reg> <INT i> reg := reg ^ MEM(i)
OR <REG reg> <INT i> reg := reg | MEM(i)
AND <REG reg> <INT i> reg := reg & MEM(i)
JUMP gt <INT i> if ([ACC] > 0): [PC] := [PC] + i else: [PC] := [PC] + 1
JUMP ge <INT i> if ([ACC] >= 0): [PC] := [PC] + i else: [PC] := [PC] + 1
JUMP eq <INT i> if ([ACC] == 0): [PC] := [PC] + i else: [PC] := [PC] + 1
JUMP ne <INT i> if ([ACC] != 0): [PC] := [PC] + i else: [PC] := [PC] + 1
JUMP le <INT i> if ([ACC] <= 0): [PC] := [PC] + i else: [PC] := [PC] + 1
JUMP lt <INT i> if ([ACC] < 0): [PC] := [PC] + i else: [PC] := [PC] + 1

If <REG reg> is not [PC], then [PC] will be increased by one after finishing the command. Exceptions are the JUMP, NOP and STORE commands.