EA Script, It's in the code.

From Esolang
Jump to navigation Jump to search

This page is about the EA Script, It's in the code. programming language, where you have to pay for absolutely everything.

Instructions

It operates on an unbounded tape of 8-bit cells, but you have to pay $9.99 for every cell after the first three. For EOF to not throw an error and return zero instead, you have to pay $999.99. The stack costs $999.99 before you can buy the stack operations. You will have to buy individual instructions (for example, three .'s cost three times as much as one ., not the same).

Instruction Price What it does
< Free Moves the pointer one cell to the left.
> Free Moves the pointer one cell to the right.
+ Free Adds 1 to the pointed cell.
- Free Subtracts 1 to the pointed cell.
. $9.99 Prints the pointed cell as a character.
, $9.99 Reads a character from input and stores it into the current cell.
[ $19.99 While the pointed cell is nonzero.
] $19.99 End while.
{ $29.99 Pushes the pointed cell's value to the stack.
} $29.99 Pops from the stack into the current cell.
* $39.99 Doubles the pointed cell's value.
` $49.99 Halves the pointed cell's value.
~ $59.99 Bitwise NOTs the pointed cell's value.
^ $69.99 Squares the pointed cell's value.
@ $79.99 Break out of loop.
! $89.99 Loop continue.
? $99.99 Set the pointed cell to a random 8-bit value.
#00 - #FF $199.99 Sets the pointed cell to a byte, written in hexadecimal.
' $299.99 Sets the pointed cell to the value of the next character.
" $399.99 String mode. Set the pointed cell to the value of each character, then move right. Each quoted character costs $999.99.
_ $499.99 Unary minus. Set pointed cell to (256-last pointed cell value)%256.
:foo: $599.99 Define a function. Its name is between the colons.
$ $599.99 End function definition.
;foo; $699.99 Run a function. Its name is between the semicolons.
/ $799.99 Loop modifier. Checks if pointed cell is positive (as a signed value) instead of nonzero.
\ $899.99 Loop modifier. Checks if pointed cell is negative (as a signed value) instead of nonzero.
q $999.99 Print the program's source code.

Augmented instructions

You can also pay $9999.99 for each of these augmented instructions. You can use S in place of the hexadecimal number to pop from the stack and use that value instead, but this costs $99999.99.

Instruction What it does
+00 - +FF Add a value to the pointed cell.
-00 - -FF Subtract a value from the pointed cell.
*00 - *FF Multiply.
`01 - `FF Divide.
^00 - ^FF Exponentiate.
%01 - %FF Modulo.
&00 - &FF Bitwise AND.
|00 - |FF Bitwise OR.
X00 - XFF Bitwise XOR.
O Print the pointed cell's value as two hexadecimal digits.
I Input two hexadecimal digits into the pointed cell's value.

Super-Augmented Instructions

These instructions cost $999999.99 each. They change the O and I instructions.

Instruction What it does
d Change I/O to decimal.
b Change I/O to binary.
o Change I/O to octal.
h Change I/O to hexadecimal back again.
s Change I/O to base 64.

The Very, Extremely, Devastatingly, Whoppingly, Unsurprisingly, Obviously, Absolutely OP Instruction

This instruction costs $9999999999999999999999999999999999999999999999999999999999999999999999999.99, because of how OP it is.

Instruction What it does Notes
P Run the rest of the program as Python 3. Just use Python 3 instead, lol.

Example

Hello, World!

   Pprint("Hello, World!")

(costs $9999999999999999999999999999999999999999999999999999999999999999999999999.99)

   >"!dlroW ,olleH"<[.<]

(costs $13969.70)

Computational class

This programming language is Turing-complete only if you are willing to pay the money, otherwise it is total, explaining the "No set computational class" category.

More notes

This programming language is usable only if you are willing to pay the money, explaining the "Usability not set" category.