diff --git a/README.md b/README.md index afdcc0f..f7cdddf 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,8 @@ The shortcut mnemonics for other operations are as follows: * `iva` is a shortcut to `cpy 2` (indirect value assignment) * `inc` is a shortcut to `fma 127 127` (increment) * `mul` is a shortcut to `fma 0` (multiplication) +* `neg` is a shortcut to `sub 0 127` (negation) +* `inv` is a shortcut to `div 127` (inversion/reciprocal) * `exp` is a shortcut to `nel 0` (natural exponent) * `log` is a shortcut to `nel 1` (natural logarithm) * `sin` is a shortcut to `tri 0` (sine) diff --git a/mu808asm.py b/mu808asm.py index aa4f28f..1d04ca8 100755 --- a/mu808asm.py +++ b/mu808asm.py @@ -39,6 +39,8 @@ jmpfunc_shorts = { 'iva': 'cpy 2', # indirect value assignment 'inc': 'fma 127 127', # increment 'mul': 'fma 0', # multiplication + 'neg': 'sub 0 127', # negation + 'inv': 'div 127', # inversion/reciprocal 'exp': 'nel 0', # natural exponent 'log': 'nel 1', # natural logarithm 'sin': 'tri 0', # sine