ELANG

From Esolang
Jump to: navigation, search

ELANG is an esoteric programming language by David Catt (User:David.werecat) which runs in two dimensions and has a two dimensional register matrix and a string register.

Behavior

  • ELANG is a MEL (Mapped Esoteric Language).
  • All instructions are two characters long.
  • All variables are exactly one byte.
  • The code is executed in order of the file as an x,y position.
  • There are 100 registers, 00 through 99.
  • The first number is the depth, the second number is the register.
  • Constant letters x and y specify the current location.
  • Constant letters u and v specify the execution direction (0x00 if up or left, 0xFF if down or right).

Instructions

  • # represents a hardcoded variable.
  • * represents a register with the variable in it.
  • @ represents that the register specified contains the register number of the variable.
  • & represents any of the above or a constant letter.
Instruction Description
%# Sets the current register to #.
$* Sets the current register to *.
L# Sets the level to #.
l* Sets the level to *.
C# Sets the current register to #.
c* Sets the current register to *.
P# Puts the value into the current register.
p* Puts the value into the current register.
H# Puts character into the current register.
RL Returns to the last level.
/\ Changes execution direction to up.
\/ Changes execution direction to down.
-> Changes execution direction to right.
<- Changes execution direction to left.
:# If the value in the register is equal to the value in the current register, then execution continues normally; otherwise execution direction is reversed.
;* If the value in the register is equal to the value in the current register, then execution continues normally; otherwise execution direction is reversed.
`# If the value in the register is equal to the value in the current register, then the next instruction is skipped; otherwise continue execution normally.
~* If the value in the register is equal to the value in the current register, then the next instruction is skipped; otherwise continue execution normally.
"" Specifies the start of the program.
() Specifies the end of the program.
.# Prints the letter #.
,* Prints the letter *.
=* Prints the numeric value of *.
__ Writes a linefeed.
MM Clears the console.
UK Waits for a user key and puts the value in the current register.
TT Traps the program for one second.
A# Performs AND on current register and # and puts in current register.
a* Performs AND on current register and * and puts in current register.
O# Performs OR on current register and # and puts in current register.
o* Performs OR on current register and * and puts in current register.
NN Performs NOT on current register and puts in current register.
Z# Performs XOR on current register and # and puts in current register.
z* Performs XOR on current register and # and puts in current register.
!* Zeros the specified register.
@@ Causes execution to reverse direction.
G# Adds # and current register and puts in current register.
g* Adds * and current register and puts in current register.
J# Subtracts # and current register and puts in current register.
j* Subtracts * and current register and puts in current register.
&& NOP.
[# Adds a character to the string register.
{* Adds a character to the string register.
]] Removes a character from the string register.
++ Prints the string register.
|| Clears the string register.
** Beep.

External resources