A0A0

A0A0 is a queue-based, self-modifying programming language created by User:Snowyowl in 2013.

It is named after a commonly used pair of commands. When the name is read aloud, it should ideally be sung in a major third.

Language overview
Each line of code in the source of an A0A0 program represents a queue of commands. Commands consist of a single letter and a signed integer, which is the argument for that command and also the only datatype. To interpret a command, the interpreter works in the following order:
 * 1) Pop one command from the current line.
 * 2) Execute that command.
 * 3) If the command was not a   (goto) command, go to the next line.

(Note: this might be obvious, but given that several commands can alter the content of the current line, it's important to be specific.)

Any unrecognised commands have no effect (it should be assumed that they are reserved for future use even when they aren't). Spaces and tabs are ignored, but newlines are not.

For any signed integer n, the commands that take n as an argument are:

The initial program code is padded in both directions by an infinite number of empty lines. Whenever the program encounters an empty line, it immediately terminates. (Hence the practicality of "padding lines", that do nothing useful but also do not cause the program to terminate.)

Execution starts at the first line by default; however, if any line starts with a  symbol, execution starts at that line instead. (This allows debuggers to output the program state formatted as A0A0 source code.)

"Hello, world!"
P72 P101 P108 P108 P111 P44 P32 P119 P111 P114 P108 P100 P33

cat
A0 A0 A0 C3 G1 G1 A0 A0 I1 V0 P0 A0 A0 A1 G-3 G-3 A0 G-3 This program shows one way of creating a loop in A0A0. Only the third line deals with input and output; the rest of the program serves to form a loop.

Implementations
Ruby interpreter by Andkerosine.