Cool Cell

From Esolang
Jump to navigation Jump to search

Cool Cell(CoCe) is cell-based language by User:ChuckEsoteric08. It was created because author wanted to create version of Turing-machine which compiles to Quests, but later it become BF with limited memory which can implement BF easily


Number of cells in implementation should be any number between 29999 and 30001(meaning there should be always only 30000 cells). Every cell is 8-bit and it will set to 0 if after incrementing value will be more than 255 and to 255 if number will be less than zero. Commands always seperated with ;. [X] and [Y] should be any number. In the start of the program you need to input number which will be used in p[X] command. Comment start with # and it needs to be after a[X] command. Counting of cell starts from 1( first cell number is 1, second cell numember is 2 and so on).

Command Meaning
s[X] point to cell [X]
r[X] Dereference cell [X] and point to N-th cell, where N is value of that cell
i[X] increment pointed cell [X] times
d[X] same as previous command, but decrement
p[X] put every digit in inputed number in tape starting from cell [X]
a[X] declare label [X]
g[X] goto label [X]
z[X] if pointed cell is zero goto label [X]
o[X] same as previous command, but if not zero
f[X]t[Y] if pointed cell is [X](It can be any digit from 0 to 9), then goto [Y]
t[X] output number [X]
h[X] print [X] and halt


Hello World

tHello, World!;

Truth Machine


If first digit in input is not 1 or 0 then it is 1


It will print "Error!" if first digit in input is not 1 or 0

Cell overflow


Set cell to zero


Set cell to 255

External resources

Computational class

It is Bounded-storage machine, because it has limited memory