Meow (Martsadas)
Jump to navigation
Jump to search
Meow is a joke esolang created by User:Martsadas that has 2 registers that can store integers
Instructions:
Instruction | What it does |
---|---|
Meow | Outputs the value in the register as an ASCII character to stdout |
Put [expression] | Sets the register to [expression] |
Get | Reads the first byte from stdin and stores it into the register |
Purr [string] | Outputs [string] to stdout |
Go [expression] [name] | Goes to label [name] if [expression] is negative |
Cat [name] | Creates a new label named [name] |
Move | Swaps the primary register and the secondary register |
Exit | Halts the program |
Notes:
- Expressions can't have spaces
- The primary register is a and the secondary register is b
- When there is no more input in stdin, Meow Will assume that the input is -1
Example programs
Cat program
Cat loop Get Meow Go a exit Go -1 loop Cat exit Exit
Hello, world!
Purr "Hello, World" Exit
Truth-machine
Get Move Put b-48 Cat loop Move Meow Move Go -a loop Exit
99 bottles of beer
Put 99 Cat loop Move Put 48+(b/10) Meow Put 48+(b%10) Meow Purr " bottles of beer on the wall, " Put 48+(b/10) Meow Put 48+(b%10) Meow Purr " bottles of beer. Take 1 down, Pass it around, " Move Put a-1 Move Put 48+(b/10) Meow Put 48+(b%10) Meow Move Purr " bottles of beer! " Go a-3 loop Purr "2 bottles of beer on the wall, 2 bottles of beer. Take 1 down, Pass it around, 1 bottle of beer on the wall, 1 bottle of beer on the wall, 1 bottle of beer. Take 1 down, Pass it around, 0 bottles of beer on the wall, " Exit
FizzBuzz
Put 0 Cat loop Put a+1 Go (a%15)-1 fizzbuzz Go (a%3)-1 fizz Go (a%5)-1 buzz Go -1 num Exit Cat fizzbuzz Purr "FizzBuzz " Go a-999 loop Exit Cat fizz Purr "Fizz " Go a-999 loop Exit Cat buzz Purr "Buzz " Go a-999 loop Exit Cat num Move Put 48+(b/100%10) Meow Put 48+(b/10%10) Meow Put 48+(b%10) Meow Move Go a-999 loop Exit
Factorial
Get Meow Purr "! = " Put a-48 Move Put 1 Move Cat loop Move Put a*b Move Put a-1 Go a-2 loop Move Put 48+(b/100000%10) Meow Put 48+(b/10000%10) Meow Put 48+(b/1000%10) Meow Put 48+(b/100%10) Meow Put 48+(b/10%10) Meow Put 48+(b%10) Meow Exit