Complex arithmetic

It's expected that complex numbers are 16-bit fractions. Numbers are added so will get larger than 1, though stay less than 2.

The use of variables seems necessary. They are to be avoided because they're slow.

*.

16-bit fraction multiply, discarding multiplicand

r and i

Storage for real and imaginary parts of first complex number. r is also used to store the product ac.

Variables are relatively cheap, needing only 3 words of RAM. They avoid clashes on the stack, return stack and register a.

*c

Complex multiply is complex. It can be done in 3 multiplies: To do this

+c

Add 2 complex numbers. Return and a can be used to manipulate numbers.

-c

Negating a fraction can be done without adding 1. That would only affect the low-order bit.