Advertisement
11icecube11

Brainfuck Copy Function / Algorithm

Nov 14th, 2016
609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Making a Phrase Using a Copy Function
  2. //Phrase: Game Over
  3.  
  4. // ABCDEFGHIJKLMNOPQRSTUVWXYZ
  5. // (SPACE)GOaemrv
  6. // 32, 71, 79, 97, 101, 109, 114, 118, 0
  7.  
  8. //block Print Order: 2 4 6 5 1 3 8 5 7
  9.  
  10.  
  11. [>+>+<<-]>>[<<+>>-]<+< // Copy Block A into block B Using C as a work space and Then Sets Pointer at Block A
  12.                          (The Plus during the movement must be included else B = A Minus 1)
  13.  
  14. >[-]<                                          // Resetting Block B
  15.  
  16. >++++++++[<++++>-]<[>+>+<<-]>>[<<+>>-]        //Puts Space into Block 1&2 - Ends at block 3
  17. +++++[<++++++++++>-]<-[>+>+<<-]>>[<<+>>-]<    //Puts G into Block 2&3 - Ends at Block 3
  18. +++++++++[>+>+<<-]>>[<<+>>-]                  //Puts O into Block 3&4 - Ends at Block 5
  19. ++++[<++++++>-]<[>+>+<<-]>>[<<+>>-]<          //Puts a into Block 4&5 - Ends at block 5
  20. +++++[>+>+<<-]>>[<<+>>-]<                     //Puts e into Block 5&6 - Ends at Block 6
  21. +++++++++[>+>+<<-]>>[<<+>>-]<                 //Puts m into Block 6&7 - Ends at Block 7
  22. ++++++[>+>+<<-]>>[<<+>>-]<+                   //Puts r into block 7&8 - Ends at Block 8
  23. ++++                                          //Puts v into block 8   - Ends at block 8
  24.  
  25.  
  26. <<<<<<.>>.>>.<.<<<<.>>.>>>>>.<<<.>>.
  27.  
  28. Output: Game Over
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement