(mandelbrot) Fixed issues

This commit is contained in:
Devine Lu Linvega 2023-03-04 19:39:07 -08:00
parent 268ec45780
commit f66b975a9c
1 changed files with 4 additions and 2 deletions

View File

@ -92,11 +92,13 @@ JMP2r
( r21' max is 7f7f, alo-bhi max is 7e81, max sum is fe00 )
ADD2 ( asign ahi-bhi* r21"* )
( The result we want is bits 27-12 due to the fixed point representation we use. )
#04 SFT2 SWP2 #40 SFT2 ADD2
#04 SFT2 SWP2 #07ff min #40 SFT2 ADD2
( saturate to +/-7.fff )
#7fff GTH2k [ JMP SWP2 NIP2 ]
#7fff min
STHr #01 NEQ ?&result-positive
DUP2k EOR2 SWP2 SUB2
&result-positive
JMP2r
@min ( x* y* -- min* )
GTH2k [ JMP SWP2 NIP2 ] JMP2r