Her

From Esolang
Jump to navigation Jump to search
Her
Designed by Orisphera
Appeared in 2022
Computational class Unknown
Reference implementation Unimplemented
File extension(s) {{{files}}}
Note that the Russian for Her is Её. Ее is not a valid name for the language.

Her, or YeYo, is an esoteric programming language for steganography created by User:Orisphera.

Input format

The program is a text written in Russian. The characters in the program that are important to the language (hereafter basic characters) are the letter Е (Ye) where Ё (Yo) would look innocent (hereafter 0) and Ё where Е would look innocent (hereafter 1). Other characters are only used to determine whether the other letter would look innocent and therefore whether to count it. The case of the letter, depending on the implementation of this part, is either ignored completely or used for the same, but either way, both uppercase and lowercase Е and Ё should count as long as the other letter of the same case would look innocent.

Commands

IMP

There are different types of commands in Her, and they all have different Instruction Modification Parameters (IMP). You have to do IMP first, then command. The parameters end with a linefeed.

IMP Command
00 Literals
011 I/O
100 Stack Manipulation
11 Arithmetic
010 Flow control
101 Heap access

Literals

In Her, you can only input numbers from 1 to 255 directly. To do so, first, write 00 to switch to literal mode. In literal mode, each command is 8 basic characters. It pushes the corresponding value (little-endian) to the stack. 00000000 exits the literal mode.

I/O

Command Meaning
10 Read a character and put it on the stack
11 Read a number and put it on the stack (numbers inputted this way don't have to be in the range that literals have)
00 Pop a character and output it
01 Pop a number and output it

Basically, all you need to remember is first, 1 for input, 0 for output, and second, 0 for a character, 1 for a number.

Stack Manipulation

Commands Meaning
10 Duplicate the top item on the stack
11 Swap the top two items on the stack
00 Discard the top item on the stack
010 Pop n. Then, copy the nth item on the stack onto the top of the stack
011 Pop n. Then, slide n items off the stack, keeping the top item

Arithmetic

Command Meaning
00 Addition
01 Subtraction
10 Multiplication
110 Integer Division
111 Modulo

Flow control

Commands Meaning
00<label> Mark a location in the program
011<label> Call a subroutine
010<label> Jump unconditionally to a label
100<label> Jump to a label if the top of the stack is zero
101<label> Jump to a label if the top of the stack is negative
110 End a subroutine and transfer control back to the caller
111 Ends the program

Heap Access

Heap access commands look at the stack to find the address of the items to be stored or retrieved. To store an item, push the address, then the value, and run the store command. To retrieve an item, push the address and run the retrieve command, which will place the value stored in the location at the top of the stack.

Command Meaning
0 Store
1 Retrieve