Lime Squeezer

From Esolang
Jump to navigation Jump to search

Lime Squeezer is an esoteric programming language created by Ello, me :D

Basic Syntax

Lime Squeezer uses 8-bit op-codes, has 2 8-bit stacks(both have a 16 kilobyte limit) and is run from bottom up, also, any operands, are written below(or in this case: above) the operations, for example:

operand1
opcode

there are no existing operations that take more than 1 operand

Op-Codes

00000000 | No Operation
00000001 | Puts the value on the next line on the first stack
00000011 | Puts the value on the next line on the second stack
00000010 | Puts the last value on the first stack on the second stack
00000110 | Puts the last value on the second stack on the first stack
00000101 | Adds the last values of the two stacks, removes the two values, and puts the the result on the first stack
00000111 | Adds the last values of the two stacks, removes the two values, and puts the the result on the second stack
00001000 | Squeezes the last value of the first stack, which means removing every zero, and then adding and equivalent of zeros at the left side of the value, and then puts the result on the second stack (example: 00001000 >>> 00000001)
00001001 | Squeezes the last value of the second stack, which means removing every zero, and then adding and equivalent of zeros at the left side of the value, and then puts the result on the first stack
00001011 | Outputs the last value of the first stack as a ascii symbol and then removes it from the stack
00001010 | Outputs the last value of the second stack as an ascii symbol and then removes it from the stack
00001110 | Deletes the last value of the first stack
00001111 | Deletes the last value of the second stack
00010000 | Subtracts the last values of the two stacks, removes the two values, and puts the the result on the first stack
00010001 | Subtracts the last values of the two stacks, removes the two values, and puts the the result on the second stack
00010011 | Multiplies the last values of the two stacks, removes the two values, and puts the the result on the first stack
00010010 | Multiplies the last values of the two stacks, removes the two values, and puts the the result on the second stack

Examples:"Hello World!"

The following code should print Hello World! to the console

00001011
00001011
00001011
00001011
00001011
00001011
00001011
00001011
00001011
00001011
00001011
00001011
01001000
00000001
01100101
00000001
01101100
00000001
01101100
00000001
01101111
00000001
00100000
00000001
01010111
00000001
01101111
00000001
01110010
00000001
01101100
00000001
01100100
00000001
00100001
00000001

Implementation

There is NO original implementation for Lime Squeezer, but, you party ppl are welcome to make one! :D