RNA
Jump to navigation
Jump to search
RNA is a totally useless esoteric programming language created in 2008 and implemented in 2011 by Cyrus H..
Syntax
There are 16 instructions(49 codons) in this language.
Also, there are three special storages, which are used to handle data. They are:
- strg - a 8-bit(1 Byte) cell that is used to manipulate memory index storage, ptr. Internally, this storage is declared as
unsigned char
. - ptr - a 32-bit(4 Bytes) memory index storage. In 64-bit platforms, this storage uses 64-bit(8 Bytes). Internally, this storage is declared as
unsigned char *
. - memory - a serial storage that contains 8-bit(1 Byte) cells. Theoretically, there is no limit to this storage. The only limit is the physical memory, RAM. Internally, this storage is declared as
unsigned char []
.
Following list contains all the instructions defined in this language.
- Methionine (Met.)
- AUG
- Program activation indicator. Codons prior to this will simply be ignored.
- [None] (Ter.)
- UAA, UAG, UGA
- Program termination indicator. Codons after this will simply be ignored.
- Tryptophan
- UGG
strg=0
- Lysine
- AAA, AAG
++strg
- Asparagine
- AAC, AAU
--strg
- Alanine
- GCA, GCC, GCG, GCU
strg=*ptr
- Threonine
- ACA, ACC, ACG, ACU
ptr=&memory[strg]
- Proline
- CCA, CCC, CCG, CCU
scanf(“%d”, ptr)
- Leucine
- CUA, CUC, CUG, CUU
printf(“%c”, *ptr)
- Arginine
- AGA, AGG, CGA, CGC, CGG, CGU
*ptr+=memory[strg]
- Serine
- AGC, AGU, UCA, UCC, UCG, UCU
*ptr*=memory[strg]
- Glutamine
- CAA, CAG
*ptr-=memory[strg]
- Histidine
- CAC, CAU
*ptr/=memory[strg]
- Glutamic acid
- GAA, GAG
*ptr=*ptr==memory[strg]?1:0
- Aspartic acid
- GAC, GAU
- Loop activation indicator. This will initiate
while(*ptr)
immediately and proceed to next codon. If the*ptr
is equal to zero(0), this will move interpreter’s execution pointer to a codon just after the paired loop termination indicator.
- Tyrosine
- UAC, UAU
- Loop termination indicator. This will move interpreter’s execution pointer back to the paired loop activation indicator.
- Cysteine
- UGC, UGU
- No-Op. Reserved for future implementation.
- Phenylalanine
- UUC, UUU
- No-Op. Reserved for future implementation.
- Isoleucine
- AUA, AUC, AUU
- No-Op. Reserved for future implementation.
- Glycine
- GGA, GGC, GGG, GGU
- No-Op. Reserved for future implementation.
- Valine
- GUA, GUC, GUG, GUU
- No-Op. Reserved for future implementation.
Implementation
- RNA Implementation in C - Written in C, conforming C99. Successfully compilable with GCC under Mac OS X.
Dialect
DNA
The DNA Programming language is basically a dialect of the RNA Programming Language. The instructions from RNA and DNA are one-to-one matching. Converting a program from RNA to DNA is very easy task; just Find & Replace each instructions. For more information, read DNA subdocument.