ETA
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.
ETA is an esoteric programming language designed by Mike Taylor in 1999. The name comes from its instruction set, based on the eight most common letters in the English language: E, T, A, O, I, N, S, H. "Eta" is also the seventh letter in the Greek alphabet, and ETA uses base-7 numbering. The language is stack-based and all characters that are not instructions are treated as comments. Eta has 7 instructions:
Command | What it does |
---|---|
E | Pop two numbers of the stack, first b, then a.Then push floor(b/a) first and b%a second. |
T | Pop 2 numbers off the stack, first addr , then cond . If cond!=0 then jump to the addr th instruction. The first instruction is instruction 1. Jumping to instruction 0 terminates the program.
|
A | Push the current instruction number. |
O | Print and pop top of stack as an ASCII character |
I | Push the input as an ASCII character |
N | Push a base-7 number. The digits are: H=0 T=1 A=2 O=3 I=4 N=5 S=6. E terminates the number. Example: NTONE=(1x7^2+3x7^1+5x7^0) |
S | Pop 2 numbers off the stack: first b, then a. Push b-a on the stack. |
H | Pops a number n from the stack. If n>0 then remove the n th value and push it on top of stack.If n<=0 then push the n th item onto top of stack and keep the original one intact unlike the top case. If n=0, this is effectively a DUP. |