Add basic logic
This commit is contained in:
parent
3a9ec5ecfe
commit
1232423124
|
@ -0,0 +1,4 @@
|
||||||
|
Endless loop
|
||||||
|
Affect: cell(ptr)
|
||||||
|
|
||||||
|
+[ >< ]
|
|
@ -12,7 +12,3 @@ Subtraction: cell(ptr) = cell(ptr) _ cell(ptr x 1)
|
||||||
Using: 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* < [-] ]
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue