Six instruction language :)

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

this is my first one btw
Six instruction languageis an language that has 6 instructions. An input stream is absent. It has 3 registers and each are stored as a number from 0 to 15 Register 3 is the output of the program.

Six instruction language :)'s instructions:
Instruction What it does
1 Set r1 to n
2 Set r2 to n
3 Set r3 to r1+R2
4 Wipe r3
5 Wipe r1 and r2
6 Invert r1 ( set r1 to 15-r)

to pass an argument to the commands 1 and 2, you proceed the command with the following encoder table:

encoding
argument input
0 a
1 b
2 c
3 q
4 w
5 e
6 d
7 f
8 g
9 r
10 t
11 y
12 h
13 i
14 j
15 u

So 1e means to set r1 to 5.

Example Programs:

1+1:

1b2b

Output:

2

because 1+1=2