Add basic logic

This commit is contained in:
Yannick Reiß 2023-09-20 23:44:50 +02:00
parent 3a9ec5ecfe
commit 1232423124
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
3 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,4 @@
Endless loop
Affect: cell(ptr)
+[ >< ]

View File

@ -12,7 +12,3 @@ Subtraction: cell(ptr) = cell(ptr) _ cell(ptr x 1)
Using: cell(ptr); cell(ptr x 1)
> [ <->- ] <
Conditional: if (cell(ptr) greater 0) then do stuff
[ > *do stuff here* < [-] ]

5
algorithms/rice_board.bf Normal file
View File

@ -0,0 +1,5 @@
, set the first cell
[ > ++ > + << - ] copy cell(ptr) to cell(ptr x 2) and two times to cell(ptr x 1)
>>[ << + >> - ] << move cell(ptr x2) back to cell(ptr) and move to cell(ptr)
> move forward to restart (not working, as no nested loops are implemented)
. output the double