Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Colors
Let's add colors ( but in a less verbose way...)
Color codes are from 30 to 37 and 90 to 97 + 39 for default color code.
Let's write a very simple program that asks for a color code, then prints some text and loop.
Code
>>+++++++++[->+++>++++++++++>++++++>+++++>++++++ generate special chars
++++++>+++++++>+<<<<<<<]>>+>--->+++>+>++>+<<<<<< ** part 2 **
<++++++++ do 7 times
[
->.>.>.>.>.<<.>.>>.+.+.+.+.+.----->.<<<+<<<< print ABCDEF using color 3X
]
>>>++++++>--------<<<<++++++++ change 3 into 9 and do 7 times
[
->.>.>.>.>.<<.>.>>.+.+.+.+.+.----->.<<<+<<<< print ABCDEF using color 9X
]
>>>----->--------<<<<++++++++ change 9 into 4 and do 7 times
[
->.>.>.>.>.<<.>.>>.+.+.+.+.+.----->.<<<+<<<< print ABCDEF using color 4X
]
>>>--->--------<<<<++++++++ change 4 into 1 and do 7 times
[
->.>.>.-.+>.>.<<.-.+>.>>.+.+.+.+.+.----->.<<<+<<<< print ABCDEF using color 10X
]
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content