Alphacode

From Esolang
Jump to navigation Jump to search

Alphacode is an esolang made by User:Esolangist. It is based on the alphabet.

Commands

a [object] -- pushes [object] on the stack

b [label] -- a label. can be used for comments or as a forever loop

c [label] -- jumps to b [label]

d -- pops the top object off the stack and outputs it as a number

e -- pops the top object off the stack and outputs it

f [number] -- basically just "if" in javascript. if the number is 0, skip to g. otherwise, continue code, then when you get to g, skip past it.

g -- a special label. can be used like f as elseif

h [number] -- if the number is 0, output 1. if it is anything else, output 0.

i -- nop

j -- takes an input and pushes it onto the stack.

k -- like f but uses the top item of the stack

l -- concatenates the top two items of the stack

m -- outputs the whole code. (yes, this is a quine command)

n -- ends a label

o -- to be added

Examples

Cat program

je

Quine

m

Hello world

a Hello, world! e

Truth machine

please note that it prints 1s on any other input than 0, not just 1

jkc 1 gd b 1 a 1 d c 1