Moditape

From Esolang
Jump to navigation Jump to search

An esolang where you can modify the inital state of the circular, 16 value tape before the program is run. Contains brainfuck-like syntax, minus the loops. Because there are no I/O functions, you can watch the tape update as the program runs. Modifying the tape before the program runs can act as input.

Instructions

The instructions are as follows:

Command Description
[ Shift pointer left
] Shift pointer right
| Increment cell under pointer
_ Decrement cell under pointer
: Reverse the tape
# Exit the program
& Set the pointer to the cell value
? If cell is 0, skip next instruction

Hello World

H]e]l]l]o],] ]W]o]r]l]d]!

Truth machine

_?#|]|]|]|]|]|]|]|]|]|]|]|]|]|]|]|] (To use, set the first cell to 1 or 0 before starting the program.)

99 Bottles Of Beer

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
]b]o]t]t]l]e]s] ]o]f] b]e]e]r]!]
[[[[[[[[[[[[[[[[
___________________________________________________________________________________________________

Reference Interpreter (Written in C, yes the code is bad)

https://paste.snwy.me/lghajYnP

To use the interpreter, pass in your file as so:

 moditape file.mt

Once you are in, you will see the tape. Use the left and right arrow keys to move the pointer, and up and down to increment/decrement. The pointer will stay at the position you leave it when you run the program. To run the program, press Enter.