URM Simulator
(This webpage does not work properly in Firefox)

EXPLANATIONS

INPUT

OUTPUT

This is an Unlimited Register Machine (URM) simulator (emulator) -- a "virtual URM". It is modeled after the URM specification in Nigel J. Cutland's book, Computability, An introduction to recursive function theory, by Cambridge Press. (This simulator is implemented in JavaScript.)

To see a demo, click on the Example button (at the top of the INPUT column), then click Run to see its output.

Allowed instructions:
J, S, T, Z (lower case works too):

  • J(m,n,i): Jump. If register m equals register n, jump to the ith instruction. Program stops if i = 0 or there is no ith instruction. 

  • S(n): Successor. Increment register n by 1.
  • T(m,n): Transfer. Copy from register m to register n.
  • Z(n): Zero. Put 0 in register n.

Program format:

  • Each instruction must be preceded by a colon (:). Optional: the colon may be preceded by the instruction number; this is for the user's convenience only, and is ignored by the simulator.
  • Spaces are ignored by the simulator; they may be used freely anywhere.
  • Comments may be written anywhere before or after each instruction. No special symbol is needed to indicate comments. Colons should never be used in comments.

Initial register values:

  • Must be non-negative integers, separated by commas (,). Spaces are ignored.
  • If left blank, all registers are set to zero.
  • Example: 5,0,1 means:
    R1=5, R2=0, R3=1. Remaining registers = 0.

Stop after n instructions (optional):

  • Stops program if it does not stop automatically during the first n instructions.
  • If  left blank, keeps running until program ends or is stopped by the user.

Run vs. Continue:

  • Run: sets registers to values indicated in "Initial register values" (or to zero, if blank).
  • Continue: program resumes running from where it stopped in the last unfinished run.
URM program:           

Initial register values:

Show register values after each instruction:
Yes (slower)        No (faster)

Stop after instructions (optional).

           

 

Home


hello

 

 

 

 

Copyright 2004-present,  Ramin Naimi. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.