sdfasdf
This commit is contained in:
12
adder.bf
Normal file
12
adder.bf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
, ; read to p1
|
||||||
|
> ; move to p2
|
||||||
|
, ; read to p2
|
||||||
|
[ ; enter loop
|
||||||
|
< ; move to p1
|
||||||
|
+ ; increment p1
|
||||||
|
> ; move to p2
|
||||||
|
- ; decrement p2
|
||||||
|
] ; exit when last cell is empty
|
||||||
|
< ; go back to p1
|
||||||
|
------------------------------------------------ ; subtract 48
|
||||||
|
. ; print p1
|
||||||
2
bfckr.c
2
bfckr.c
@@ -58,7 +58,7 @@ char *colortheme[] = {
|
|||||||
// Colorize instructions
|
// Colorize instructions
|
||||||
char *colorize(char c)
|
char *colorize(char c)
|
||||||
{
|
{
|
||||||
char *cs; // colorstring
|
char *cs = 0; // colorstring
|
||||||
|
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case '>':
|
case '>':
|
||||||
|
|||||||
1
simpleadder.bf
Normal file
1
simpleadder.bf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
,>,[<+>-]------------------------------------------------.
|
||||||
Reference in New Issue
Block a user