Jump to content

User:ScallopMonger/AAAAAAAAAAAAAA!!!!

From Wikipedia, the free encyclopedia

AAAAAAAAAAAAAA!!!! is an esoteric programming language expressed entirely by the letter A, spaces, commas, and exclamation points. Because of the limited set of characters used, it can be difficult to find the beginning and end of expressions. AAAAAAAAAAAAAA!!!! was first developed in 2006.

Syntax

[edit]

Commands

[edit]
AA AAA n! Outputs number as a character
AAA AAAA AA n! Input a character store to index n
AAA AA n! Go to label n
AAAAA n! Define a label n
AAA AAAA AAA n! Skip n commands
AAAA AA n! Shift indexes n backwards
AAAA AAAA n! Shift indexes n forwards
AA AAAA AA! End program
AAA A AAA n! Begin define subroutine named n
AAAA A AAA! End define subroutine
AAA A AA AAAA n! End subroutine, return value n
AAAAAA n! Call subroutine n
AAAA, AAAA n! Forget n entries from subroutine stack
AAAA AAA n! Increment value at index n
AAAA AAA, n! Decrement value at index n unless value is zero
AAAA, A n! Set command change register to n
AAAA, AA A n! Change all commands in program that start with what is in command change register to start with n instead
AAAA, AA AAA n! Change all commands in program that end with what is in command change register to end with n instead
AAAAA, AA A n! Change all commands in program that start with n to start with what is in command change register instead
AAAAA, AA AAA n! Change all commands in program that end with n to end with what is in command change register instead
AAAAA, AAAAA! Clear command change register
AAAAA, AAAA A n! Add block of n number of A's at end of command change register
AAAAA, AAAA AAA n! Add block of n number of A's and comma at end of command change register


Operators

[edit]
AAAA number 0
AAA number 1
A number 2
AA A number 3
AAAA A last index number read by a previous command
AAAAA, n value at index n
AA A, a b a + b
AA AA a b = abs(a - b)
AAA a b = a * b
AA AAA a b = a AND b
AAAA a b = a XOR b
AAAAAA n a b Call subroutine n with parameter a and b, and return value
AAAAA A n, a Call subroutine n with parameter a and a, and return value
AAAAA AA First parameter
AAAAA AAA Second parameter

Sample Code

[edit]

Copy input to output, forever:

AAAAA A! AAA AAAA AA A! AA AAA AAAAA, A! AAA AA A! AA AAAA AA!

See also

[edit]
[edit]