ITM

From Esolang
Jump to navigation Jump to search

ITM or idiots turing machine created by alanmalan in the 7 de ago. 2022, the interpreter was made as to be a brainfuck interpreter however the idea changed with time.

github link: here or you can find the updated and rewriten version here

documentation provided in github: Idiots Turing Machine esolang by alan malan

how does it works? it is based in the esolang brainfuck, it has a 1 dimentional tape (represented by the tape array) and a pointer that points the curent cell and can change the curent cell value. and comands can work in diferent ways depending on the curent cell value cells wrap around at 255 to 0, program never stops running until the interpreter is terminated or the code specifies so.

basic comands:

Basic tape functions

< :: moves pointer to the left

> :: moves pointer to the right

+ :: adds 1 to the curent cell

- :: subtracts 1 from the curent cell

[ and ] :: conditional loops, working the same as in brainfuck { and } :: conditional loop, only executes if the value of the cell is 0

I/O

. :: outputs the value of the curent cell as a character (based on ascii)

: :: outputs the value of the curent cell as a integer

, :: waits till user input and stores it in the curent cell as a integer

Halting

x :: stops the program

& :: stops the program if the curent cell value is over 0

$ :: stops the program if the curent cell value is 0

jumping

# :: skips the next comand if the value of the curent cell is over 0

\ :: marks the current adress in the code for later / :: goes to the marked part in the code

@ :: skips the next comand if the value of the curent cell is 0

% :: jumps to the instruction coresponding the value of the curent cell

programs are limited to 90 characters of lenght (gowing to be extended soon) the interpreter is only 5 mb big

External resources