Mox

From Esolang
Jump to navigation Jump to search

Mox is another cell-based esolang by User:Infinitehexagon with a short amount of instructions. Mox is made out of the letters in ther title plus a few extra instructions too. Mox is also a derivative of X strike.

Instructions

Instructions Description
m shift the memory pointer right
o shift the memory pointer left and decrement the value under the cell by one.
x input a value into the current cell modulo 256.
!a output cell a as an ASCII character modulo 256. (if argument a is blank, then the first cell / cell 0 is outputted.)
ga,b jump to line a in the program until the cell under the memory pointer is greater than b.(leave b blank to go to line a while not 0.)
i increment the current cell by 1.
~a output cell a as an decimal number modulo 256. (forgot to add this one)

Cat program

x
!

Addition program(?)

x
m
x
o
i
i
m
m
o
g4,
~0

Hello world program

i
g1,71
~0
i
g4,100
~0
i
g7,107
~0
~0
i
g11,110
~0
m
i
g15,43
~1
m
i
g19,31
~2
i
g22,86
~2
i
g25,110
~2
i
g28,113
~2
m
i
g32,107
~3
m
i
g36,99
~4
m
i
g40,32
~5

Computational class

Using X strike's turing complete proof of translating the instructions to brainfuck, we can translate Mox to brainfuck.
>:

o
i

<:

m

[]:

code...
gn,

+:

i

-:

m
o

,:

x

.:

~n