AAAAAAAAAAAAAA!!!!

From Esolang
Jump to: navigation, 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 contains anything, but it must be removed from the program before the interpreter can use 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 program pointer, causes 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 = 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

Example (copy input to output, forever):

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

Example (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!

See Also[edit]

  • AAAAAAAAA! (This is something similar although unrelated)

(Note: I think this esolang has been mentioned in a Japanese book.)