Más contenido relacionado
Brainfush
- 2. @takano32 / TAKANO Mitsuhiro
UNIX / Linux
Ruby committer (IA-64 maintainer)
the Earth and the Internet
- 11. “+”
(*ptr)++;
*ptr = *ptr + 1;
“-”
(*ptr)--;
*ptr = *ptr - 1;
- 12. “.”
putchar(*ptr);
“,”
*ptr = getchar();
- 18. e
+++++++++[>++++++++>+++++++++++>++++
+<<<-]>.>++.+++++++..+++.>-.
------------.<++++++++.--------.++
+.------.--------.>+.
H
l o
- 19. l, m, n, o
+++++++++[>++++++++>+++++++++++>++++
+<<<-]>.>++.+++++++..+++.>-.
------------.<++++++++.--------.++
+.------.--------.>+.
l o
- 45. “>”
PTR=$(($PTR + 1))
“+”
VAL=VAL_$PTR
VAL=$(($VAL))
eval VAL_$PTR=$(($VAL + 1))
- 46. “.”
VAL=VAL_$PTR
VAL=$(($VAL))
OCH=`echo “obase=8; $VAL” |bc`
OCH=`echo “¥0OCH”`
/bin/echo -n “$OCH”
- 47. “[“
VAL=VAL_$PTR
VAL=$(($VAL))
while [ “VAL” != “0” ]; do
“]”
VAL=VAL_$PTR
VAL=$(($VAL)); end
- 49. /bin/sh bf2sh.sh < hello.bf
Brainf*ck →
/bin/sh bf2sh.sh < hello.bf | /bin/sh
Brainf*ck