We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

RegLike

From Esolang
Jump to navigation Jump to search

Reglike Reglike is a programming language with 5 commands made by HadiMakesCodes (talk) and inspired by Subleq, Addleq, Muxleq and Marvin Minsky's Machine

reglike
Reglike
Commands
Command Purpose
(reg) (line) If not zero ,decrease (reg) val by 1, else jump to (line)
(reg) Increase (reg) value by 1
(reg)=(val) Defines The register id to a value
a(reg0)...(regn) Outputs the corresponding ascii decval of a (reg)
(reg)=i Defines the register id to the user input (Numerical)

Syntax

Basically how it works is that if you see 2 numbers for example

0 4 

It means that IF register 0 is equal to 0 then jump to line 4 else decrease register 0 by 1 and goto the next line
If you see only 1 number for example

0

It means it just increases register 0 by 1
If you jump to a empty line it halts the whole program Um the syntax isnt like that important
And im going to use ; as a comment but dont use comments in the interpreter please

Examples

Adding 2 Numbers

0=i
1=i
2=0
0 7
1
2 3

Try it out for example 2+5=1+6=0+7, Final answer is 0 7 0

Hello World Program

0=72
1=101
2=108
3=108
4=111
5=44
6=32
7=87
8=111
9=114
10=108
11=100
12=33
a0 1 2 3 4 5 6 7 8 9 10 11 12

Using ascii values it prints "Hello, World!"

Repeating

0=10
1=0 ;This is a zeroer
0 5
1 3 ;If reg1 is 0 goto line 3 

Repeats n Times

Truth Machine

0=i
1=49 ;Ascii 1
2=48 ;Ascii 0
3=0
4=99
0 11
0 8
4 12
a1
3 8
a2

If you type in 1 it prints 1, 99 times if you type in 0 it prints a singular 0

If Statements

0=i
1=65
2=66
3=0
0 9
0 7
a1
3 10
a2

Interpreter

Note:You can only use it with file type .rglk Download
Python and Css downloads