Last active
December 20, 2024 19:13
-
-
Save anilsathyan7/e06373fc1d1293fcaf2ef7765d415e62 to your computer and use it in GitHub Desktop.
Brain fuck hello-world program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++++ +++++ initialize counter (cell #0) to 10 | |
[ set the next four cells to 70 100 30 and 10 respectively | |
> +++++ ++ add 7 to cell #1 | |
> +++++ +++++ add 10 to cell #2 | |
> +++ add 3 to cell #3 | |
> + add 1 to cell #4 | |
<<<< - decrement counter (cell #0) | |
] | |
> ++ . print 'H' (H = ASC (72)) | |
> + . print 'e' (e = ASC (101)) | |
+++++ ++ . print 'l' | |
. print 'l' | |
+++ . print 'o' | |
> ++ . print ' ' | |
<< +++++ +++++ +++++ . print 'W' | |
> . print 'o' | |
+++ . print 'r' | |
----- - . print 'l' | |
----- --- . print 'd' | |
> + . print '!' | |
> . print '\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment