Noticed that the separate addition for the low 1 bit case was
doing some dupe memory loads. Ended up making separate code
paths for even and odd values so the even saves two cycles
(from 52 down to 50 cycles) and the odd saves 14 cycles (from
69 down to 55 cycles). nice!
This gets the XE runtime on default view down from 3m38s to 3m33s,
a 5 second runtime improvement
add_carry took a fixed 8 cycles with a lda/adc/sta pattern
we can instead use bcc to handle the carry-not-set case in just
2 cycles, skipping over the inc which takes 5 cycles on the
carry-is-set case.
Result is 2-7 cycles instead of 8, saving 1-6 cycles twice
per 16-bit multiplication or square.
Neat!
* switched zero-page from hardcoded assignments to symbols
* moved most non-hotpath stuff out to .data
* merged ptr and pixel_ptr
Slight slowdown in Atari800MacX from 5m13s to 5m15s
This is a first step toward moving the UI to C and
adding file and network I/O in C. The fractal core
will remain in assembler as well as the multiplier.