From Esolang
Jump to navigation Jump to search
Paradigm(s) imperative
Designed by User:Yousurname
Appeared in 2022
Memory system Cell-based
Dimensions one-dimensional
Computational class Bounded-storage machine
Reference implementation Unimplemented
Influenced by mov
File extension(s) N/A

Movi is an esoteric programming language designed by User:Yousurname in 2022. It is a one-instruction language inspired mainly by the mov instruction.

The instruction Movi uses two operands:


in which the value at the address at address B is copied into the value at the address at address A. In C-like syntax, it performs **A = **B;. It is meant to be a simplified version of the mov instruction that only operates indirectly. Programs and data exist in the same uniform address space, i.e. the program operates on itself and is self-modifying. Programs are written as a list of numbers separated by non-numeric characters, and the program is executed in pairs of numbers. A command is skipped if B does not exist or A, B, *A, or *B is outside the program's range. The program is run in an implicit loop for control flow.

Example program

0 3 9 4 42

This program sets the first data value to 42 and then does nothing. The program starts with the first pair of numbers, 0 3 and executes **0 = **3, which is equivalent to *0 = *4, which sets the first data value to the fifth data value, which is 42. Then the progrm moves on to the next two numbers, 9 4, but skips them because 9 points to outside the bounds of the program. Then it moves on to 42 and skips it because B does not exist. Finally, it moves back to the first pair of numbers, which is now 42 3 and skips it because 42 points to outside the bounds of the program. Here it enters an infinite loop where all instructions are skipped.

Simplification from mov

The mov instruction is Turing-complete in a program that loops forever (see the mov page), but despite being only one instruction, it can take a variety of different parameters, like so (where r1 and r2 are registers and n is an immediate value):

  • mov r1, n
  • mov r1, r2
  • mov [r1], n
  • mov r1, [r2]
  • mov [r1], r2

with the option to include an offset in the brackets.

Movi aims to simplify these into one type of instruction, performing, in essence, mov [x], [y] where x is [a] and y is [b].

Computational class

Movi bears resemblance to mov (but does not support offsets) and to ByteByteJump (but does not jump), making it likely to be a Bounded-storage machine, but no proofs have been made. If you believe you have sufficient proof, please update this section.

See also