AAAAAAAAAAAAAA!!!!

From Esolang
Jump to navigation Jump to search

AAAAAAAAAAAAAA!!!! is an esoteric programming language by User:Zzo38 which consists entirely of the letter A, spaces, commas, and exclamation points. If you type a line beginning with @, it can be a comment and can contain anything, but it must be removed from the program before the interpreter can run it. If you type a newline, it can count as a space, and multiple consecutive spaces or exclamation points can count as a single one.

Commands

  • 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
  • (Any invalid command or operators, when reached by the program pointer, causes a fatal error, and does not allow the output that the program already made to be used for any purpose except for debugging this program.)

Operators

  • AAAA = 0
  • AAA = 1
  • A = 2
  • AA A = 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, then return value
  • AAAAA A n, a = Call subroutine n with parameter a and a, then return value
  • AAAAA AA = First parameter
  • AAAAA AAA = Second parameter

Examples

Cat
AAAAA A! AAA AAAA AA A! AA AAA AAAAA, A! AAA AA A! AA AAAA AA!
output "He"
AA AAA AA AA, AAA, AAA, AA A AAA, AA A AA A AA A AAA, AA A AA A!
AA AAA AA A, AAA AAAAA A AAAA, AAA!
AA AAAA AA! AAA A AAA AAAA! AAA A AA AAAA AAA, AA A, AAA AAA, AA A AA A AA A,
AAA AAA, AA A AA A! AAAA A AAA!
Truth-machine (by User:YamTokTpaFa)
@input to   2
AAA AAAA AA A!
@label 2
AAAAA  A!
@output index  2
AA AAA  AAAAA, A!
@skip        (diff  (index 2), (mult 2, (mult 2, (mult 2, (mult 2, 3   )))))
AAA AAAA AAA AA AA, AAAAA, A   AAA,  A  AAA,  A  AAA,  A  AAA,  A  AA A!
@goto  2
AAA AA A!
@end program
AA AAAA AA!

Computational class

AAAAAAAAAAAAAA!!!! is proven to be Turing-complete, as one can simulate a cyclic tag system in this language.

See Also