diff --git a/mandel.s b/mandel.s index a63d96f..299db98 100644 --- a/mandel.s +++ b/mandel.s @@ -131,8 +131,6 @@ KEY_0 = 50 .import mul_lobyte .import mul_hibyte -.import sqr_lobyte -.import sqr_hibyte .data @@ -444,9 +442,13 @@ viewport_oy: ; clobbers a, x .macro sqr8 dest, arg ldx arg - lda sqr_lobyte,x + txa + lsr + lda mul_lobyte,x + rol sta dest - lda sqr_hibyte,x + lda mul_hibyte,x + rol sta dest + 1 .endmacro diff --git a/tables.js b/tables.js index f4802ce..176e4df 100644 --- a/tables.js +++ b/tables.js @@ -16,8 +16,6 @@ console.log( .export mul_lobyte .export mul_hibyte -.export sqr_lobyte -.export sqr_hibyte ; (i * i) / 2 for the multiplier .align 256 @@ -28,13 +26,4 @@ ${db((i) => ((i * i) >> 1) & 0xff)} mul_hibyte: ${db((i) => ((i * i) >> 9) & 0xff)} -; (i * i) for the plain squares -.align 256 -sqr_lobyte: -${db((i) => (i * i) & 0xff)} - -.align 256 -sqr_hibyte: -${db((i) => ((i * i) >> 8) & 0xff)} - `);