ABC

From Esolang
Jump to: navigation, search

ABC is an esoteric programming language created by User:Orange. The language is very simple and easy to implement. This language has nothing to do with the real programming language ABC.

Instructions

a - Increment the accumulator
b - Decrement the accumulator
c - Output the accumulator

d - Invert accumulator
r - Set accumulator to a random number between 0 and accumulator
n - Set accumulator to 0

$ - Toggle ASCII output mode.  When on, the C instruction prints the accumulator as an ascii character.
l - Loop back to the beginning of the program.  Accumulator and ASCII mode does not reset.
; - Debug.  Prints out accumulator as a number and ascii character.

Examples

Print out 1337:

acaaccaaaac

Simulate a dice throw:

aaaaarac

Random phone number generator:

ac

naaaaaaaaradc
naaaaaaaaarc
naaaaaaaaarc

naaaaaaaaradc
naaaaaaaaarc
naaaaaaaaarc

naaaaaaaaradc
naaaaaaaaarc
naaaaaaaaarc
naaaaaaaaarc

Hello, World!

$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaa
aaaaaaaaaaaaaaaaaaaaaaacaaaaaaaccaaacbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbcbbbbbbbbbbbbcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaacaaacbbbbbbcbbbbbbbbcbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc

Count to infinity(or until out of memory. What ever comes first)

acl

Constantly Beep using ASCII code 7(bell)

aaaaaaa$cn$l

Resources

Interpreters

Discussions