Basic math algorithms
This commit is contained in:
parent
edf9421cd6
commit
e85f940218
|
@ -0,0 +1,18 @@
|
|||
Assignment: cell(ptr x 1) = cell(ptr)
|
||||
Using: cell(ptr); cell(ptr x 1); cell(ptr x 2)
|
||||
|
||||
[ >+>+<<- ] >> [ << + >> - ] <<
|
||||
|
||||
Addition: cell(ptr) = cell(ptr) x cell(ptr x 1)
|
||||
Using: cell(ptr); cell(ptr x 1)
|
||||
|
||||
> [ <+>- ] <
|
||||
|
||||
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* < [-] ]
|
Loading…
Reference in New Issue